--- projects/cms/source/server/Makefile 2003/01/26 14:02:52 1.26 +++ projects/cms/source/server/Makefile 2003/02/01 19:08:54 1.27 @@ -1,27 +1,25 @@ # Makefile for server -# $Id: Makefile,v 1.26 2003/01/26 14:02:52 tdb Exp $ +# $Id: Makefile,v 1.27 2003/02/01 19:08:54 tdb Exp $ include Config.inc +.PHONY : all all : dist ### Code Building -genidl : $(IDLCHECK) -$(IDLCHECK) : - cd idl && $(MAKE) idl - -buildidl : genidl - cd idl && $(MAKE) build - -build : buildidl +.PHONY : build +build : $(IDLCHECK) cd uk/org/iscream/cms/server && $(MAKE) all cd $(BUILD) && $(MAKE) package ### Source, Doc, & Changelog +.PHONY : src src : $(SRCCHECK) -$(SRCCHECK) : + +.PHONY : mksrc +mksrc : if test ! -d "$(SRCDIR)"; then mkdir -p $(SRCDIR); fi echo "CVS" > TAR_EXCLUDE_TMP echo ".#*" >> TAR_EXCLUDE_TMP @@ -29,8 +27,11 @@ $(SRCCHECK) : rm -f TAR_EXCLUDE_TMP @touch $(SRCCHECK) +.PHONY : javadoc javadoc : $(JAVADOCCHECK) -$(JAVADOCCHECK) : $(IDLCHECK) + +.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) @@ -39,39 +40,40 @@ $(JAVADOCCHECK) : $(IDLCHECK) rm -Rf $(DOCTMPDIR) @touch $(JAVADOCCHECK) +.PHONY : changelog changelog : $(CHANGELOG) -$(CHANGELOG) : - $(CVS2CL) $(CVS2CLFLAGS) > $(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 -dist : build src javadoc changelog - cd $(BUILD) && $(MAKE) dist ver=$(VERSION) dest=$(DISTDEST) +.PHONY : dist +#dist : $(MCOMPILECHECK) $(SRCCHECK) $(JAVADOCCHECK) $(CHANGELOG) +dist : + cd $(BUILD) && $(MAKE) dist dest=$(DISTDEST) -dist-bin : build changelog - cd $(BUILD) && $(MAKE) dist-bin ver=$(VERSION) dest=$(DISTDEST) +.PHONY : dist-bin +#dist-bin : $(MCOMPILECHECK) $(CHANGELOG) +dist-bin : + cd $(BUILD) && $(MAKE) dist-bin 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 +.PHONY : clean clean : cd idl && $(MAKE) clean cd $(BUILD) && $(MAKE) clean ver=$(VERSION) cd uk/org/iscream/cms/server && $(MAKE) clean - rm -f $(BUILDCHECK) $(IDLCHECK) $(JAVADOCCHECK) $(SRCCHECK) - rm -Rf $(CVSBUILDTEMP) $(DOCTMPDIR) + rm -f $(MCOMPILECHECK) $(JAVADOCCHECK) $(SRCCHECK) + rm -Rf $(DOCTMPDIR) +.PHONY : distclean distclean : clean cd $(BUILD) && rm -f $(CLPATH) rm -Rf $(APICACHE) @@ -79,21 +81,25 @@ distclean : clean ### 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 -install : build +.PHONY : install +install : $(MCOMPILECHECK) @echo "-------------------------------------------------------" @echo "Installing to $(INSTALL)" @echo " copying $(PACKAGE) to $(INSTALL)" @@ -114,7 +120,8 @@ install : build ### Other -run : build +.PHONY : run +run : $(MCOMPILECHECK) cd $(BUILD) && ./run.sh ### Global Include