RESOURCES = skeletons/*.xml sounds/*.wav icons/*.gif icons/*.jpg data/*.txt LAUNCH4J = launch4j JFLEX = jflex ORO = jakarta-oro-2.0.8.jar XMLRPC = xmlrpc-1.2-b1.jar LIBJARS = xalan.jar xerces.jar xml-apis.jar $(ORO) $(XMLRPC) JARS = $(LIBJARS) arboreal.jar VERSION = 5.21 ifndef JAVAC JAVAC = javac endif CLASSES = ArabicKeyTypedAction.class ArabicLex.class ArabicRomanLex.class \ ArabicVoweledLex.class BetaCodeTranslitLex.class BuckwalterLex.class \ BuckwalterUnicodeLex.class GreekLex.class GreekTranslitLex.class \ CDLILex.class AppleQuitHandler.class Amalgamation.class \ ArabicRomanKeyTypedAction.class ArborAgent.class ArborApplet.class \ ArborApplication.class ArborAuthenticator.class ArborFrame.class \ ArborKeyTypedAction.class ArborPIHandler.class ArborPanel.class \ ArborXSLUtils.class AsyncStyledEditorKit.class \ AutoCompleteChooser.class AutoscrollingList.class BetaCode.class \ BoxHighlightPainter.class BrowserLauncher.class CDLILex.class \ Catalog.class Colorizable.class CommonGUI.class CompatURLEncoder.class \ ContentFrame.class ContentOwner.class ContentPaneDropTarget.class \ ContentRenderPane.class ContentUpdateEvent.class \ ContentUpdateListener.class CreationException.class \ CustomXMLSerializer.class DOMOutputInstruction.class \ DOMParserWrapper.class DOMTextOffset.class DOMTreeCellRenderer.class \ DOMTreeModel.class DictCapabilities.class DictFormatter.class \ DictTool.class DisplayFilter.class DocSpec.class DocSpecManager.class \ DonatusClient.class Encoder.class EntityHelper.class \ EntitizedXMLSerializer.class ExplicitWordTokenizer.class \ ExtensionFileFilter.class GenericListCellRenderer.class \ GenericParseException.class GreekKeyTypedAction.class Hanzi.class \ HighlightState.class IllegalEditException.class ImageComponent.class \ ImageFrame.class InternalException.class KeyboardHandler.class \ Language.class LanguageManager.class LemmaListCellRenderer.class \ LemmatizedSearchCompiler.class Lex.class LexException.class LexS.class \ LinkDragSource.class LinkPartHandler.class LinkTool.class \ LinkTransferable.class LinkedText.class MappingParseException.class \ Message.class Message_en.class MorphIdentification.class \ MorphologyTool.class MultipleViews.class NodeOffset.class \ OrthographicRules.class PageLinkTable.class Pinyin.class \ PluggableFilter.class PropertiesEditor.class QChooser.class \ QueryTable.class Range.class RectangleEvent.class \ RectangleListener.class SAXParserWrapper.class SaturationEvent.class \ SaturationListener.class SaturationMeter.class ScriptInstaller.class \ SearchTool.class Serializer.class ShadeHighlightPainter.class \ SlaveText.class Sorter.class Span.class SuperAmalgamation.class \ SwingWorker.class TabWriter.class TermFreqPair.class TermInfo.class \ TermFrame.class TermListCellRenderer.class TermListHandler.class \ TermManager.class TermTool.class TermToolDropTarget.class \ TermTransPair.class TextComponentDropTarget.class TextManager.class \ TextMapping.class TextParseException.class TreeCellRenderCache.class \ TreeNodeView.class UndoState.class WindowManager.class \ WordTagger.class WordTokenTable.class XLink.class \ XMLParseErrorHandler.class XMLProperties.class XSLTransformer.class WTAG_CLASSES = Amalgamation.class ArborAgent.class ArborApplet.class \ ArborPanel.class ArborPIHandler.class Catalog.class CommonGUI.class \ ContentOwner.class CustomXMLSerializer.class DOMParserWrapper.class \ DocSpec.class DocSpecManager.class Encoder.class \ EntitizedXMLSerializer.class EntityHelper.class \ ExtensionFileFilter.class GenericParseException.class Language.class \ LanguageManager.class Lex.class LexException.class LexS.class \ LinkedText.class MultipleViews.class Message.class \ OrthographicRules.class PluggableFilter.class QChooser.class \ SAXParserWrapper.class Serializer.class TabWriter.class \ TextManager.class WordTagger.class WTag.class \ XMLParseErrorHandler.class XMLProperties.class EXTRA_WTAG_CLASSES = 'DOMParserWrapper$$1.class' \ 'DocSpec$$PseudoElement.class' \ 'DocSpec$$RenderDesc.class' 'DocSpec$$Affix.class' \ 'DocSpec$$Prefix.class' 'DocSpec$$Suffix.class' \ 'PropertiesEditor$$FixedSizeLabel.class' \ 'PropertiesEditor$$FixedSizePanel.class' CLASSPATH = -classpath xerces.jar:xalan.jar:xml-apis.jar:$(XMLRPC):$(ORO):. JAVADOC_OPTIONS = -version -author -windowtitle "Arboreal $(VERSION)" APPCONTENTS = Arboreal.app/Contents OSTYPE := $(shell uname) ifeq ($(findstring Darwin,$(OSTYPE)),Darwin) APPLEQUITHANDLER = apple/AppleQuitHandler.java else APPLEQUITHANDLER = AppleQuitHandler.java endif .SUFFIXES : .java .class ArabicRomanLex.java : arabic-roman.lex ${JFLEX} arabic-roman.lex ArabicLex.java : arabic.lex ${JFLEX} arabic.lex ArabicVoweledLex.java : arabic-voweled.lex ${JFLEX} arabic-voweled.lex BetaCodeTranslitLex.java : betacode-translit.lex ${JFLEX} betacode-translit.lex BuckwalterLex.java : buckwalter.lex ${JFLEX} buckwalter.lex BuckwalterUnicodeLex.java : buckwalter-unicode.lex ${JFLEX} buckwalter-unicode.lex CDLILex.java : cdli.lex ${JFLEX} cdli.lex GreekLex.java : greek.lex ${JFLEX} greek.lex GreekTranslitLex.java : greek-translit.lex ${JFLEX} greek-translit.lex ArborApplication.java : Makefile sh setversion.sh ${VERSION} AppleQuitHandler.class : ${APPLEQUITHANDLER} ifeq ($(findstring Darwin,$(OSTYPE)),Darwin) ${JAVAC} ${CLASSPATH} ${JAVAFLAGS} ${APPLEQUITHANDLER}; \ mv apple/*.class . else ${JAVAC} ${CLASSPATH} ${JAVAFLAGS} ${APPLEQUITHANDLER} endif arboreal.jar : ${CLASSES} ${RESOURCES} arboreal-manifest.mf jar cvmf arboreal-manifest.mf $@ *.class ${RESOURCES} wtag.jar : ${WTAG_CLASSES} wtag-manifest.mf skeletons/docspecs.xml jar cvmf wtag-manifest.mf $@ ${WTAG_CLASSES} ${EXTRA_WTAG_CLASSES} \ skeletons/docspecs.xml .java.class : ${JAVAC} ${CLASSPATH} ${JAVAFLAGS} $< arboreal-manifest.mf : Makefile echo > $@ "Manifest-Version: 1.0"; \ echo >> $@ "Main-Class: ArborApplication"; \ echo >> $@ "Class-Path: xerces.jar xalan.jar xml-apis.jar $(XMLRPC) $(ORO)" wtag-manifest.mf : Makefile echo > $@ "Manifest-Version: 1.0"; \ echo >> $@ "Main-Class: WTag"; \ echo >> $@ "Class-Path: xerces.jar xalan.jar xml-apis.jar" Arboreal.app : $(JARS) osx-bundle.tar.gz ifneq ($(findstring Darwin,$(OSTYPE)),Darwin) @echo Can only build target on Darwin. false endif tar xvzf osx-bundle.tar.gz touch Arboreal.app cp -p $(JARS) $(APPCONTENTS)/Resources/Java arboreal-win.zip : $(JARS) arboreal.exe mkdir build-win; \ mkdir build-win/arboreal; \ cp arboreal.exe $(LIBJARS) build-win/arboreal; \ pushd build-win; \ zip $@ arboreal/*; \ popd; \ mv build-win/$@ .; \ rm -r build-win arboreal.exe : arboreal.jar arboreal-win-wrapper.xml $(LAUNCH4J) "$(PWD)/arboreal-win-wrapper.xml" javadoc : [ -d apiDocs ] || mkdir apiDocs javadoc $(CLASSPATH) $(JAVADOC_OPTIONS) -d apiDocs *.java clean : rm -f *.class apple/*.class *.mf arboreal.jar wtag.jar \ arboreal.exe arboreal-win.zip rm -rf Arboreal.app reallyclean : rm -f *.class apple/*.class *.mf arboreal.jar wtag.jar \ arboreal.exe arboreal-win.zip rm -f ?*Lex.java ?*Lex.java~ rm -rf Arboreal.app