example of using ant to drive a gcj build

Adam Megacz gcj@lists.megacz.com
Thu Jan 9 10:34:00 GMT 2003


Andrew, thanks for taking the time to do this.

Don't worry about GCJHTask; it just invokes gcjh with a 'mkdir -p' and
some dependency checking; it would've been a one-liner in your
Makefile.

I'd like to retract anything I said about XML being more readable.
XML is only more readable if you're dealing with tree-structured data,
which build files generally aren't.  I was wrong about this.

I guess my gripes come down to two issues and one non-issue:

- I find shell commands (specifically, all the "magic" non-[A-Za-z0-9]
  characters) very unreadable.  Note that this is completely
  orthogonal to using XML or not.  I could envision a better make that
  didn't rely on the shell but still had a nice, simple, non-XML
  syntax.  That would be nice.  I wonder if the Python people have
  something like this...

- The "arguments" that make passes to the various steps of the build
  process keep getting concatenated into a string and then parsed back
  into a list.  This process also tends to assign special meaning to
  various characters (like the space character).  This makes me
  nervous.  I keep getting bitten by this; remembering to escape
  certain characters, (or double-escape them in backticks!) is really
  hard for me.

  Essentially, I want my build tool (and its command-execution
  language) to actually have a legitimate parser that distinguishes
  between identifiers and string literals, and maintains that
  distinction from end to end.

- The whole tab-vs-space thing, but everybody hates this, so it's not
  really worth talking about much, and emacs manages to kludge around
  this pretty well.

I should stop advocating ant.  I like the fact that ant doesn't have
special metacharacters, doesn't keep parsing/unparsing stuff, and
doesn't rely on the shell.  But in hindsight, it would probably have
been a better idea to create "make++" instead of ant.

I also think I need to learn more about make ;)

  - a



More information about the Java mailing list