diff --git a/configure/RULES_TOP b/configure/RULES_TOP index cee3eee47..0d0f66db2 100644 --- a/configure/RULES_TOP +++ b/configure/RULES_TOP @@ -4,10 +4,11 @@ include $(CONFIG)/RULES_DIRS -uninstall$(DIVIDER)%:: +uninstall$(DIVIDER)%: @$(RMDIR) $(INSTALL_LOCATION_BIN)/$* $(INSTALL_LOCATION_LIB)/$* -cleandirs:: +cleandirs: + @echo " " #stops "nothing to be done for cleandirs" message ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),) @$(RMDIR) $(INSTALL_LOCATION_BIN) endif @@ -17,13 +18,13 @@ endif distclean: clean uninstall -uninstall:: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) +uninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) @$(RMDIR) rec.bak rec @$(RMDIR) $(INSTALL_DBD) $(INSTALL_MAN) $(INSTALL_INCLUDE) $(INSTALL_DOC)\ $(INSTALL_HTML) $(INSTALL_JAVA) $(INSTALL_TEMPLATES) @$(MAKE) -f Makefile cleandirs -tar:: +tar: @DIRNAME=$(notdir $(shell pwd)); \ echo "TOP: Creating $$DIRNAME.tar file..."; \ ls Makefile* | xargs tar vcf $$DIRNAME.tar; \ @@ -38,7 +39,24 @@ tar:: | grep -v "/O\..*$$" | xargs tar vrf $$DIRNAME.tar; \ done -help:: +# tarVersion: Rule that runs from one level up, generates a temporary softlink +# sub-directory with version number, tars, gzips, and then removes the subdirectory. +# Usage: "gnumake tarVersion VERSION=1.2" +tarVersion: + @MODULE=$(notdir $(shell pwd)); \ + TARNAME=$$MODULE-$(VERSION); \ + TARFILE=$$MODULE/$$TARNAME.tar; \ + echo "TOP: Creating $$TARNAME.tar file..."; \ + cd ..; $(RM) $$TARNAME; ln -s $$MODULE $$TARNAME; \ + ls $$TARNAME/READ* $$TARNAME/Makefile* | xargs tar vcf $$TARFILE; \ + for DIR in ${DIRS}; do \ + find $$TARNAME/$$DIR -name CVS -prune -o ! -type d -print \ + | grep -v "/O\..*$$" | xargs tar vrf $$TARFILE; \ + done; \ + gzip -f $$TARFILE; \ + $(RM) $$TARNAME + +help: @echo "Usage: gnumake [options] [target] ..." @echo "Targets supported by all Makefiles:" @echo " install - Installs executables in bin/ (default rule)" @@ -57,5 +75,5 @@ help:: @echo "Indiv. object targets are supported by O. level Makefile .e.g" @echo " xxxRecord.o" -.PHONY :: uninstall tar help cleandirs +.PHONY : uninstall tar help cleandirs distclean