From owner-freebsd-hackers Tue Feb 20 3:54:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from netcetera.ch (netcetera-139.netcetera.ch [193.192.248.139]) by hub.freebsd.org (Postfix) with ESMTP id 857EF37B401 for ; Tue, 20 Feb 2001 03:54:12 -0800 (PST) (envelope-from jason@netcetera.ch) Received: from disco.netcetera.ch (disco [193.192.248.144]) by (8.9.3/8.7.3) with ESMTP id MAA20449 for ; Tue, 20 Feb 2001 12:54:10 +0100 (MET) From: Jason Brazile Received: by disco.netcetera.ch (8.9.3) id MAA00515; Tue, 20 Feb 2001 12:54:09 +0100 (MET) Date: Tue, 20 Feb 2001 12:54:09 +0100 (MET) Message-Id: <200102201154.MAA00515@disco.netcetera.ch> To: freebsd-hackers@freebsd.org Subject: make bug? (dependency names with '$') Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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