Date: Tue, 20 Feb 2001 12:54:09 +0100 (MET) From: Jason Brazile <jason@netcetera.ch> To: freebsd-hackers@freebsd.org Subject: make bug? (dependency names with '$') Message-ID: <200102201154.MAA00515@disco.netcetera.ch>
next in thread | raw e-mail | index | archive | help
Background:
I want to construct a portable Makefile to build a java application.
When a java source file contains an inner class, it creates class
file names with an embedded '$'.
$ cat foo.java
public class foo {
private class bar {
}
}
$ javac foo.java
$ ls
foo$bar.class foo.class foo.java
Problem:
- BSD make seems to have trouble with dependencies whose names contain $.
- I can construct a case where GNU make is happy enough, but BSD make isn't.
Test Case:
$ cat Makefile
X=foo$bar.class
XX=foo$$bar.class
XXX=foo\$$bar.class
.PHONY: x xx xxx yy
x: $(X)
echo $(X)
xx: $(XX)
echo $(XX)
xxx: $(XXX)
echo $(XXX)
yy: $(XX)
echo $(XXX)
# LATEST BSD make (e.g. main.c at revision 1.46 2001/02/19 03:59:04)
$ make x
make: don't know how to make fooar.class. Stop
$ make xx
make: don't know how to make fooar.class. Stop
$ make xxx
make: don't know how to make foo\ar.class. Stop
$ make yy
make: don't know how to make fooar.class. Stop
# package: gmake-3.79.1 GNU version of 'make' utility
$ gmake x
gmake: *** No rule to make target `fooar.class', needed by `x'. Stop.
$ gmake xx
echo foo$bar.class
foo.class
$ gmake xxx
gmake: *** No rule to make target `foo\$bar.class', needed by `xxx'. Stop.
$ gmake yy
echo foo\$bar.class
foo$bar.class
Conclusion:
I could live with having to use something like the "yy" target if it
worked with BSD make, because it works with GNU make.
If people agree that this seems like a bug, I will try to see if I
can find where the problem is, but there are probably others who would
be more efficient at this.
Jason
------------------------------------------------------------------------
Jason Brazile jason.brazile@netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 70 70 fax +41 1 247 70 75
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102201154.MAA00515>
