bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Make for Java projects


From: Blake McBride
Subject: Re: GNU Make for Java projects
Date: Tue, 12 Feb 2019 05:49:27 -0600

Agreed.  https://github.com/blakemcbride/Build

On Mon, Feb 11, 2019 at 9:40 PM Tim Murphy <address@hidden> wrote:
Targets with multiple outputs have never been well supported in GNU make and despite appeals and the problem having existed forever and despite examples of commercial make implementations that support it well, it would not surprise me if support for it was something we could only hope for for our children. I have, quite literally, gone grey haired waiting for it.

So my advice is to to do anything except wait. 

Regards, Tim


On Tue, 12 Feb 2019, 04:13 Blake McBride <address@hidden wrote:
I appreciate all of the replies and comments, but I think a point is being missed.

Let's say my Java app is made up of 9,500 source files (which is actually true!).  Let's say I change 20 of them.  

1.  How could I create a dependency that basically says the 9,500 Java files in an entire source directory tree result in the 9,500 class files in the output directory tree?

2.  I need to create a text file to pass a lot of parameters to a single evocation of javac.  This file must contain all the updated java files and a pointer (classpath) to the already up-to-date class files.

What has been suggested works fine for 20 Java files.  But it is impractical for 10,000 files.

Make doesn't deal with source trees well.  Although I can use 'find' in a recipe, I can't for the target and dependency files.  I can't say, all of the class files in one tree is dependent on all of the java files in another - while also only compiling the out-of-date files - all in one javac evocation.

Perhaps I am wrong.  But I think these are the problems that drove the development of ant, maven, gradle, and others.

I intuit that make could be enhanced to deal with these other scenarios if the will existed.

Thanks.

Blake


On Mon, Jan 21, 2019 at 3:24 AM Andrea Venturoli <address@hidden> wrote:
On 1/21/19 3:17 AM, Blake McBride wrote:

> 1.  When building C programs one calls the compiler for each source
> file.  This is impractical with Java because of the javac startup time. 
> Typically javac is called once with many source files at a time - but
> not the ones that are not out of date.

This is easy to overcome with a proper rule.

I've used make a lot in the past for some Java project which didn't
involve complex layouts.




> 3.  Java build tools have the ability to download and cache files from
> remote repositories over the net.

This is something that make does not do (and does not try to do).
Period.

If you are doing a complex project which involves a lot of dependencies
and you want them to be fetched and delivered, I guess make is not an
option.




Just my 2c.

  bye
        av.

_______________________________________________
Bug-make mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-make
_______________________________________________
Bug-make mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-make

reply via email to

[Prev in Thread] Current Thread [Next in Thread]