[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No VM02 at KFest?
In article
<afea300a-3450-474f-87d5-625088f79512@m17g2000prl.googlegroups.com>,
DaveSchmenk <dschmenk@gmail.com> wrote:
> On Jul 24, 3:16 am, ol...@web.de (Oliver Schmidt) wrote:
> > Hi,
> >
> > >> And since it's Java it runs everywhere... Getting a GNU compatible
> > >> make on Windows used to be a PITA - might well still be for all I know
> > >MinGW and Cygwin?
> >
> > Check out the links at the bottom
> > of:http://www.cc65.org/snapshot-doc/make-3.html#ss3.3
> >
> > It's a native Win32 port of GNU make running (at least simple)
> > Makefile nicely from and with cmd.exe.
> >
> > At least from my perspective a _WAY_ easier approach than Ant...
>
> I should break up the makefile for VM02 into sub-project makefiles.
> Does ant allow recursive (or sub-project) calling of build files? My
> build file is just one step up from a batch file that compiles/
> assembles links and copies the result. Really a pain to maintain.
Ant [1] allows the definition of targets with dependencies. As an
example [2], the command `ant all` invokes target name="all", which
recursively invokes the dependent targets init, jars. etc.
Once you compile and link apple2/vm02.class, I think you can replace the
remaining build with `ant all` using something like this:
<project name="vm02" default="all" basedir=".">
<property name="relDir" value="../rel1"/>
<target name="init" description="Initialize">
<mkdir dir="${relDir}"/>
</target>
<target name="apple2" depends="init" description="Package apple2">
<javac srcdir="apple2" destdir="${relDir}" classpath=".">
<include name="**/*.java"/>
<exclude name="CVS/**"/>
</javac>
</target>
<target name="java" depends="init" description="Package java">
<javac srcdir="java" destdir="${relDir}" classpath=".">
<include name="**/*.java"/>
<exclude name="CVS/**"/>
</javac>
</target>
<target name="org" depends="init" description="Package org">
<javac srcdir="java" destdir="${relDir}" classpath=".">
<include name="**/*.java"/>
<exclude name="CVS/**"/>
</javac>
</target>
<target name="samples" depends="init" description="Package samples">
<javac srcdir="samples" destdir="${relDir}" classpath=".">
<include name="**/*.java"/>
<exclude name="CVS/**"/>
</javac>
</target>
<target name="all" depends="apple2,java,org,samples" description="All">
</target>
<target name="clean" depends="init" description="Clean">
<delete dir="${relDir}"/>
</target>
</project>
[1]<http://ant.apache.org/manual/index.html>
[2]<http://applecommander.cvs.sourceforge.net/viewvc/applecommander/Apple
Commander/build/build.xml?revision=1.15&view=markup>
[3]<http://ant.apache.org/manual/Tasks/javac.html>
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>