Syntax : Take you attention that there is NO command in rule.
<target> : <dep>
At abve case, <dep> is ADDED to <target>'s existing dependency (NOT "replace"!!)
But, if there is COMMAND at above rule, old COMMAND is "REPLACED" (NOTE that, dependency is still ADDED).
See below examples to help understanding.
< Makefile >
all: a
touch all0
a
touch a
all: b
b
touch b
> make
touch a
touch b
touch all0
----------------------
< Makefile >
all: a
a
touch a
all: b
touch all1
b
touch b
> make
touch b
touch a
touch all1
----------------------
< Makefile >
all: a
touch all0
a
touch a
all: b
touch all1
b
touch b
> make
touch b
touch a
touch all1
# Same with above
# That is, older command for target is replaced with newer one.
'Tools' 카테고리의 다른 글
[GNUMake] deferred & immediate assignment. (0) | 2013.07.05 |
---|---|
[ Emacs ] key-bindings.... (my environment) (0) | 2012.03.23 |
[Tools] Customizing skip list of GNU Global (including regular expression) (0) | 2011.07.06 |
[Tools] 'Tab' means 'Command' in Make. (0) | 2011.01.26 |
[Emacs] use Semantic with global... (0) | 2010.06.29 |