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: Sun, 20 Jan 2019 20:17:18 -0600

Thank you for your kind response.  

It seems to me, and as reported by others, that what Make does and what the Java build tools do have some fundamental differences.  Some that come to mind are as follows:

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.

2.  Typically, javac will be called to compile all out of date files in a directory rather than having to explicitly name each one in the build file.

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

Although I have more than 10 years experience working with Java, I have to admit that I am not completely clear about the Java build process since, on large project, I've used the IDE, ANT, Maven, or Gradle to do the work for me.

It is my semi-ignorant opinion that:

A.  Make is not a good tool for building large, modern Java programs.

B.  The things that would have to be added to make Make a practical Java / _javascript_ build tool is not that much.

C.  (For _javascript_ build tools) The ability to run continuously.  When Make detects a source file change it automatically kicks off a target file build.

Thanks.

Blake

On Fri, Jan 18, 2019 at 1:51 PM Henrik Carlqvist <address@hidden> wrote:
On Fri, 18 Jan 2019 05:42:44 -0600
Blake McBride <address@hidden> wrote:
> I have found Make very easy to understand and use.  Given the amount of
> work they do in the background, I have found build tools such as Maven
> and Gradle to be very confusing.

When I some years ago wrote Android apps I found eclipse too buggy to be
usable. Point and click might be nice, but far too often eclipse crashed.

I resorted to editing the source files in emacs and build the Android
projects with gnu Make, just as I was used to with C projects.

> It is my incomplete understanding that certain aspects of Make don't
> lend themselves well to the building of Java projects.  This is what has
> driven the quest for better Java fitting build tools.

Gnu Make is very simple, it uses some command to create something and does
that if something else indicates that it is needed. This simplicity makes
Make very useful for far more things than just compiling programs.

> I wondered whether it might be possible to enhance certain
> aspects of GNU Make to better accommodate the needs of a Java
> environment.

What kind of need would that be? The hardest thing for me migrating from
eclipse to gnu Make was finding out everything that was done below the
sheets by eclipse. In the end it was really just about running different
commands with arguments to generate files.

> Anyway, I thought I would raise the issue and possibly spark an
> interesting conversation.

My Android app projects are today abandoned, but if you want to study my
Makefile to genereate the .apk files from Java code you can download it
as described at http://halttimer.cvs.sourceforge.net/

regards Henrik

reply via email to

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