>Are you suggesting that I could do something like this:
> find . -name \*.java -print | xargs jikes ++
The principle works fine for me, although you'll eventually hit a
command line argument length! The nice thing is you can probably make
a generic Java makefile that works with any code.
You can do the equivalent of most of the find in GNU make. I do this:
# A variable of all the directories I use. (Would be nice to do find)
JavaAutoDirs = . agents server agents/graphics
# First, the magic to make targets out of everything in JavaAutoDirs.
# Turn each directory in AutoMakeDirs into the pattern dirname/*.java
JavaAutoPatterns := $(foreach dir,$(JavaAutoDirs),$(dir)/*.java)
# Now glob out the pattern, so we get all the actual filenames.
JavaAutoSources := $(wildcard $(JavaAutoPatterns))
# Substitute .class for .java for the targets.
JavaAllAutoTargets := $(patsubst %.java,%.class,$(JavaAutoSources))
# And strip out any special cases
JavaAutoTargets := $(filter-out $(ExcludeClassFiles),$(JavaAllAutoTargets))
# Now, the actual list of targets that the rules will make.
# Construct the names of all the .class and .java files we need to make
AllClassFiles := $(JavaAutoTargets) $(OtherClassFiles)
AllJavaFiles := $(patsubst %.class,%.java,$(AllClassFiles))
# Finally, a monitor file we use for dependency to compile all files at once
BuiltMonitorFile := $(DESTDIR)/.built
# To compile all files at once, test a monitor vs. the java files
$(BuiltMonitorFile): $(AllJavaFiles)
$(JAVAC) $(JFLAGS) $(AllJavaFiles) && touch $(BuiltMonitorFile)
[EMAIL PROTECTED]
. . . . . . . . http://www.media.mit.edu/~nelson/
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]