[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
2-part question involving empty commands and double-colon rules
From: |
Robert P. J. Day |
Subject: |
2-part question involving empty commands and double-colon rules |
Date: |
Mon, 14 Jun 2004 21:22:37 -0400 (EDT) |
first, the question about empty commands. i read that the only real
reason to define a rule with an empty command is to "prevent a target from
getting implicit commands". fair enough. but what's the value in a rule
in which there are no pre-requisites and an empty command? as in:
target: ;
if "target" is *not* the name of a file but just the name of an action
of some kind, then one might just as well use .PHONY.
and what would it mean if "target" *was* the name of a file? with no
pre-reqs and no command, what would this mean, if anything? what
processing could it possibly do?
and for part two, related to my earlier posting, there is a makefile
"main.mk" that is expected to be included by just about every other
makefile in my project. as it was handed to me, this main.mk file
contains in it the following two lines:
makefile : ;
%.mk:: ;
i'm not sure what the value of these two rules are. given that this file
might be included in numerous other makefiles all over the project, what
are those two rules supposed to be doing, if main makefiles are typically
called "makefile", and secondary makefiles would be named "*.mk"? is this
some well-known recursive makefile idiom?
as always, thanks for the information.
rday
- 2-part question involving empty commands and double-colon rules,
Robert P. J. Day <=