--- projects/cms/source/server/Makefile 2001/02/28 11:46:42 1.18 +++ projects/cms/source/server/Makefile 2003/01/26 14:02:52 1.26 @@ -1,37 +1,98 @@ # Makefile for server -# $Id: Makefile,v 1.18 2001/02/28 11:46:42 tdb Exp $ +# $Id: Makefile,v 1.26 2003/01/26 14:02:52 tdb Exp $ include Config.inc -all : build +all : dist -genidl : +### Code Building + +genidl : $(IDLCHECK) +$(IDLCHECK) : cd idl && $(MAKE) idl buildidl : genidl cd idl && $(MAKE) build -code : genidl - cd uk/ac/ukc/iscream && $(MAKE) all +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 : $(SRCCHECK) +$(SRCCHECK) : + 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 + @touch $(SRCCHECK) +javadoc : $(JAVADOCCHECK) +$(JAVADOCCHECK) : $(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) + +changelog : $(CHANGELOG) +$(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 uk/ac/ukc/iscream && $(MAKE) clean - rm -Rf $(BUILDCHECK) $(IDLCHECK) - rm -Rf $(CVSBUILDTEMP) - rm -Rf doc doctemp + cd $(BUILD) && $(MAKE) clean ver=$(VERSION) + cd uk/org/iscream/cms/server && $(MAKE) clean + rm -f $(BUILDCHECK) $(IDLCHECK) $(JAVADOCCHECK) $(SRCCHECK) + rm -Rf $(CVSBUILDTEMP) $(DOCTMPDIR) distclean : clean cd $(BUILD) && rm -f $(CLPATH) + rm -Rf $(APICACHE) 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,25 +112,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 $(SERVERROOT)/uk $(SERVERROOT)/$(DOCTMPDIR) - cp -R $(SERVERROOT)/idl/uk $(SERVERROOT)/$(DOCTMPDIR) - javadoc -d $(SERVERROOT)/$(DOCDIR) -sourcepath $(SERVERROOT)/$(DOCTMPDIR) -classpath $(JCCLASSPATH) -author -version -private $(PKGLIST) - rm -Rf doctemp +run : build + cd $(BUILD) && ./run.sh -buildutil : clean - cd uk/ac/ukc/iscream/util && $(MAKE) all - cd build && $(MAKE) packageutil +### Global Include include $(MKINC)