Subject: make strangeness
To: port-pmax list NetBSD <port-pmax@netbsd.org>
From: Eyal Lebedinsky <eyal@eyal.emu.id.au>
List: port-pmax
Date: 04/04/2004 18:25:43
I ended up with a makefile that contains something like this
(call it test.mak):

xxx xxx:
	echo $(MAKE_VERSION)
         echo -n " " ld -o xxx   > make.crf
         echo -n " " a.o         >>make.crf
         echo -n " " b.o         >>make.crf
         -rm xxx
         touch xxx

Naturally, in my makfile the two 'xxx's are actually different
variables that ended up with the same value, and the final
touch was actually executing make.crf. When making I get:

$ rm xxx ; make -f test.mak
echo netbsd-20020909
netbsd-20020909
echo netbsd-20020909
netbsd-20020909
echo -n " " ld -o xxx   > make.crf
echo -n " " ld -o xxx   > make.crf
echo -n " " a.o         >>make.crf
echo -n " " a.o         >>make.crf
echo -n " " b.o         >>make.crf
echo -n " " b.o         >>make.crf
rm xxx
rm: xxx: No such file or directory
*** Error code 1 (ignored)
rm xxx
rm: xxx: No such file or directory
*** Error code 1 (ignored)
touch xxx
touch xxx

As you can see, the commands are executed each twice. If the whole
segment was done twice I could live with it, but the result of
this interleaved execution is a failure.

I am running 1.6.

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>