I have solved my problem. The problem was that I made
sub/Makefile.SH an order-only prerequisite of sub/config.sh, which
circumvented the execution of the command for sub/config.sh when its
dependency (sub/Makefile.SH) was out of date. By simply removing the
'|' and making it a normal prerequisite, everything now works as
expected.

Thank you for your help.

On Wed, 6 Apr 2005, I wrote:

-------------- Begin Makefile -------------
# I have no control over this action, performed by a third party compiler
define third_party_compiler
rm -fr sub
mkdir -p sub
touch sub/Makefile.SH
echo 'if [ ! -f config.sh ]; then echo "config.sh missing"; exit 1; fi' >> sub/Makefile.SH
echo '. ./config.sh' >> sub/Makefile.SH
echo 'echo "default: ; touch final" >>Makefile' >> sub/Makefile.SH
touch $@
endef


sub/final: sub/Makefile
        $(MAKE) -C $(<D)

sub/Makefile: sub/Makefile.SH sub/config.sh
        cd $(<D) && sh Makefile.SH

sub/config.sh: | sub/Makefile.SH
        touch $@

sub/Makefile.SH: epr ;

epr: source
        $(third_party_compiler)

source:
        touch $@

clean:
        rm -f epr source
        rm -fr sub

-------------- End Makefile -------------

-- Darren Hiebert Phone: 256-964-5830 Pager: 877-214-3485 XonTech Systems Missle Defense Division Northrop Grumman Mission Systems


_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to