--- projects/cms/source/server/Makefile 2000/12/11 20:19:36 1.6.2.1 +++ projects/cms/source/server/Makefile 2003/02/16 20:35:59 1.35 @@ -1,53 +1,127 @@ # Makefile for server -# $Id: Makefile,v 1.6.2.1 2000/12/11 20:19:36 tdb Exp $ +# $Id: Makefile,v 1.35 2003/02/16 20:35:59 tdb Exp $ -IDL = idl/.madeidl +include Config.inc -all : buildidl code +.PHONY : all +all : dist -idl : $(IDL) -$(IDL) : idl/iscream.idl - cd idl && $(MAKE) idl +### Code Building -buildidl : $(IDL) idl - cd idl/uk/ac/ukc/iscream/clientinterface && javac -g:none -O -d ../../../../../../build *.java - cd idl/uk/ac/ukc/iscream/core && javac -g:none -O -d ../../../../../../build *.java - cd idl/uk/ac/ukc/iscream/filter && javac -g:none -O -d ../../../../../../build *.java +.PHONY : build +build : $(IDLCHECK) + cd uk/org/iscream/cms/server && $(MAKE) all + cp $(SOURCEROOT)/$(LICFILE) $(BUILD) + cd $(BUILD) && $(MAKE) package -code : - cd uk/ac/ukc/iscream && $(MAKE) all +### 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 "*.jar" >> TAR_EXCLUDE_TMP + echo ".done*" >> 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) -linkoffline $(JDUAPI) $(JDUAPIC) $(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 : cd idl && $(MAKE) clean - cd uk/ac/ukc/iscream && $(MAKE) clean - cd build && $(MAKE) clean + cd $(BUILD) && $(MAKE) clean ver=$(VERSION) + cd uk/org/iscream/cms/server && $(MAKE) clean + rm -f $(MCOMPILECHECK) $(JAVADOCCHECK) $(SRCCHECK) + rm -Rf $(DOCTMPDIR) -update : - cvs -q -d /usr/local/proj/co600_10/cvs update +.PHONY : distclean +distclean : clean + cd $(BUILD) && rm -f $(CLPATH) + rm -Rf $(APICACHE) + rm -f Config.inc -runclientinterface : - cd uk/ac/ukc/iscream/clientinterface && $(MAKE) all - cd build && java uk.ac.ukc.iscream.clientinterface.ClientInterfaceMain +### Database -runcore : - cd uk/ac/ukc/iscream/core && $(MAKE) all - cd build && java uk.ac.ukc.iscream.core.Core -l etc/default.properties +.PHONY : createtable +createtable : + cd db && $(MAKE) create -rundbinterface : - cd uk/ac/ukc/iscream/dbinterface && $(MAKE) all - cd build && java uk.ac.ukc.iscream.dbinterface.DBInterfaceMain +.PHONY : droptable +droptable : + cd db && $(MAKE) drop -runfiltermanager : - cd uk/ac/ukc/iscream/filtermanager && $(MAKE) all - cd build && java uk.ac.ukc.iscream.filtermanager.FilterManager +### Install -runrootfilter : - cd uk/ac/ukc/iscream/rootfilter && $(MAKE) all - cd build &&java uk.ac.ukc.iscream.rootfilter.RootFilterMain +.PHONY : install +install : $(MCOMPILECHECK) $(JAVADOCCHECK) $(CHANGELOG) + @echo "-------------------------------------------------------" + @echo "Installing to $(INSTALLPREFIX)" + @echo " copying $(PACKAGE) to $(INSTALLPREFIX)" + @mkdir -p $(INSTALLPREFIX) + @cp $(BUILD)/$(PACKAGE) $(INSTALLPREFIX) + @echo " copying libs to $(INSTALLPREFIX)/lib" + @mkdir -p $(INSTALLPREFIX)/lib + @cp $(LIBDIR)/*.jar $(INSTALLPREFIX)/lib + @echo " copying etc to $(INSTALLPREFIX)/etc" + @mkdir -p $(INSTALLPREFIX)/etc + @cp $(BUILD)/etc/default.properties $(INSTALLPREFIX)/etc + @cp $(BUILD)/etc/*.conf $(INSTALLPREFIX)/etc + @echo " copying scripts to $(INSTALLPREFIX)" + @cp $(BUILD)/run.sh $(INSTALLPREFIX) + @cp $(BUILD)/run.bat $(INSTALLPREFIX) + @echo " copying documention to $(INSTALLPREFIX)/doc" + @cp -R $(BUILD)/doc $(INSTALLPREFIX) + @echo " copying text information files to $(INSTALLPREFIX)" + @cp $(BUILD)/COPYING $(CHANGELOG) $(INSTALLPREFIX) + @echo "Completed install to $(INSTALLPREFIX)" + @echo "-------------------------------------------------------" -runfilter : - cd uk/ac/ukc/iscream/filter && $(MAKE) all - cd build && java uk.ac.ukc.iscream.filter.FilterMain $(NAME) +### Other -build : all - cd build && $(MAKE) package +.PHONY : run +run : $(MCOMPILECHECK) + cd $(BUILD) && ./run.sh + +### Global Include + +include $(MKINC)