--- projects/cms/source/server/Makefile 2000/11/14 02:41:04 1.1 +++ projects/cms/source/server/Makefile 2003/02/02 19:25:21 1.28 @@ -1,21 +1,128 @@ # Makefile for server -# $Id: Makefile,v 1.1 2000/11/14 02:41:04 tdb Exp $ +# $Id: Makefile,v 1.28 2003/02/02 19:25:21 tdb Exp $ -all : idl core filter +include Config.inc -core : - cd CORE && $(MAKE) +.PHONY : all +all : dist -filter : - cd Filter && $(MAKE) +### Code Building -idl : iscream.idl - idl iscream.idl - @touch .madeidl +.PHONY : build +build : $(IDLCHECK) + cd uk/org/iscream/cms/server && $(MAKE) all + cd $(BUILD) && $(MAKE) package +### Source, Doc, & Changelog + +.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 "build/lib/*.jar" >> 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 : - rm -Rf uk - rm -f .madeidl - cd CORE && $(MAKE) clean - cd Filter && $(MAKE) clean + cd idl && $(MAKE) clean + cd $(BUILD) && $(MAKE) clean ver=$(VERSION) + cd uk/org/iscream/cms/server && $(MAKE) clean + rm -f $(MCOMPILECHECK) $(JAVADOCCHECK) $(SRCCHECK) + rm -Rf $(DOCTMPDIR) +.PHONY : distclean +distclean : clean + cd $(BUILD) && rm -f $(CLPATH) + rm -Rf $(APICACHE) + rm -f Config.inc + +### 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)" + 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 + +.PHONY : run +run : $(MCOMPILECHECK) + cd $(BUILD) && ./run.sh + +### Global Include + +include $(MKINC)