1. 11
  1. 4

    Perhaps a more constructive way of saying this is that Make’s value proposition is that it will handle your builds efficiently by only rebuilding those things which have actually changed each time.

    This is perfectly suited to languages like C where many times dependencies are bundled into libraries which get linked into the final executable.

    In the Java world, doing this kind of dependency analysis is much trickier, since the timestamp driven mechanism make uses doesn’t take things like transitive dependencies into account.

    This is why tools like Maven and Gradle have become much more popular for JVM languages.

    I actually worked at a company that used Makefiles to build a large Java e-commerce app. They were never able to actually finish because representing the dependency tree using make’s syntax became incredibly burdensome.

    1. 4

      Because make is a simple tool that just can’t handle properly the enormous mess that is building Java programs efficiently. You totally need specialized functionality.

      1. 2

        How is building Java programs efficiently an enormous mess?

        1. 2

          There are a lot of obscure details you need to take in count when building a Java program with dependencies (The classpaths, the meta-infs…). Everyone uses Ant/Maven (or, sadly, Gradle) to do mostly that job, so you can just ./gradlew build or whatever and everything is done under the hood, completely abstracted out.

          Without them, Makefiles for Java projects would be a complete nightmare of copy-pastes from Stack Overflow.

          1. 1

            The last time I worked with Java is over 10 years ago, but I don’t recognize this as being about building /Java/, as much as about /developing and maintaining the kinds of programs people write with Java/. I remember using simple build shell scripts for just building. Make would even be overkill: generating a classpath and command from a directory of jars and java source isn’t hard.

            I did use maven for many projects as well, as It also does dependency management, test execution, other multi step stuff, etc. But that’s not anything intrinsic to Java and building Java in my view.

            1. 1

              Not intrinsic to Java, but the Java ecosystem and how people is doing Java. Which gets more complex over time.

              It would be great to have a Java ecosystem simple enough that Make could handle it.

      2. 2

        I heard that Ant was actually originally created simply because it was hard to install make on Windows.

        1. 3

          Not far from the mark actually. From the Ant Wikipedia entry:

          Ant (“Another Neat Tool”)[2] was conceived by James Duncan Davidson while preparing Sun Microsystems’s reference JSP and Servlet engine, later Apache Tomcat, for release as open-source. A proprietary version of Make was used to build it on the Solaris platform, but in the open-source world, there was no way of controlling which platform was used to build Tomcat; so Ant was created as a simple platform-independent tool to build Tomcat from directives in an XML “build file”. Ant (version 1.1) was officially released as a stand-alone product on July 19, 2000.