From: Ken A. <kan...@bb...> - 2002-12-13 01:09:27
|
The discussion about ANT made me write some code that i've been meaning to write for some time. JScheme has a new using/ directory which i hope will contain several real examples of using JScheme in a Java application. The first example is run.scm which provides a mini language for invoking external Processes and doing things like building Java applications portably. Here a link: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jscheme/jscheme/src/using/run.scm?rev=1.1&content-type=text/vnd.viewcvs-markup Actually, if you download the source it should be viewable in your browser as well as executable, though it is JDK 1.4 dependant, so it is its own Javadoc. It isn't, yet, as capable as ant, but with a little more work i think it should be able to build your Java application. Let me know what's missing. While JScheme builds itself now, i'm hoping it will use this stuff in the future. Its implementation and documentation (~ 350) is about a third larger than the number of ant classes (~ 260). The truth will be if you can get your application building in under two days, or at least tell me what additional capabilites you need. There are some loose ends. For example, (files* directory type?) will return the files in directory that satisfy type?. Currently, these files are absolute and there is (rfiles*) to get relative to the directory. You can also relativize files to a higher level directory. I've been away from UNIX long enough to not remember what guidance it might have in this regard. I also hack over a windows PATH issue to get to cygwin people might be to provide better solutions too. Don't get me wrong, ant fills an important roll of being a portable build facility for a portable language. It's just nice when tools are useful, and small (easy to use and understand). I didn't know about jmake, i'll check it out. One important difference between ant and make is that make has 2 languages, a constraint language and a shell language to implement the update when the constraint is old. So if you know the shell interface to the commands you want to use, you only need to learn the constraint language (oh ya, whitespace is significant!). In ant, constraints are expressed in XML, and the update i also expressed as XML so knowing the shell invocation doesn't help, you have to read the documentation. k At 04:43 AM 12/10/2002, Andrew McDermott wrote: >Ken Anderson <kan...@bb...> writes: > >[...] > >>>Also, is src/build/bootstrap the only way (right way) to build the code? >>>I had to compile BacktraceException.java by hand and then run bootstrap >>>to re-build the jar file, but that somehow feels wrong. Has the project >>>considered Ant (http://jakarta.apache.org/ant/) as a build tool? >> >> I'm going to let you tickle a hot button. I don't mean to offend you, >> or anyone who uses ant. I'd like to start an honest discussion. To >> my mind, ant represents a BIG answer to the problem of make, just as >> JAVACC, or Lex (is there a Java version?) provide a BIG answer to >> parsing and lexing. I'm interested in smaller answers that are almost >> as capable that i can remember enough of that i don't have to go to >> the documentation. This makes me feel like i have more tools in my >> pocket, which feels better to me than going out and buying another >> book and reading for a while before i get the code i need. > >I can understand this a lot. I held off using ant for our internal >build mechanism (but for far too long). The initial learning curve >appeared to be *just* too big. However, about 4 months ago I bit the >bullet, and you know what, it took me about two full days to get >everything done. Period. Since then adding incremental changes has >been really easy. I really wish I hadn't deliberated on the decision to >switch for so long. > >So, despite the learning curve I would say it's worth the effort. The >payoff's get bigger the more you use it. I recently tried using >javamake (which has ant integration). This involved adding an >additional 1-liner to my build.xml, duplicating my compile task to use >javamake, and that was it. That's nice and simple integration, and >there have been a few other examples like this. But of course this only >works because folk are1 targeting ant. > >> What fells wrong about bootstrap? We build the .jar file and run unit > >Nothing per-se. But if I take a c/c++ tarball from the net, I pretty >much expect the following to work: ./configure; make; make install. >Most of the time I don't even read either the INSTALL or README files -- >I just expect this to be the de facto process. In the Java space I >believe ant is becoming the de facto build process. It would be nice if >you could download the latest+greatest jscheme and just type ant to get >a full build... > >Just my 2 cents... > >-- >andy |