[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
double-colon AND phony rules
From: |
Adam Kellas |
Subject: |
double-colon AND phony rules |
Date: |
Mon, 4 Apr 2011 09:47:21 -0400 |
Is there anything particularly wrong with making rules double-colon as
long as they're phony also? The manual doesn't address this exact
combination though it's quite frowny about double-colon rules overall
(the general tone is "don't use them unless you really know what
you're doing, and if you really knew what you were doing you wouldn't
use them"). I can see the general arguments against them but not when
they're phony as well.
Background: I'm cleaning up an old build system and have a makefile
which should be usable either directly (by typing "make" in its
directory, for backward compatibility) or as an include file (new
style). It's a tiny little thing, basically:
.PHONY: all clean
all:
[create a couple of files]
clean:
[remove target files]
But in this form "all" and "clean" will break when included. Any
reason not to use "all::" and "clean::" throughout the build system?
Thanks,
AK
- double-colon AND phony rules,
Adam Kellas <=