Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Feb 2001 16:48:22 +0100 (MET)
From:      Jason Brazile <jason@netcetera.ch>
To:        imp@village.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: make bug? (dependency names with '$')
Message-ID:  <200102201548.QAA01397@disco.netcetera.ch>

next in thread | raw e-mail | index | archive | help
Warner wrote:
> In message <200102201154.MAA00515@disco.netcetera.ch> Jason Brazile writes:
> :   I want to construct a portable Makefile to build a java application.
> 
> That's not possible.  Java specifies a half assed make system as part
> of the language, so it is nearly impossible to use another make system
> on top of it unless you are willing to live with a whole slew of
> problems.

Until someone started using inner classes, my Makefiles were being
fairly successful at "living with a whole slew of problems". :-) 

> d=$$
> X=foo$dbar.class
> 
> x:	$(X)
>  	echo "$(X)"

Thanks for the suggestion. I named this target "w" in order to add to 
what I already had:

	  X=foo$bar.class
	 XX=foo$$bar.class
	XXX=foo\$$bar.class
	  d=$$
	  W=foo$dbar.class

	.PHONY: x xx xxx yy w

	x: $(X)
		echo $(X)

	xx: $(XX)
		echo $(XX)

	xxx: $(XXX)
		echo $(XXX)

	yy: $(XX)
		echo $(XXX)

	w: $(W)
		echo "$(W)"

However, other than the quotes, it doesn't seem to work differently from 
my previous "xx" target: 

	$ make w
	make: don't know how to make fooar.class. Stop
	$ gmake w
	echo "foo$bar.class"
	foo.class

	$ make xx
	make: don't know how to make fooar.class. Stop
	$ gmake xx
	echo foo$bar.class
	foo.class

Kees Jan wrote:
> Have you looked at Apache's Ant project? I don't like it myself, but if you
> want a portable make, you might as well use a Java one. :)

Hmm, well thanks for reminding me about ant. I guess I should really
consider it, unless I am ready to admit to being an old dog.

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?200102201548.QAA01397>