How to develop without an IDE?

Discussion in 'Java' started by Rui Maciel, Apr 22, 2012.

  1. Rui Maciel

    Rui Maciel Guest

    Is it possible to set up a Java project so that it can be built without
    relying on an IDE? If it is, where can I find any information on how to set
    up this sort of project?

    Bonus points if it's possible to pull this off by writing a single makefile.


    Thanks in advance,
    Rui Maciel
    Rui Maciel, Apr 22, 2012
    #1
    1. Advertising

  2. Rui Maciel

    David Lamb Guest

    On 22/04/2012 11:15 AM, Rui Maciel wrote:
    > Is it possible to set up a Java project so that it can be built without
    > relying on an IDE? If it is, where can I find any information on how to set
    > up this sort of project?
    >
    > Bonus points if it's possible to pull this off by writing a single makefile.


    I've always used a combination of Emacs and make. Given your "single
    makefile" question, though, I suspect you may have more sophisticated
    needs than I do. Care to elaborate?
    David Lamb, Apr 22, 2012
    #2
    1. Advertising

  3. On 4/22/2012 8:15 AM, Rui Maciel wrote:
    > Is it possible to set up a Java project so that it can be built without
    > relying on an IDE? If it is, where can I find any information on how to set
    > up this sort of project?
    >
    > Bonus points if it's possible to pull this off by writing a single makefile.
    >
    >
    > Thanks in advance,
    > Rui Maciel


    I use Vim to edit, and a batch file to compile and jar up the classes.
    And often a batch file to start them as well.

    --

    Knute Johnson
    Knute Johnson, Apr 22, 2012
    #3
  4. David Lamb <> wrote:
    > On 22/04/2012 11:15 AM, Rui Maciel wrote:
    >> Is it possible to set up a Java project so that it can be built without
    >> relying on an IDE? If it is, where can I find any information on how to set
    >> up this sort of project?
    >> Bonus points if it's possible to pull this off by writing a single makefile.

    > I've always used a combination of Emacs and make. Given your "single
    > makefile" question, though, I suspect you may have more sophisticated
    > needs than I do. Care to elaborate?


    Not sure if I clarify the OP, or "hijack" his thread, but
    suppose you created a working environment in eclipse consisting
    of a couple of projects, then what tools are there to create
    e.g. an "ant" or "maven"-script from eclipse's own project-
    control files, that would allow a headless machine to build
    a runnable jar-file with all project-dependencies just like
    eclipse does?

    Even if the OP didn't mean that, I'd still like to know - so
    much for hijacking ;)
    Andreas Leitgeb, Apr 22, 2012
    #4
  5. Rui Maciel

    Arne Vajhøj Guest

    On 4/22/2012 11:15 AM, Rui Maciel wrote:
    > Is it possible to set up a Java project so that it can be built without
    > relying on an IDE? If it is, where can I find any information on how to set
    > up this sort of project?
    >
    > Bonus points if it's possible to pull this off by writing a single makefile.


    Very few rely on their IDE to build for serious projects.

    They use tools like Ant or Maven to build with.

    You can also write the code without an IDE, but why not utilize
    the extra support you get from a Java aware IDE.

    Arne
    Arne Vajhøj, Apr 22, 2012
    #5
  6. Rui Maciel

    markspace Guest

    On 4/22/2012 8:15 AM, Rui Maciel wrote:
    > Is it possible to set up a Java project so that it can be built
    > without relying on an IDE? If it is, where can I find any
    > information on how to set up this sort of project?
    >
    > Bonus points if it's possible to pull this off by writing a single
    > makefile.



    Yes of course. The devil will be in the details however.

    <http://docs.oracle.com/javase/7/docs/technotes/tools/>

    <http://www.gnu.org/software/make/manual/make.html>
    markspace, Apr 22, 2012
    #6
  7. Rui Maciel

    Lew Guest

    On 04/22/2012 09:36 AM, Arne Vajhøj wrote:
    > On 4/22/2012 11:15 AM, Rui Maciel wrote:
    >> Is it possible to set up a Java project so that it can be built without
    >> relying on an IDE? If it is, where can I find any information on how to set
    >> up this sort of project?
    >>
    >> Bonus points if it's possible to pull this off by writing a single makefile.

    >
    > Very few rely on their IDE to build for serious projects.
    >
    > They use tools like Ant or Maven to build with.
    >
    > You can also write the code without an IDE, but why not utilize
    > the extra support you get from a Java aware IDE.


    OP: Be careful that your problem statement doesn't limit your solution space.

    Arne knew that makefiles are not literally the best build mechanism for Java,
    so unlike those others who specifically dicussed make with you, he gave you
    the idiomatically Java equivalent.

    I'm not aware of any prevalence of make in the Java build-and-deployment world.

    Ant and Maven are the two most standard mechanisms. Real-life Java
    build-and-deployment systems are edifices of scripts (shell, Python, Ruby,
    ....), continuous-integration (CI) platforms, Ant and/or Maven,
    intelligently-crafted logging (of the builds, not just the program runs), and
    often much more.

    As a solo practitioner you can readily put together a decent ecosystem with
    open-source tools, e.g., for Java EE:

    git version-control repository
    Jenkins continuous-integration framework
    Ant build system
    bash
    Python
    Junit unit test framework
    EasyMock mock objects for testing code
    FindBugs find bugs in source code
    Glassfish application server
    Geronimo, JBoss
    Tomcat, Jetty simpler app server
    JSPs, no EJBs, JMX, etc., unless plugins
    Apache Web Server HTTP server - all kinds of proxy magic, etc.
    EclipseLink, OpenJPA JPA - Java Persistence API)
    Postgres RDBMS
    Your favorite editor(s) and IDE(s)

    You certainly do not need an IDE for any of that, and quite frankly, none of
    your build and test stuff should use any IDE files directly, nor should most
    editor- or IDE-specific files be in the trunk of your code repository.

    With such a suite of tools, I still would add NetBeans or Eclipse (among the
    free options) or Aptana (based on Eclipse) as an IDE. While an IDE is not
    essential to system development, it is very helpful.

    They not only help with code development, they make great dashboards to manage
    your libraries, databases, servers, logs, test frameworks, and other tools,
    and the interactions amongst them. We programmers tend to monomaniacally focus
    only on how IDEs help code production. They are also very handy, particularly
    for the solo stages (developer workstation or individual consultant's
    production box), to manage the myriad operations matters.

    http://git-scm.com/
    http://jenkins-ci.org/
    http://ant.apache.org/
    http://www.ubuntu.com/
    http://www.cygwin.com/
    http://www.python.org/
    http://www.junit.org/
    http://www.easymock.org/
    http://findbugs.sourceforge.net/
    http://glassfish.java.net/
    http://geronimo.apache.org/
    http://www.jboss.org/
    http://tomcat.apache.org/
    http://www.eclipse.org/jetty/
    http://httpd.apache.org/
    http://www.eclipse.org/eclipselink/
    http://openjpa.apache.org/
    http://www.postgresql.org/
    http://www.gnu.org/software/emacs/
    http://netbeans.org/
    http://eclipse.org/
    http://www.aptana.com/

    --
    Lew
    Honi soit qui mal y pense.
    http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
    Lew, Apr 22, 2012
    #7
  8. On Sun, 22 Apr 2012 16:15:30 +0100, Rui Maciel wrote:

    > Is it possible to set up a Java project so that it can be built without
    > relying on an IDE? If it is, where can I find any information on how to
    > set up this sort of project?
    >

    Simple. Do just as you would for, say, a C project but use Ant instead of
    make.

    > Bonus points if it's possible to pull this off by writing a single
    > makefile.
    >

    Its the norm to use a single build.xml (ant's equivalent of Makefile) to
    do everything that make will, i.e. build, clean the source structure,
    install the jarfiles. The only significant differences are that its
    working with a package hierarchy rather than a set of modules in separate
    directories and that it will usually run javadocs too.

    This is how I usually work with Java projects, often over an ssh session.


    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Apr 22, 2012
    #8
  9. On 4/22/2012 2:35 PM, Lew wrote:
    > On 04/22/2012 09:36 AM, Arne Vajhøj wrote:
    >> On 4/22/2012 11:15 AM, Rui Maciel wrote:
    >>> Is it possible to set up a Java project so that it can be built without
    >>> relying on an IDE? If it is, where can I find any information on how
    >>> to set
    >>> up this sort of project?
    >>>
    >>> Bonus points if it's possible to pull this off by writing a single
    >>> makefile.

    >>
    >> Very few rely on their IDE to build for serious projects.
    >>
    >> They use tools like Ant or Maven to build with.
    >>
    >> You can also write the code without an IDE, but why not utilize
    >> the extra support you get from a Java aware IDE.

    >
    > OP: Be careful that your problem statement doesn't limit your solution
    > space.
    >
    > Arne knew that makefiles are not literally the best build mechanism for
    > Java, so unlike those others who specifically dicussed make with you, he
    > gave you the idiomatically Java equivalent.
    >
    > I'm not aware of any prevalence of make in the Java build-and-deployment
    > world.


    make and Java is like square form and wheels. Not a good mix.

    Arne
    Arne Vajhøj, Apr 22, 2012
    #9
  10. On 22/04/12 16:15, Rui Maciel wrote:
    > Is it possible to set up a Java project so that it can be built without
    > relying on an IDE? If it is, where can I find any information on how to set
    > up this sort of project?
    >
    > Bonus points if it's possible to pull this off by writing a single makefile.


    Though I use Eclipse for any project of more than a few source files, I
    don't use it for building. The projects include the necessary scripts
    to be built stand-alone.

    I did explore trying to get 'make' to handle per-file dependencies, and
    I haven't totally given up yet, but for now I've settled for per-jar
    dependencies. I have a pre-packaged 'make' include file, and tell it
    that jar foo depends upon the 'API' of jar bar, and it works out rules
    that allow compilation of foo to be necessary only if any of foo's
    sources have changed (of course), or the API of bar has changed - so bar
    can change internally without necessarily triggering recompilation of foo.

    Within a jar, nothing special is going on - it's a clean build.

    A jar's API is derived from the class files immediately after
    compilation. I originally used javap and gawk for this, but javap's
    text output is not a consistent format from one vendor to the next, and
    the gawk processing is slow, so I eventually wrote a Java program to
    parse the class files directly. It's a little faster, and should be
    more broadly compatible. However, I think it's still substantially
    slower than simply doing clean builds on all jars unconditionally.

    Details here:

    <http://www.comp.lancs.ac.uk/~ss/software/pkg-jardeps>

    Cheers,

    Steven

    --
    ss at comp dot lancs dot ac dot uk
    Steven Simpson, Apr 22, 2012
    #10
  11. Rui Maciel

    BGB Guest

    On 4/22/2012 2:21 PM, Arne Vajhøj wrote:
    > On 4/22/2012 2:35 PM, Lew wrote:
    >> On 04/22/2012 09:36 AM, Arne Vajhøj wrote:
    >>> On 4/22/2012 11:15 AM, Rui Maciel wrote:
    >>>> Is it possible to set up a Java project so that it can be built without
    >>>> relying on an IDE? If it is, where can I find any information on how
    >>>> to set
    >>>> up this sort of project?
    >>>>
    >>>> Bonus points if it's possible to pull this off by writing a single
    >>>> makefile.
    >>>
    >>> Very few rely on their IDE to build for serious projects.
    >>>
    >>> They use tools like Ant or Maven to build with.
    >>>
    >>> You can also write the code without an IDE, but why not utilize
    >>> the extra support you get from a Java aware IDE.

    >>
    >> OP: Be careful that your problem statement doesn't limit your solution
    >> space.
    >>
    >> Arne knew that makefiles are not literally the best build mechanism for
    >> Java, so unlike those others who specifically dicussed make with you, he
    >> gave you the idiomatically Java equivalent.
    >>
    >> I'm not aware of any prevalence of make in the Java build-and-deployment
    >> world.

    >
    > make and Java is like square form and wheels. Not a good mix.
    >


    it does technically work though, and may make some sense, say, if one is
    also building a bunch of C code (say, as part of a JNI wrapper for
    native code or similar), or is generally part of a larger project for
    which make is already used.
    BGB, Apr 23, 2012
    #11
  12. On 4/22/2012 7:15 PM, BGB wrote:
    > On 4/22/2012 2:21 PM, Arne Vajhøj wrote:
    >> On 4/22/2012 2:35 PM, Lew wrote:
    >>> On 04/22/2012 09:36 AM, Arne Vajhøj wrote:
    >>>> On 4/22/2012 11:15 AM, Rui Maciel wrote:
    >>>>> Is it possible to set up a Java project so that it can be built
    >>>>> without
    >>>>> relying on an IDE? If it is, where can I find any information on how
    >>>>> to set
    >>>>> up this sort of project?
    >>>>>
    >>>>> Bonus points if it's possible to pull this off by writing a single
    >>>>> makefile.
    >>>>
    >>>> Very few rely on their IDE to build for serious projects.
    >>>>
    >>>> They use tools like Ant or Maven to build with.
    >>>>
    >>>> You can also write the code without an IDE, but why not utilize
    >>>> the extra support you get from a Java aware IDE.
    >>>
    >>> OP: Be careful that your problem statement doesn't limit your solution
    >>> space.
    >>>
    >>> Arne knew that makefiles are not literally the best build mechanism for
    >>> Java, so unlike those others who specifically dicussed make with you, he
    >>> gave you the idiomatically Java equivalent.
    >>>
    >>> I'm not aware of any prevalence of make in the Java build-and-deployment
    >>> world.

    >>
    >> make and Java is like square form and wheels. Not a good mix.
    >>

    >
    > it does technically work though, and may make some sense, say, if one is
    > also building a bunch of C code (say, as part of a JNI wrapper for
    > native code or similar), or is generally part of a larger project for
    > which make is already used.


    I would rather call ant from make or make from ant to handle those
    situations.

    Arne
    Arne Vajhøj, Apr 23, 2012
    #12
  13. Rui Maciel

    BGB Guest

    On 4/22/2012 4:45 PM, Arne Vajhøj wrote:
    > On 4/22/2012 7:15 PM, BGB wrote:
    >> On 4/22/2012 2:21 PM, Arne Vajhøj wrote:
    >>> On 4/22/2012 2:35 PM, Lew wrote:
    >>>> On 04/22/2012 09:36 AM, Arne Vajhøj wrote:
    >>>>> On 4/22/2012 11:15 AM, Rui Maciel wrote:
    >>>>>> Is it possible to set up a Java project so that it can be built
    >>>>>> without
    >>>>>> relying on an IDE? If it is, where can I find any information on how
    >>>>>> to set
    >>>>>> up this sort of project?
    >>>>>>
    >>>>>> Bonus points if it's possible to pull this off by writing a single
    >>>>>> makefile.
    >>>>>
    >>>>> Very few rely on their IDE to build for serious projects.
    >>>>>
    >>>>> They use tools like Ant or Maven to build with.
    >>>>>
    >>>>> You can also write the code without an IDE, but why not utilize
    >>>>> the extra support you get from a Java aware IDE.
    >>>>
    >>>> OP: Be careful that your problem statement doesn't limit your solution
    >>>> space.
    >>>>
    >>>> Arne knew that makefiles are not literally the best build mechanism for
    >>>> Java, so unlike those others who specifically dicussed make with
    >>>> you, he
    >>>> gave you the idiomatically Java equivalent.
    >>>>
    >>>> I'm not aware of any prevalence of make in the Java
    >>>> build-and-deployment
    >>>> world.
    >>>
    >>> make and Java is like square form and wheels. Not a good mix.
    >>>

    >>
    >> it does technically work though, and may make some sense, say, if one is
    >> also building a bunch of C code (say, as part of a JNI wrapper for
    >> native code or similar), or is generally part of a larger project for
    >> which make is already used.

    >
    > I would rather call ant from make or make from ant to handle those
    > situations.
    >


    yes, this works as well.

    I guess it is probably whichever is more convenient.
    BGB, Apr 23, 2012
    #13
  14. On 4/22/2012 10:28 PM, BGB wrote:

    >>>
    >>> it does technically work though, and may make some sense, say, if one is
    >>> also building a bunch of C code (say, as part of a JNI wrapper for
    >>> native code or similar), or is generally part of a larger project for
    >>> which make is already used.

    >>
    >> I would rather call ant from make or make from ant to handle those
    >> situations.
    >>

    >
    > yes, this works as well.
    >
    > I guess it is probably whichever is more convenient.


    I found that using one good tool for everything is better than
    mixing things.

    Also, gnumake can do so many more things than just build source
    code. I use it to update my html files and pdf files from
    Latex sources, and other such things.

    As long as the idea that drives the tool is: Perform this action
    to update these prerequisites that this target depends on, then better
    to use one tool that does this better and for many other things, not
    just .java files.

    In my tree, I have .f, .f90, .c, .c++, .java, .tex, and many
    other files that I want to 'update' in my tree.

    Using one tool for all, is better, because one becomes better
    at using this one tool, and things are integrated better.
    gnumake+bash is pretty much all what I need.

    I tried ant, and found that I am doing the same thing I
    am already doing in my Makefile, just had to use different
    syntax. (I also did not like XML syntax). Also looked at Ruby
    script, and few other things. They all pretty much try to do
    what Make allready does but using different syntax.

    It is very easy to use gnumake to build Java and make jar files and
    all. Here is a link showing Makefile for Java from the best book
    on gnumake "Managing Projects with GNU make" by Robert Mecklenburg

    http://www.makelinux.net/make3/make3-CHP-9#make3-CHP-9

    Chapter 9 is all about using make for build Java.

    As others said. If you are using an IDE with its own build
    system. It is better to have your own makefile to build
    your tree, independent of what the IDE has. This way, if
    you changed IDE, or move your tree somewhere else where
    this IDE is not available, you can still build your tree
    any where.

    --Nasser
    Nasser M. Abbasi, Apr 23, 2012
    #14
  15. On 4/23/2012 2:06 AM, Leif Roar Moldskred wrote:
    > Nasser M. Abbasi<> wrote:
    >>
    >> I found that using one good tool for everything is better than
    >> mixing things.

    >
    > [SNIP]
    >
    >> In my tree, I have .f, .f90, .c, .c++, .java, .tex, and many
    >> other files that I want to 'update' in my tree.

    >
    > You see no contradiction here?
    >


    What contradiction?

    I use Makefile to build all the my programs?

    Do you mean, why I use different languages? And I should
    use one programming language? is that what you mean?

    If I can find one programming language that meets all my
    programming needs, then I'll use that one language, but
    have not found one yet.

    --Nasser
    Nasser M. Abbasi, Apr 23, 2012
    #15
  16. Rui Maciel

    Roedy Green Guest

    On Sun, 22 Apr 2012 16:15:30 +0100, Rui Maciel <>
    wrote, quoted or indirectly quoted someone who said :

    >Is it possible to set up a Java project so that it can be built without
    >relying on an IDE? If it is, where can I find any information on how to set
    >up this sort of project?


    see http://mindprod.com/jgloss/ant.html
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    When you were a child, if you did your own experiment
    to see if it was better to put to cocoa into your cup first
    or the hot milk first, then you likely have the programmer gene..
    Roedy Green, Apr 23, 2012
    #16
  17. Rui Maciel

    BGB Guest

    On 4/23/2012 12:09 AM, Nasser M. Abbasi wrote:
    > On 4/23/2012 2:06 AM, Leif Roar Moldskred wrote:
    >> Nasser M. Abbasi<> wrote:
    >>>
    >>> I found that using one good tool for everything is better than
    >>> mixing things.

    >>
    >> [SNIP]
    >>
    >>> In my tree, I have .f, .f90, .c, .c++, .java, .tex, and many
    >>> other files that I want to 'update' in my tree.

    >>
    >> You see no contradiction here?
    >>

    >
    > What contradiction?
    >
    > I use Makefile to build all the my programs?
    >
    > Do you mean, why I use different languages? And I should
    > use one programming language? is that what you mean?
    >
    > If I can find one programming language that meets all my
    > programming needs, then I'll use that one language, but
    > have not found one yet.
    >


    yeah...

    in my case, my project currently uses 5 different programming languages
    (to a greater or lesser degree, list does not include makefiles),
    several smaller/special purpose DSLs, and an assortment of specialized
    file-formats.


    I also generally use Make as well...
    BGB, Apr 23, 2012
    #17
  18. Rui Maciel

    Daniel Pitts Guest

    On 4/22/12 8:15 AM, Rui Maciel wrote:
    > Is it possible to set up a Java project so that it can be built without
    > relying on an IDE? If it is, where can I find any information on how to set
    > up this sort of project?
    >
    > Bonus points if it's possible to pull this off by writing a single makefile.
    >
    >
    > Thanks in advance,
    > Rui Maciel

    for small scale projects, a command line works perfectly well.

    I would run commands such as: javac net/virtualinfinity/myproject/Main.java

    Once in a while I'd have to do a rm `find . | grep ".class$"` and the
    like to do a "clean" build.

    Why not use an IDE though? They provide so much!
    Daniel Pitts, Apr 23, 2012
    #18
  19. On 23.04.2012 06:57, Nasser M. Abbasi wrote:
    > On 4/22/2012 10:28 PM, BGB wrote:
    >
    >>>>
    >>>> it does technically work though, and may make some sense, say, if
    >>>> one is
    >>>> also building a bunch of C code (say, as part of a JNI wrapper for
    >>>> native code or similar), or is generally part of a larger project for
    >>>> which make is already used.
    >>>
    >>> I would rather call ant from make or make from ant to handle those
    >>> situations.
    >>>

    >>
    >> yes, this works as well.
    >>
    >> I guess it is probably whichever is more convenient.

    >
    > I found that using one good tool for everything is better than
    > mixing things.


    Which, if followed religiously, will lead you into a situation where it
    can get really awkward to do things with tool A which would be extremely
    easy with tool B.

    > Also, gnumake can do so many more things than just build source
    > code. I use it to update my html files and pdf files from
    > Latex sources, and other such things.


    No wonder because make doesn't do *any* of these things. Make evaluates
    timestamps along dependencies (mostly between files) and invokes other
    programs that do all the work. GNU make additionally has an extremely
    large database of predefined rules, has functions and other capabilities.

    > As long as the idea that drives the tool is: Perform this action
    > to update these prerequisites that this target depends on, then better
    > to use one tool that does this better and for many other things, not
    > just .java files.


    Interestingly GNU make's large built in rule database does not contain
    anything related to compiling Java. How do you create your Makefiles in
    a way as to invoke javac only for those files which have changed -
    especially in light of the fact that one Java source file might create
    multiple .class files?

    > In my tree, I have .f, .f90, .c, .c++, .java, .tex, and many
    > other files that I want to 'update' in my tree.
    >
    > Using one tool for all, is better, because one becomes better
    > at using this one tool, and things are integrated better.
    > gnumake+bash is pretty much all what I need.


    I'm with Leif: if you drink your own cool aid you should be throwing out
    all those languages and resort to language [ ] only.

    > I tried ant, and found that I am doing the same thing I
    > am already doing in my Makefile, just had to use different
    > syntax. (I also did not like XML syntax). Also looked at Ruby
    > script, and few other things. They all pretty much try to do
    > what Make allready does but using different syntax.


    I disagree: ant is very different from make. Ant has built in tasks and
    knows itself how to accomplish them. You can even teach it more tasks
    via its extension interface. ant rules for building Java projects are
    almost certainly a lot simpler than the same for make - as that example
    proves.

    > It is very easy to use gnumake to build Java and make jar files and
    > all. Here is a link showing Makefile for Java from the best book
    > on gnumake "Managing Projects with GNU make" by Robert Mecklenburg
    >
    > http://www.makelinux.net/make3/make3-CHP-9#make3-CHP-9


    I did not see the advertized Makefile example but found this gem
    (quoting from that page):

    "Code declared to be within the a.b.c package would be compiled to class
    files in the a/b/c directory. This means that make's normal algorithm
    for associating a binary file with its source fails."

    Or did you mean this link?
    http://www.makelinux.net/make3/make3-CHP-9-SECT-2

    I am counting 200+ lines in this Makefile. It inefficiently invokes
    javac on all Java sources and defines functions for things that ant can
    do out of the box. As a consequence you have to search in different
    locations to find out which packages go into which jar file. The same
    is probably 15% of the lines as an ant file. Sorry, but that example is
    no advertisement for using make to build Java projects.

    > Chapter 9 is all about using make for build Java.
    >
    > As others said. If you are using an IDE with its own build
    > system. It is better to have your own makefile to build
    > your tree, independent of what the IDE has. This way, if
    > you changed IDE, or move your tree somewhere else where
    > this IDE is not available, you can still build your tree
    > any where.


    Modern IDE's usually have integration with ant and / or maven and will
    happily generate appropriate build files.

    Kind regards

    robert

    --
    remember.guy do |as, often| as.you_can - without end
    http://blog.rubybestpractices.com/
    Robert Klemme, Apr 23, 2012
    #19
  20. Rui Maciel

    Rui Maciel Guest

    Robert Klemme wrote:

    > On 23.04.2012 06:57, Nasser M. Abbasi wrote:
    >> I found that using one good tool for everything is better than
    >> mixing things.

    >
    > Which, if followed religiously, will lead you into a situation where it
    > can get really awkward to do things with tool A which would be extremely
    > easy with tool B.


    This isn't necessarily a problem, particularly if a person is already
    familiar with tool A while being completely unaware that tool B even
    existed.

    Then there is a significant issue with being forced to learn an entirely new
    tool just because there might be a single thing that it might be able to
    handle in a simpler way, and then being forced to deal with a significant
    list of things where the new tool fails to perform. Unfortunately, this
    appears to be an undistinguishing feature of every automated build system
    that has been released.


    >> Also, gnumake can do so many more things than just build source
    >> code. I use it to update my html files and pdf files from
    >> Latex sources, and other such things.

    >
    > No wonder because make doesn't do *any* of these things. Make evaluates
    > timestamps along dependencies (mostly between files) and invokes other
    > programs that do all the work. GNU make additionally has an extremely
    > large database of predefined rules, has functions and other capabilities.


    There is nothing wrong with this. In fact, I see it as an extremelly
    valuable feature. It's a pain in the neck to shoe-horn custom build rules
    to an automated build system which was developed with them as an
    afterthought.


    >> As long as the idea that drives the tool is: Perform this action
    >> to update these prerequisites that this target depends on, then better
    >> to use one tool that does this better and for many other things, not
    >> just .java files.

    >
    > Interestingly GNU make's large built in rule database does not contain
    > anything related to compiling Java. How do you create your Makefiles in
    > a way as to invoke javac only for those files which have changed -
    > especially in light of the fact that one Java source file might create
    > multiple .class files?


    Maybe build-in rules aren't needed, considering Make's static pattern rules.

    http://www.gnu.org/software/make/manual/make.html#Static-Pattern

    <snip/>


    Rui Maciel
    Rui Maciel, Apr 23, 2012
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    502
  2. Steve
    Replies:
    1
    Views:
    567
  3. tenxian
    Replies:
    7
    Views:
    295
    Arne Vajhøj
    Apr 22, 2008
  4. S_K
    Replies:
    0
    Views:
    291
  5. Pradeep Belagapu
    Replies:
    5
    Views:
    129
    Jeremy McAnally
    Mar 25, 2008
Loading...

Share This Page