--- projects/cms/source/conient/Makefile 2001/03/15 01:05:46 1.5 +++ projects/cms/source/conient/Makefile 2003/02/16 00:48:28 1.12 @@ -1,60 +1,109 @@ # Makefile for conient -# $Id: Makefile,v 1.5 2001/03/15 01:05:46 ajm Exp $ +# $Id: Makefile,v 1.12 2003/02/16 00:48:28 tdb Exp $ include Config.inc -all : build +.PHONY : all +all : dist -code : - cd uk/org/iscream && $(MAKE) all +### Code Building -build : code - cd build && $(MAKE) package +.PHONY : build +build : + cd uk/org/iscream/cms/conient && $(MAKE) all + cd $(BUILD) && $(MAKE) package -run : build - cd build && ./run.sh +### 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 : + if test ! -d "$(DOCDIR)"; then mkdir -p $(DOCDIR); fi + $(JAVADOCBIN) -d $(DOCDIR) -sourcepath $(SOURCEROOT) -classpath $(JCCLASSPATH) -windowtitle $(JDTITLE) -author -version -private -use -header $(JDHEADER) -bottom $(JDBOTTOM) -linkoffline $(JDJAPI) $(JDJAPIC) -linkoffline $(JDUAPI) $(JDUAPIC) $(PKGLIST) + @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 build && $(MAKE) clean - cd uk/org/iscream && $(MAKE) clean - rm -Rf $(BUILDCHECK) - rm -Rf $(CVSBUILDTEMP) - rm -Rf doc + cd $(BUILD) && $(MAKE) clean ver=$(VERSION) + cd uk/org/iscream/cms/conient && $(MAKE) clean + rm -f $(MCOMPILECHECK) $(JAVADOCCHECK) $(SRCCHECK) +.PHONY : distclean distclean : clean cd $(BUILD) && rm -f $(CLPATH) + rm -Rf $(APICACHE) rm -f Config.inc -install : build +### Install + +.PHONY : install +install : $(MCOMPILECHECK) $(JAVADOCCHECK) $(CHANGELOG) @echo "-------------------------------------------------------" - @echo "Installing to $(INSTALL)" - @echo " copying $(PACKAGE) to $(INSTALL)" - mkdir -p $(INSTALL) - cp $(BUILD)/$(PACKAGE) $(INSTALL) - @echo " copying configuration to $(INSTALL)/etc - mkdir -p $(INSTALL)/etc - cp $(ETCDIR)/*.conf $(INSTALL)/etc - @echo " copying resources to $(INSTALL)/resources - mkdir -p $(INSTALL)/resources - cp $(RESOURCESDIR)/*.gif $(INSTALL/resources - @echo " copying libs to $(INSTALL)/lib" - mkdir -p $(INSTALL)/lib - cp $(LIBDIR)/*.jar $(INSTALL)/lib - @echo " copying scripts to $(INSTALL)" - cp $(BUILD)/run.sh $(INSTALL) - cp $(BUILD)/run.bat $(INSTALL) - @echo "Completed install to $(INSTALL)" + @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/*.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 "-------------------------------------------------------" -cvsbuild : - $(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP) $(CVSMODULE) - cd $(CVSBUILDTEMP) && ./configure - cd $(CVSBUILDTEMP) && $(MAKE) build - cp $(CVSBUILDTEMP)/build/$(TARGZFILE) $(BUILD)/$(ARCNAME)-$(REVISION)$(TARGZEXT) - cp $(CVSBUILDTEMP)/build/$(ZIPFILE) $(BUILD)/$(ARCNAME)-$(REVISION)$(ZIPEXT) +### Other -javadoc : - if test ! -d "$(DOCDIR)"; then mkdir $(DOCDIR); fi - javadoc -d $(SOURCEROOT)/$(DOCDIR) -sourcepath $(SOURCEROOT) -classpath $(JCCLASSPATH) -author -version -private $(PKGLIST) +.PHONY : run +run : $(MCOMPILECHECK) + cd $(BUILD) && ./run.sh + +### Global Include include $(MKINC)