ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <Tim.Ver...@macquarie.com.au>
Subject RE: if and unless attributes for all Tasks
Date Fri, 18 May 2001 03:53:12 GMT
From: Daniel Barclay [mailto:Daniel.Barclay@digitalfocus.com]

> Tim Vernum wrote:
> > 
> ...
> > I have *never* seen a publically distributed project that had a
> > decent makefile.
> 
> What kind of problems, or what lack of good things, are you thinking
> of?

1] It's usually very hard to follow the flow of the makefile.
2] The same options set in multiple places
   eg: I'm currently hacking at some code in perl, trying to make a weird module work.
   Everytime I want to change the library path, I have to do it in 3 places.
   Why?
3] Adding a new file means adding it in a thousand places
4] Wrapping it up in so much auto-conf, that you can't change it simply when you need to.
5] Deciding that the default tools suck so much, they write a whole lot of unexplained
   shell scripts to do the compiling
6] Recursive make
7] Options spread all over the place
   eg:
    ## Use gcc as the compiler
    CC=gcc
    ## Uncomment this is you want regular cc
    # CC=cc
  
    ## These are gcc flags, change them if you use cc,
    ##  but make sure you always define FOOBAR
    CFLAGS=-O2 -fpic -DFOOBAR

   I would like to see something like:

   ## Set this to gcc or cc, to your wishes, and everything should work out:
   CC=gcc

   ifeq($CC,gcc)
      CFLAGS1=-O2 -fpic 
   else
    ifeq($CC,cc)
       CFLAGS1=-O
    else
       error ...
    endif
   endif

   DEFINES=-DFOOBAR
   CFLAGS=$(CFLAGS1) $(DEFINES)

   and GNUmake can do all of this, but people don't do it.


Mime
View raw message