--- projects/cms/source/server/Makefile 2001/05/29 17:02:24 1.23 +++ projects/cms/source/server/Makefile 2002/06/07 16:12:47 1.25 @@ -1,37 +1,93 @@ # Makefile for server -# $Id: Makefile,v 1.23 2001/05/29 17:02:24 tdb Exp $ +# $Id: Makefile,v 1.25 2002/06/07 16:12:47 tdb Exp $ include Config.inc -all : build +all : dist +### Code Building + genidl : cd idl && $(MAKE) idl buildidl : genidl cd idl && $(MAKE) build -code : genidl +build : buildidl 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 +src : + if test ! -d "$(SRCDIR)"; then mkdir -p $(SRCDIR); fi + echo "CVS" > TAR_EXCLUDE_TMP + echo ".#*" >> TAR_EXCLUDE_TMP + tar -cf - -X TAR_EXCLUDE_TMP $(SRCFILES) | ( cd $(SRCDIR) && tar -xf - ) + rm -f TAR_EXCLUDE_TMP +javadoc : genidl + 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) -link $(JDJAPI) -link $(JDPBAPI) $(PKGLIST) + rm -Rf $(DOCTMPDIR) + +changelog : + $(CVS2CL) $(CVS2CLFLAGS) > $(CHANGELOG) + +### Dist Making + +dist : build src javadoc changelog + cd $(BUILD) && $(MAKE) dist ver=$(VERSION) dest=$(DISTDEST) + +dist-bin : build changelog + cd $(BUILD) && $(MAKE) dist-bin ver=$(VERSION) dest=$(DISTDEST) + +### CVS Magic :) + +cvs-dist : + $(CVS) -d $(CVSROOT) export -r $(CVSTAG) -d $(CVSBUILDTEMP) $(CVSSERVERMODULE) + cd $(CVSBUILDTEMP) && ./configure + cd $(CVSBUILDTEMP) && $(MAKE) dist ver=$(VERSION) dest=$(DISTDEST) + +cvs-dist-bin : + $(CVS) -d $(CVSROOT) export -r $(CVSTAG) -d $(CVSBUILDTEMP) $(CVSSERVERMODULE) + cd $(CVSBUILDTEMP) && ./configure + cd $(CVSBUILDTEMP) && $(MAKE) dist-bin ver=$(VERSION) dest=$(DISTDEST) + +### Code Cleaning + 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 -Rf $(SRCDIR) distclean : clean cd $(BUILD) && rm -f $(CLPATH) rm -f Config.inc +### Util Package + +buildutil : clean + cd uk/org/iscream/cms/server/util && $(MAKE) all + cd $(BUILD) && $(MAKE) packageutil + +### Database + +createtable : + cd db && $(MAKE) create + +droptable : + cd db && $(MAKE) drop + +### Install + install : build @echo "-------------------------------------------------------" @echo "Installing to $(INSTALL)" @@ -51,31 +107,11 @@ 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 -header $(JDHEADER) $(PKGLIST) - rm -Rf doctemp +run : build + 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)