--- projects/cms/source/server/Makefile 2002/02/09 17:04:33 1.24 +++ projects/cms/source/server/Makefile 2003/02/05 12:35:04 1.30 @@ -1,38 +1,105 @@ # Makefile for server -# $Id: Makefile,v 1.24 2002/02/09 17:04:33 tdb Exp $ +# $Id: Makefile,v 1.30 2003/02/05 12:35:04 tdb Exp $ include Config.inc -all : build +.PHONY : all +all : dist -genidl : - cd idl && $(MAKE) idl +### Code Building -buildidl : genidl - cd idl && $(MAKE) build - -code : genidl +.PHONY : build +build : $(IDLCHECK) cd uk/org/iscream/cms/server && $(MAKE) all + cd $(BUILD) && $(MAKE) package -build : buildidl code - cd build && $(MAKE) package +### Source, Doc, & Changelog -run : build - cd build && ./run.sh +.PHONY : src +src : $(SRCCHECK) +.PHONY : mksrc +mksrc : + if test ! -d "$(SRCDIR)"; then mkdir -p $(SRCDIR); fi + echo "CVS" > TAR_EXCLUDE_TMP + echo ".#*" >> TAR_EXCLUDE_TMP + echo "*.jar" >> TAR_EXCLUDE_TMP + echo ".done*" >> TAR_EXCLUDE_TMP + tar -cf - -X TAR_EXCLUDE_TMP $(SRCFILES) | ( cd $(SRCDIR) && tar -xf - ) + rm -f TAR_EXCLUDE_TMP + @touch $(SRCCHECK) + +.PHONY : javadoc +javadoc : $(JAVADOCCHECK) + +.PHONY : mkjavadoc +mkjavadoc : $(IDLCHECK) + if test ! -d "$(DOCDIR)"; then mkdir -p $(DOCDIR); fi + if test ! -d "$(DOCTMPDIR)"; then mkdir -p $(DOCTMPDIR); fi + cp -R $(SOURCEROOT)/uk $(DOCTMPDIR) + cp -R $(SOURCEROOT)/idl/uk $(DOCTMPDIR) + $(JAVADOCBIN) -d $(DOCDIR) -sourcepath $(DOCTMPDIR) -classpath $(JCCLASSPATH) -windowtitle $(JDTITLE) -author -version -private -use -header $(JDHEADER) -bottom $(JDBOTTOM) -linkoffline $(JDJAPI) $(JDJAPIC) -linkoffline $(JDPBAPI) $(JDPBAPIC) $(PKGLIST) + rm -Rf $(DOCTMPDIR) + @touch $(JAVADOCCHECK) + +.PHONY : changelog +changelog : $(CHANGELOG) + +.PHONY : mkchangelog +mkchangelog : + if [ -d $(SOURCEROOT)/CVS ]; then \ + $(CVS2CL) $(CVS2CLFLAGS) > $(CHANGELOG); \ + else \ + echo "Can't generate ChangeLog from non-checked out copy." > $(CHANGELOG); \ + fi + +### Dist Making + +.PHONY : dist +dist : + cd $(BUILD) && $(MAKE) dist dest=$(DISTDEST) + +.PHONY : dist-bin +dist-bin : + cd $(BUILD) && $(MAKE) dist-bin dest=$(DISTDEST) + +### Code Cleaning + +.PHONY : clean clean : cd idl && $(MAKE) clean - cd build && $(MAKE) clean + cd $(BUILD) && $(MAKE) clean ver=$(VERSION) cd uk/org/iscream/cms/server && $(MAKE) clean - rm -Rf $(BUILDCHECK) $(IDLCHECK) - rm -Rf $(CVSBUILDTEMP) - rm -Rf $(DOCDIR) $(DOCTMPDIR) + rm -f $(MCOMPILECHECK) $(JAVADOCCHECK) $(SRCCHECK) + rm -Rf $(DOCTMPDIR) +.PHONY : distclean distclean : clean cd $(BUILD) && rm -f $(CLPATH) + rm -Rf $(APICACHE) rm -f Config.inc -install : build +### Util Package + +.PHONY : buildutil +buildutil : clean + cd uk/org/iscream/cms/server/util && $(MAKE) all + cd $(BUILD) && $(MAKE) packageutil + +### Database + +.PHONY : createtable +createtable : + cd db && $(MAKE) create + +.PHONY : droptable +droptable : + cd db && $(MAKE) drop + +### Install + +.PHONY : install +install : $(MCOMPILECHECK) @echo "-------------------------------------------------------" @echo "Installing to $(INSTALL)" @echo " copying $(PACKAGE) to $(INSTALL)" @@ -51,31 +118,12 @@ install : build @echo "Completed install to $(INSTALL)" @echo "-------------------------------------------------------" -cvsbuild : - $(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP) $(CVSSERVERMODULE) - cd $(CVSBUILDTEMP) && ./configure - cd $(CVSBUILDTEMP) && $(MAKE) buildutil - cd $(CVSBUILDTEMP) && $(MAKE) build - cp $(CVSBUILDTEMP)/build/$(TARGZFILE) $(BUILD)/$(ARCNAME)-$(REVISION)$(TARGZEXT) - cp $(CVSBUILDTEMP)/build/$(ZIPFILE) $(BUILD)/$(ARCNAME)-$(REVISION)$(ZIPEXT) - cp $(CVSBUILDTEMP)/build/$(UTILPACKAGE) $(BUILD) +### Other -javadoc : genidl - if test ! -d "$(DOCDIR)"; then mkdir $(DOCDIR); fi - if test ! -d "$(DOCTMPDIR)"; then mkdir $(DOCTMPDIR); fi - cp -R $(SOURCEROOT)/uk $(SOURCEROOT)/$(DOCTMPDIR) - cp -R $(SOURCEROOT)/idl/uk $(SOURCEROOT)/$(DOCTMPDIR) - javadoc -d $(SOURCEROOT)/$(DOCDIR) -sourcepath $(SOURCEROOT)/$(DOCTMPDIR) -classpath $(JCCLASSPATH) -windowtitle $(JDTITLE) -author -version -private -use -header $(JDHEADER) -bottom $(JDBOTTOM) -link $(JDJAPI) -link $(JDPBAPI) $(PKGLIST) - rm -Rf doctemp +.PHONY : run +run : $(MCOMPILECHECK) + cd $(BUILD) && ./run.sh -buildutil : clean - cd uk/org/iscream/cms/server/util && $(MAKE) all - cd build && $(MAKE) packageutil - -createtable : - cd db && $(MAKE) create - -droptable : - cd db && $(MAKE) drop +### Global Include include $(MKINC)