Mail Archives: cygwin/1998/10/16/13:46:27
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 AT cygnus DOT com" with one line of text: "help".
- Raw text -