--- projects/cms/source/server/build/Makefile 2002/05/18 18:16:00 1.9 +++ projects/cms/source/server/build/Makefile 2003/01/26 14:02:52 1.11 @@ -1,35 +1,68 @@ # Makefile for build -# $Id: Makefile,v 1.9 2002/05/18 18:16:00 tdb Exp $ +# $Id: Makefile,v 1.11 2003/01/26 14:02:52 tdb Exp $ include ../Config.inc BUILDFILES = uk -all : package +all : dist clean : rm -Rf $(BUILDFILES) - rm -Rf $(PACKAGE) - rm -Rf $(UTILPACKAGE) - rm -Rf $(ARCNAME)*$(TAREXT) - rm -Rf $(ARCNAME)*$(TARGZEXT) - rm -Rf $(ARCNAME)*$(ZIPEXT) + rm -f $(PACKAGE) + rm -f $(UTILPACKAGE) + rm -f $(CHANGELOG) + rm -Rf $(DISTDIR) + rm -f $(TARFILE) + rm -f $(TARGZFILE) + rm -f $(ZIPFILE) + rm -Rf $(DOCDIR) $(SRCDIR) + rm -f $(MKDISTBINCHECK) $(MKDISTCHECK) $(MKDISTFILESCHECK) package : $(PACKAGE) $(PACKAGE) : $(BUILDCHECK) - rm -Rf $(PACKAGE) + rm -f $(PACKAGE) @echo "Main-Class: $(MAINCLASS)" > MANIFEST_TMP @echo "Class-Path: $(CLPATH)" >> MANIFEST_TMP jar -cmf MANIFEST_TMP $(PACKAGE) $(BUILDFILES) rm -f MANIFEST_TMP - tar -cvf $(TARFILE) $(PACKAGE) `ls -d lib/* | grep -v CVS` `ls -d etc/* | grep -v CVS` README run.sh COPYING - gzip -fv9 $(TARFILE) - zip -9 $(ZIPFILE) $(PACKAGE) `ls -d lib/* | grep -v CVS` `ls -d etc/* | grep -v CVS` README run.bat COPYING packageutil : $(UTILPACKAGE) $(UTILPACKAGE) : $(BUILDCHECK) jar -cf $(UTILPACKAGE) $(BUILDFILES) + +dist-bin : mk-dist-bin mk-distfiles + +dist : mk-dist mk-distfiles + +mk-dist-bin : $(MKDISTBINCHECK) +$(MKDISTBINCHECK) : $(PACKAGE) $(CHANGELOG) + if test ! -d "$(DISTDIR)"; then mkdir -p $(DISTDIR); fi + echo "CVS" > TAR_EXCLUDE_TMP + echo ".#*" >> TAR_EXCLUDE_TMP + tar -cf - -X TAR_EXCLUDE_TMP $(PACKAGE) lib etc README run.sh run.bat COPYING | ( cd $(DISTDIR) && tar -xf - ) + rm -f TAR_EXCLUDE_TMP + @touch $(MKDISTBINCHECK) + @rm -f $(MKDISTFILESCHECK) + +mk-dist : $(MKDISTCHECK) +$(MKDISTCHECK) : $(PACKAGE) $(JAVADOCCHECK) $(SRCCHECK) $(CHANGELOG) + if test ! -d "$(DISTDIR)"; then mkdir -p $(DISTDIR); fi + echo "CVS" > TAR_EXCLUDE_TMP + echo ".#*" >> TAR_EXCLUDE_TMP + tar -cf - -X TAR_EXCLUDE_TMP $(PACKAGE) lib etc src ChangeLog doc README run.sh run.bat COPYING | ( cd $(DISTDIR) && tar -xf - ) + rm -f TAR_EXCLUDE_TMP + @touch $(MKDISTCHECK) + @rm -f $(MKDISTFILESCHECK) + +mk-distfiles : $(MKDISTFILESCHECK) +$(MKDISTFILESCHECK) : + if test ! -d "$(DISTDEST)"; then mkdir -p $(DISTDEST); fi + tar -cvf $(DISTDEST)/$(TARFILE) $(DISTDIR) + gzip -fv9 $(DISTDEST)/$(TARFILE) + zip -r -9 $(DISTDEST)/$(ZIPFILE) $(DISTDIR)/* + @touch $(MKDISTFILESCHECK) include $(MKINC)