--- projects/cms/source/server/Makefile 2000/12/12 01:59:34 1.6.2.4 +++ projects/cms/source/server/Makefile 2003/01/26 14:02:52 1.26 @@ -1,29 +1,122 @@ # Makefile for server -# $Id: Makefile,v 1.6.2.4 2000/12/12 01:59:34 tdb Exp $ +# $Id: Makefile,v 1.26 2003/01/26 14:02:52 tdb Exp $ include Config.inc -all : buildidl code build +all : dist -idl : $(IDL) -$(IDL) : idl/iscream.idl +### Code Building + +genidl : $(IDLCHECK) +$(IDLCHECK) : cd idl && $(MAKE) idl -buildidl : $(IDL) idl +buildidl : genidl cd idl && $(MAKE) build -code : - cd uk/ac/ukc/iscream && $(MAKE) all +build : buildidl + cd uk/org/iscream/cms/server && $(MAKE) all + cd $(BUILD) && $(MAKE) package +### Source, Doc, & Changelog + +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 - rm -Rf $(BUILDCHECK) $(IDLCHECK) + 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)" + @echo " copying $(PACKAGE) to $(INSTALL)" + mkdir -p $(INSTALL) + cp $(BUILD)/$(PACKAGE) $(INSTALL) + @echo " copying libs to $(INSTALL)/lib" + mkdir -p $(INSTALL)/lib + cp $(LIBDIR)/*.jar $(INSTALL)/lib + @echo " copying etc to $(INSTALL)/etc" + 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 "-------------------------------------------------------" + +### Other + run : build - cd build && java -jar iscream.jar + cd $(BUILD) && ./run.sh -build : - cd build && $(MAKE) package +### Global Include include $(MKINC)