Re: make bug? (dependency names with '$')

2001-02-22 Thread Jason Brazile

Warner Losh wrote:
 This does sound like a bug in our make :-(.

A quick update:

This bug does not occur with NetBSD make. I spent a couple of hours
diffing the sources (there are a lot more differences than I expected)
to see if there was any one small patch that would make things work for
FreeBSD, but I wasn't successful. There are many patches in NetBSD make
that deal specifically with '$', but apparently just adding these is
not sufficient. I would need to get below this superficial view to see
what's going on.

There is a person with login name "will" who made a CVS log entry that
says:
Assume MAINTAINER.  I will be taking the job of merging
NetBSD/OpenBSD improvements (including :C  :L, among others).
After that, I'll be coming up with other ways to improve
make(1).

If he is still the make maintainer for FreeBSD, can someone give me a 
full email address for him?

Thanks,
Jason


Jason Brazile [EMAIL PROTECTED]
Netcetera AG, 8040 Zuerichphone +41 1 247 70 70  fax +41 1 247 70 75


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



RE: make bug? (dependency names with '$')

2001-02-22 Thread Jason Brazile

Kees Jan wrote:
 Jason Brazile wrote:
  This bug does not occur with NetBSD make. I spent a couple of hours
  diffing the sources (there are a lot more differences than I expected)
 
 There was some talk on the OpenPackages list about differences in the makes
 of the three BSD's. I've only followed the discussion with half an eye, but
 it would be nice for them too to see the makes converge, or at least iron
 out differences here and there.
 
 http://openpackages.org/pipermail/op-tech/

Thanks for the pointer. That is a very interesting site. For those who
haven't heard of it, it is an effort to unify the various BSD (NetBSD,
FreeBSD, OpenBSD, BSDi, Darwin) 3rd party software packaging so that 
all BSDs can use the same system.

As a side effect of their wanting to remove effort duplication, they
are trying to also unify the various flavors of BSD make.

Jason


Jason Brazile [EMAIL PROTECTED]
Netcetera AG, 8040 Zuerichphone +41 1 247 70 70  fax +41 1 247 70 75


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



RE: make bug? (dependency names with '$')

2001-02-22 Thread Koster, K.J.

Dear All,
 
 This bug does not occur with NetBSD make. I spent a couple of hours
 diffing the sources (there are a lot more differences than I expected)

There was some talk on the OpenPackages list about differences in the makes
of the three BSD's. I've only followed the discussion with half an eye, but
it would be nice for them too to see the makes converge, or at least iron
out differences here and there.

http://openpackages.org/pipermail/op-tech/

Kees Jan


 You are only young once,
   but you can stay immature all your life.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Warner Losh

In message [EMAIL PROTECTED] 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.

:   When a java source file contains an inner class, it creates class
:   I could live with having to use something like the "yy" target if it
:   worked with BSD make, because it works with GNU make.

This seems like a bug in make(1).  Although I think you might want to
investigate:

d=$$
X=foo\$dbar.class

x:
echo $(X)

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Warner Losh

In message [EMAIL PROTECTED] Warner Losh writes:
: This seems like a bug in make(1).  Although I think you might want to
: investigate:
: 
: d=$$
: X=foo\$dbar.class
: 
: x:
:   echo $(X)

d=$$
X=foo$dbar.class

x:  $(X)
echo "$(X)"

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



RE: make bug? (dependency names with '$')

2001-02-20 Thread Koster, K.J.

Dear Jason,

 
   I want to construct a portable Makefile to build a java application.

I've played with Java and Make in the past, but I found that spawning a new
instance of the Java compiler is more expensive than compiling a pretty big
bunch of files. gcc starts up a lot quicker than a JVM.

My solution (ahem) is to compile per (sub)package of my application and
simply let the JAR file depend on all of the source files. Compiling this
way is quicker in the majority of cases that I have.

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. :)

Kees Jan


 You are only young once,
   but you can stay immature all your life.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Jason Brazile

Warner wrote:
 In message [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
Netcetera AG, 8040 Zuerichphone +41 1 247 70 70  fax +41 1 247 70 75


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Warner Losh

In message [EMAIL PROTECTED] Jason Brazile writes:
: Warner wrote:
:  In message [EMAIL PROTECTED] 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". :-) 

There are bigger problems when you have .java files generated.  That's
why java's make like system is half assed, and the wrong half at
that.  There's no hook there to generate .java files.  If you needed
to support multiple versions of java w/o warnings, for example, you'd
need to run your .java code through a preprocessor (since java's
conditionals are too weak to allow for this possibility).  That's when
you start hitting heap bigtime problems.

This does sound like a bug in our make :-(.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Nate Williams

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.

That's not true.  I built a 100K line application using make w/out any
problems.  (It builds on Win9X, NT, FreeBSD, and Solaris).


Nate

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



RE: make bug? (dependency names with '$')

2001-02-20 Thread Nate Williams

  
I want to construct a portable Makefile to build a java application.
 
 I've played with Java and Make in the past, but I found that spawning a new
 instance of the Java compiler is more expensive than compiling a pretty big
 bunch of files. gcc starts up a lot quicker than a JVM.

Jikes is your friend.  We switched from using javac because of this.




Nate
ps. This should probably be moved to freebsd-java.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Nate Williams

 Jason Brazile [EMAIL PROTECTED] writes:
I want to construct a portable Makefile to build a java application.
 
 Don't bother.
 
  a) use jikes instead of javac, it's much faster and gives better
 diagnostics.

Agreed.

  b) to rebuild, just list all the source (.java) files on the jikes
 command line. Jikes will figure out what needs rebuilding and what
 doesn't. If there are too many files, list them all (each on one
 line) in a text file (e.g. 'sources') and specify '@sources' on
 the command line.

Disagree.  If you want it to be portable, don't use a non-standard
extension to a tool, such as jikes dependency features.

We used jikes for our day-day development, but move back to using
'javac' for our Q/A and final builds.  That way we can complain to Sun
when things don't work. ;)



Nate

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Dag-Erling Smorgrav

Nate Williams [EMAIL PROTECTED] writes:
 Disagree.  If you want it to be portable, don't use a non-standard
 extension to a tool, such as jikes dependency features.
 
 We used jikes for our day-day development, but move back to using
 'javac' for our Q/A and final builds.  That way we can complain to Sun
 when things don't work. ;)

So what's the problem? javac also automatically builds dependencies,
it's just not as good at it as jikes. For a final build, you want to
start with a clean tree anyway, so javac's inability to correctly
detect if a dependency is out of date is irrelevant.

Also, my experience is that unless you're paying Sun significant
amounts of $$, their reaction to bug reports is to close their eyes,
hum real loud and hope they go away.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Nate Williams

  Disagree.  If you want it to be portable, don't use a non-standard
  extension to a tool, such as jikes dependency features.
  
  We used jikes for our day-day development, but move back to using
  'javac' for our Q/A and final builds.  That way we can complain to Sun
  when things don't work. ;)
 
 So what's the problem? javac also automatically builds dependencies,
 it's just not as good at it as jikes.

Not in a way that's usable my make.  Jike can be used to build external
dependency files.

 Also, my experience is that unless you're paying Sun significant
 amounts of $$, their reaction to bug reports is to close their eyes,
 hum real loud and hope they go away.

True, but Sun is no different than anyone else in that regard.  I have
found the individual developers somewhat more easy to work with, if you
can get a contact within Sun.


Nate

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: make bug? (dependency names with '$')

2001-02-20 Thread Dag-Erling Smorgrav

Jason Brazile [EMAIL PROTECTED] writes:
   I want to construct a portable Makefile to build a java application.

Don't bother.

 a) use jikes instead of javac, it's much faster and gives better
diagnostics.

 b) to rebuild, just list all the source (.java) files on the jikes
command line. Jikes will figure out what needs rebuilding and what
doesn't. If there are too many files, list them all (each on one
line) in a text file (e.g. 'sources') and specify '@sources' on
the command line.

If there is a single file in your project that directly or indirectly
depends on every other, you can also just specify that one file on the
command line.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message