| Date Of Receipt: 3-JUN-1994 18:12:18.05
From: FLUME::jmcg "Jim McGinness"
To: jdaddamio@dec:.zso.decwet
CC: buildhelp@DEC:.zko.flume
Subj: Re: Question about GOLD BL10 make
The target is not being made, so the commands are not executed. The
commands under a target with no dependencies will be executed only if
the target does not already exist.
The ODE make rules have an ALWAYS concept which, when listed as
a dependency, forces the firing of the commands. Maybe this is
what you are looking for.
-- jmcg
|
| Date Of Receipt: 3-JUN-1994 19:52:25.88
From: FLUME::jmcg "Jim McGinness"
To: jdaddamio@dec:.zso.decwet
CC: buildhelp@DEC:.zko.flume
Subj: Re: Question about GOLD BL10 make
I don't know exactly what environment you are in and which makerules
you have available. Perhaps you do have a problem. I think the
only problem is misinterpreting the make manpage, though.
On gulch, running Gold BL9, I created the following Makefile
ALWAYS=_ALWAYS_
${ALWAYS}:;@
selzter: carbonation
echo 'Executing commands for "selzter"'
carbonation: ${ALWAYS}
echo "Fizzzzzzzzz"
echo "Fizzzzzzzzz" > bubbles
cp bubbles carbonation
echo ALWAYS=${ALWAYS}
This makefile behaves as I think you are expecting. The commands under
target carbonation are re-executed every time you say "make carbonation",
regardless of whether a file named "carbonation" already exists.
This works because the dependency on _ALWAYS_ triggers the firing of
the commands for _ALWAYS_, then for carbonation. No file _ALWAYS_
is created (the command list is null), make doesn't check again for
_ALWAYS_ before continuing with the commands for carbonation.
If ALWAYS is not defined, you get back to the original situation
of carbonation having no dependencies. What the manpage says
about this situation is:
The use of dependencies is not mandatory, but if they are not
used, the command line is always executed when the target is made.
The key phrase is "when the target is made". There's an unfortunate
collision of English with computer jargon here. You might think
that saying "make target" leads inexorably to a situation where
"the target is made", but the latter phrase must be understood
in the context of the earlier sentence:
The make command updates the target based on whether the target's
dependencies have been modified relative to the time of last
modification to the target, or if the target itself does not exist.
|
| Date Of Receipt: 6-JUN-1994 15:46:42.77
From: FLUME::jmcg "Jim McGinness"
To: jdaddamio@dec:.zso.decwet
CC: buildhelp@DEC:.zko.flume
Subj: Re: Question about GOLD BL10 make
> seltzer: carbonation
> echo 'Executing commands for "selzter"'
> carbonation: ${ALWAYS}
On the first scan of the makefile, this ${ALWAYS} is NULL because it
hasn't been defined yet. The reason ODE makefiles appear to have the
includes at the bottom is that most of them consist entirely of macro
definitions. These macros are then consumed by the included rules.
If there are any additional rules, they're supposed to come after the
includes, but this usually doesn't matter much if the rules are simple
and don't contain macros that need expansion. In your case, it DOES
matter. Move your rules to come after the includes.
> echo "Fizzzzzzzzz"
> echo "Fizzzzzzzzz" > bubbles
> cp bubbles carbonation
> echo ALWAYS=${ALWAYS}
> include ${MAKEFILEPATH}/standard.mk
> include ${MAKEFILEPATH}/subdirs.mk
> include ${MAKEFILEPATH}/others.mk
|