--- projects/cms/source/server/Makefile 2000/12/13 17:59:21 1.6.2.9 +++ projects/cms/source/server/Makefile 2003/01/26 14:02:52 1.26 @@ -1,36 +1,98 @@ # Makefile for server -# $Id: Makefile,v 1.6.2.9 2000/12/13 17:59:21 tdb Exp $ +# $Id: Makefile,v 1.26 2003/01/26 14:02:52 tdb Exp $ include Config.inc -all : build +all : dist -idl : +### Code Building + +genidl : $(IDLCHECK) +$(IDLCHECK) : cd idl && $(MAKE) idl -buildidl : idl +buildidl : genidl cd idl && $(MAKE) build -code : buildidl - cd uk/ac/ukc/iscream && $(MAKE) all +build : buildidl + cd uk/org/iscream/cms/server && $(MAKE) all + cd $(BUILD) && $(MAKE) package -build : code - cd build && $(MAKE) package +### Source, Doc, & Changelog -run : build - cd build && java -jar iscream.jar +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) + 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 - rm -f $(CLPATH) + 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)" @@ -44,14 +106,17 @@ install : build mkdir -p $(INSTALL)/etc cp $(BUILD)/etc/default.properties $(INSTALL)/etc cp $(BUILD)/etc/*.conf $(INSTALL)/etc + @echo " copying scripts to $(INSTALL)" + cp $(BUILD)/run.sh $(INSTALL) + cp $(BUILD)/run.bat $(INSTALL) @echo "Completed install to $(INSTALL)" @echo "-------------------------------------------------------" -cvsbuild : - cvs -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP) $(CVSSERVERMODULE) - cd $(CVSBUILDTEMP) && ./configure - cd $(CVSBUILDTEMP) && $(MAKE) build - cp $(CVSBUILDTEMP)/build/$(TARGZFILE) $(BUILD)/$(ARCNAME)-$(REVISION)$(TARGZEXT) - cp $(CVSBUILDTEMP)/build/$(ZIPFILE) $(BUILD)/$(ARCNAME)-$(REVISION)$(ZIPEXT) +### Other + +run : build + cd $(BUILD) && ./run.sh + +### Global Include include $(MKINC)