From 6ec7c60ffe3d12f8365a9c15faaf0d6974df7deb Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Thu, 22 Nov 2001 00:47:59 +0000 Subject: [PATCH] Moved check-RPM_TOPDIR into a separate target; manage case of RELEASE_DIR non empty - a new feature which was added to source-distribution.make git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@11460 72102866-910b-0410-8b05-ffd578937521 --- rpm.make | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/rpm.make b/rpm.make index e7d5c114..ea820f1e 100644 --- a/rpm.make +++ b/rpm.make @@ -260,7 +260,7 @@ else PACKAGE_EXTENSION="-debug" endif -.PHONY: specfile rpm +.PHONY: specfile rpm check-RPM_TOPDIR # # The user will type `make specfile' to generate the specfile @@ -323,17 +323,24 @@ endif cat $(SPEC_SCRIPT_IN) >> $@; \ fi -rpm: tgz specfile - @echo "Generating the rpm..."; \ - if [ "$(RPM_TOPDIR)" = "" ]; then \ +check-RPM_TOPDIR: + @if [ "$(RPM_TOPDIR)" = "" ]; then \ echo "I can't build the RPM if you do not set your RPM_TOPDIR"; \ echo "shell variable"; \ - else \ - cp ../$(PACKAGE_NAME)-$(VERSION).tar.gz $(RPM_TOPDIR)/SOURCES/; \ - cp $(SPEC_FILE) $(RPM_TOPDIR)/SPECS/; \ - cd $(RPM_TOPDIR)/SPECS/; \ - rpm -ba $(SPEC_FILE); \ - fi + exit 1; \ + fi; + +rpm: check-RPM_TOPDIR tgz specfile + @echo "Generating the rpm..."; +ifneq ($(RELEASE_DIR),) + @cp $(RELEASE_DIR)/$(PACKAGE_NAME)-$(VERSION).tar.gz \ + $(RPM_TOPDIR)/SOURCES/; +else + @cp ../$(PACKAGE_NAME)-$(VERSION).tar.gz $(RPM_TOPDIR)/SOURCES/; +endif + cp $(SPEC_FILE) $(RPM_TOPDIR)/SPECS/; \ + cd $(RPM_TOPDIR)/SPECS/; \ + rpm -ba $(SPEC_FILE) ifneq ($(PACKAGE_NAME),) internal-distclean::