[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Makefile template target is not "up to date" when it has been performed
From: |
Larry Wilson Sr |
Subject: |
Makefile template target is not "up to date" when it has been performed |
Date: |
Mon, 22 Aug 2016 06:33:44 -0700 (PDT) |
I have the following:
In a generic template (Makefile.rules.mak):
BUILDPATHBASHLIBSCRIPTS = $(addprefix $(BUILDPATHDIR)/, $(BASHLIBSCRIPTS))
$(BUILDPATHBASHLIBSCRIPTS): $(BUILDPATHDIR)/%: %
if test $< -nt $@; then \
cp -f $< $@ \
chmod a+rx $@; fi
In a local makefile:
BASHLIBSCRIPTS = revisionclass.sh
include $(MAKEUTILITYDIR)/Makefile.rules.mak
$(BUILDPATHDIR)/revisionopssingleton.sh: privateext
privateext: revisionopssingleton.sh
./compilerevision.sh $< $(BUILDPATHDIR)/$<
My issues are that the privateext rule is ALWAYS run
AND the $(BUILDPATHBASHLIBSCRIPTS) rule is always run
(PLEASE ignore the check for -nt as it was needed for the rule NOT to
overwrite the BUILDPATHDIR/revisionopssingleton.sh file since the normal
target is not being satisfied by the privateext rule)
The purpose of this sequence of rules is to allow a shell script to flow
from source to local (production or debug) setup to staging setup (not
shown); a shell script 99 out of 100 will not be changed but in this case I
use the source as a template and edit it to have defaults that are the
"current packages revision"
ie. if JUST the file list assignment is done then the source file will
simply flow through a local copy then a staging copy.
So, when perform the make, I get the local rule run first then the template
rule run ...
what I don't understand is WHY is the local rule ALWAYS runs ...
ie. once the BUILDPATHDIR/revisionopssingleton.sh has been created and is
newer than the source why does a subsequent not see this as up to date
AND why does the template rule run regardless of the
BUILDPATHDIR/revisionopssingleton.sh already having been staisfied ...
I have a feeling that the first issue is caused by the second issue but why
are the targets not up to date once the BUILDPATHDIR/revisionopssingleton.sh
has been created?
Any insight is appreciated ...
--
View this message in context:
http://gnu-make.2324884.n4.nabble.com/Makefile-template-target-is-not-up-to-date-when-it-has-been-performed-tp17309.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.
- Makefile template target is not "up to date" when it has been performed,
Larry Wilson Sr <=