################################################################################ # Makefile # # N.B. You will need GNU make to use this make file. ################################################################################ ################################################################################ # Targets: # # - jar = creates the jar archive with the Java binary code. # # - javadoc = creates the javadoc API documentation # # - clean = clears the distribution # # - dist = creates the distribution # ################################################################################ ################################################################################ # Common definitions. Edit these settings for your site. # # JAVAC : the java compiler # JAVACOPTS : the java compiler options # JAVADOC : the javadoc program # JAVADOCOPT : the javadoc program options # JAR : the jar program # BINDIR : the directory where the cocoon.jar file goes when compiled # DOCDIR : the directory where the javadoc generated doc files go ################################################################################ JAVAC = javac #turn on debugging for BETA version #JAVACOPTS = -O -g:none JAVACOPTS = -g BINDIR = ../../bin ################################################################################ # You should not need to change anything below here. ################################################################################ NAME = JetSpeed VERSION = 1.0b1 PACKAGES = \ $(BASE) \ $(BASE).messaging \ BASE = org.apache.jetspeed MANIFEST = MANIFEST LOG = make.log DISTDIR = ../../ DISTBASEFILE = $(NAME)$(VERSION) DISTFILE = $(DISTBASEFILE).tar.gz JAR = jar DOCDIR = ../../docs/api JAVADOC = javadoc JAVADOCOPTS = -d $(DOCDIR) -use -author -version -private WINDOWTITLE = """JetSpeed API Specification""" BOTTOM = "Copyright 1999 Java Apache Project. All Rights Reserved." STYLESHEET = "../docs/stylesheet.css" DIRECTORIES = $(subst .,/,$(PACKAGES)) BASEDIRECTORY = $(subst .,/,$(BASE)) ALLSOURCES = $(foreach dir,$(DIRECTORIES),$(wildcard $(dir)/*.java)) .PHONY : jar javadoc clean dist jar: @echo @echo Creating $(NAME).jar package... @test -d classes || mkdir classes @echo compiling $(NAME) using "$(JAVAC) $(JAVACOPTS)" @$(JAVAC) $(JAVACOPTS) -d classes $(ALLSOURCES) 2> $(LOG) @echo building package $(NAME).jar @(cd classes; $(JAR) cf ../$(NAME).jar .) @echo moving $(NAME).jar into $(BINDIR) @test -d $(BINDIR) || mkdir $(BINDIR) @mv $(NAME).jar $(BINDIR)/$(NAME).jar javadoc: @echo @echo Building API documentation using "$(JAVADOC) $(JAVADOCOPTS)" @test -d $(DOCDIR) || mkdir $(DOCDIR) @echo creating the docs using $(JAVADOC) @$(JAVADOC) $(JAVADOCOPTS) $(PACKAGES) 2>> $(LOG) clean: @echo @echo Cleaning up the distribution... @rm -rf temp classes $(LOG) $(DOCDIR) $(BINDIR)/$(NAME).jar $(NAME)_$(VERSION).jar @rm -rf $(DOCDIR) #todo... remove the make.log #@rm make.log dist: clean jar javadoc @echo @echo Creating the $(NAME) distribution... @echo Creating the $(NAME) distribution as $(DISTFILE) @cd $(DISTDIR);tar c * > $(DISTBASEFILE).tar;gzip -c $(DISTBASEFILE).tar > $(DISTFILE);rm $(DISTBASEFILE).tar @echo @echo Done. test: @echo NAME: $(NAME) @echo BASE: $(BASE) @echo BINDIR: $(BINDIR) @echo LOG: $(LOG) @echo JAR: $(JAR) @echo JAVADOC: $(JAVADOC) @echo DIRECTORIES: $(DIRECTORIES) @echo ALLSOURCES: $(ALLSOURCES)