CLASSPATH=../../.. SOURCEPATH=../../.. JFLAGS=-classpath $(CLASSPATH) JDFLAGS=-classpath $(CLASSPATH) -sourcepath $(SOURCEPATH) JAVAC=javac1.4 $(JFLAGS) OPTIMIZE=-g:none JAVA=java1.4 $(JFLAGS) JAVADOC=javadoc1.4 $(JDFLAGS) CVS=cvs -q BTE=bte ANT=classic-ant .SUFFIXES: .SUFFIXES: .lex .java .SUFFIXES: .java .class all: @$(MAKE) -s --no-print-directory junkclean @$(MAKE) -s --no-print-directory spell @$(MAKE) -s --no-print-directory neaten @$(MAKE) -s --no-print-directory compile @$(MAKE) -s --no-print-directory build @$(MAKE) -s --no-print-directory javadoc @$(MAKE) -s --no-print-directory htmlfiles @$(MAKE) -s --no-print-directory htmlsource spell: *.bte *.java @echo Make: Running spell check.$? @./spell.sh $? @touch spell .PHONY : compile compile: javafiles classes neaten: *.java @./neaten.sh $? @touch neaten .PHONY: htmlfiles htmlfiles: *.bte @echo Make: Compiling web pages. @bte . .PHONY: htmlfilesclean htmlfilesclean: @echo Make: Removing generated html files. @rm -f `ls *.html | grep -v package` LEXFILES=$(wildcard *.lex) .PHONY: javafiles javafiles: $(LEXFILES:.lex=.java) @# Write a bash script that will compile the files in the todo list @echo "#!/bin/bash" > tempCommand @# If the todo list doesn't exist, don't compile anything @echo "if [ -e tempChangedLexFileList ]" >> tempCommand @echo "then" >> tempCommand @# Make sure each file is only on the todo list once. @echo "sort tempChangedLexFileList | uniq > tempChangedLexFileListUniq" >> tempCommand @echo "FILES=\`cat tempChangedLexFileListUniq\`" >> tempCommand @# Compile the files. @echo "echo Make: Compiling: $$ FILES" >> tempCommand @echo "$(JLEX) $$ FILES" >> tempCommand @echo "for file in $$ FILES" >> tempCommand @echo "do" >> tempCommand @# Each generated java file needs to be compiled by the java compiler. @echo "echo \"$$ {file%.lex}.java\" >> tempChangedJavaFileList" >> tempCommand @echo "done" >> tempCommand @echo "fi" >> tempCommand @# Remove extra spaces in the script that follow the dollar signs. @sed "s/\$$ /\$$/" tempCommand > tempCommand.sh @# Make the script executable. @chmod +x tempCommand.sh @# Call the script @./tempCommand.sh @rm -f tempCommand tempCommand.sh tempChangedLexFileList tempChangedLexFileListUniq *~ .lex.java: @#for each changed lex file, add it to the todo list. @echo "$<" >> tempChangedLexFileList .PHONY: javafilesclean javafilesclean: @echo Make: Removing generated java files. @rm -f *Lexer.java JAVAFILES=$(wildcard *.java) .PHONY: classes classes: javafiles $(JAVAFILES:.java=.class) @# Write a bash script that will compile the files in the todo list @echo "#!/bin/bash" > tempCommand @# If the todo list doesn't exist, don't compile anything @echo "if [ -e tempChangedJavaFileList ]" >> tempCommand @echo "then" >> tempCommand @# Make sure each file is only on the todo list once. @echo "sort tempChangedJavaFileList | uniq > tempChangedJavaFileListUniq" >> tempCommand @echo "FILES=\`cat tempChangedJavaFileListUniq\`" >> tempCommand @# Compile the files. @echo "echo Make: Compiling: $$ FILES" >> tempCommand @echo "$(JAVAC) $$ FILES" >> tempCommand @echo "fi" >> tempCommand @# Remove extra spaces in the script that follow the dollar signs. @sed "s/\$$ /\$$/" tempCommand > tempCommand.sh @# Make the script executable. @chmod +x tempCommand.sh @# Call the script @./tempCommand.sh @rm -f tempCommand tempCommand.sh tempChangedJavaFileList tempChangedJavaFileListUniq .java.class: @#for each changed java file, add it to the todo list. @echo "$<" >> tempChangedJavaFileList .PHONY: classesclean classesclean: junkclean @echo Make: Removing generated class files @rm -f *.class .PHONY: junkclean junkclean: @echo Make: Removing utilites detritus. @rm -rf *~ ~* temp* utils_*.jar out.txt *.bak CSVTest.txt CircularBufferTestResults.txt com/ gnu/ srcbuild/ .PHONY: buildclean buildclean: junkclean @echo Make: Removing generated jar files. @rm -f utils.jar randpass.jar .PHONY: javadocclean javadocclean: junkclean @echo Make: Removing generated documentation. @rm -rf doc/ javadoc .PHONY: htmlsourceclean htmlsourceclean: junkclean @echo Make: Removing generated html source. @rm -rf src/ htmlsource .PHONY: clean clean: buildclean javadocclean htmlsourceclean htmlfilesclean @echo Make: Removing generated class files. @rm -f *.class .PHONY: allclean allclean: clean javafilesclean @echo Make: Removing all files not in CVS. @rm -rf neaten spell release javadoc htmlsource src/ .PHONY: cleanall cleanall: allclean javadoc: *.java @echo Make: Generating javadoc @rm -rf doc @mkdir doc @$(JAVADOC) \ -bottom '
Copyright (c) 2001-2004 by Stephen Ostermiller
' \ -header "