This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: B19.1 make.exe - mishandling set -e, excessive target activity
- To: bug-gnu-utils at prep dot ai dot mit dot edu
- Subject: Re: B19.1 make.exe - mishandling set -e, excessive target activity
- From: Luke Kendall <luke at research dot canon dot com dot au>
- Date: Fri, 16 Oct 98 12:42:41 +1000
- cc: luke at research dot canon dot com dot au, gnu-win32 at cygnus dot com
- References: <3625A224.3A061C96@research.canon.com.au>
I'm doing this under Unix (SunOS 5.5.1) and using gmake 3.74,
but also getting the same results under Windows NT4.0 sp3, using
Cygnus Beta 19.1 and therefore GNU Make version 3.75-B19.
Yesterday, I reported the problem below. Today it bit me.
This really seems like a bug in gmake.
> Problem 2
> ---------
> If I make these two files:
>
> --- file test.gmk ---
>
> all:
> @echo all done
>
> include other
>
> --- file other ---
>
> do_other:
> @echo other stuff
>
> ----
>
> And try:
> make -f test.gmk -d
>
> The output (and the amount of time make takes) suggests
> that it is really trying to treat "test.gmk" and "other"
> as targets!!
I have simplified the actual makefiles that tripped me up,
down to these very simple demonstration cases.
Behold - I choose the "targ1" target, and both targets get made:
$ cat test1.gmk
targ1:
@echo "Target is $@"
@echo "$@ done"
top-dirs:
@echo "top-dirs done"
targ2 test1.gmk : top-dirs
@echo "Target is $@"
@echo "$@ done"
$ gmake -f test1.gmk targ1
top-dirs done <---- !!!
Target is test1.gmk <---- !!!
test1.gmk done <---- !!!
Target is targ1
targ1 done
Now these two slight variants, that work correctly. This first one
doesn't use the intermediate target "top-dirs" for the unrelated
targ2:
$ cat test2.gmk
targ1:
@echo "Target is $@"
@echo "$@ done"
top-dirs:
@echo "top-dirs done"
targ2 test2.gmk :
@echo "Target is $@"
@echo "$@ done"
$ gmake -f test2.gmk
Target is targ1
targ1 done
And this one does use the intermediate target "top-dirs", but doesn't
have its own name in the target unrelated to targ1:
$ cat test3.gmk
targ1:
@echo "Target is $@"
@echo "$@ done"
top-dirs:
@echo "top-dirs done"
targ2 xxx : top-dirs
@echo "Target is $@"
@echo "$@ done"
$ gmake -f test3.gmk targ1
Target is targ1
targ1 done
I think this is due, somehow, to gmake's strange attempt to use
the makefile itself, and any included file, in the rule sets.
luke
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".