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
This commit is contained in:
Nicola Pero 2001-11-22 00:47:59 +00:00
parent 59437e27aa
commit 6ec7c60ffe

View file

@ -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/; \
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); \
fi
rpm -ba $(SPEC_FILE)
ifneq ($(PACKAGE_NAME),)
internal-distclean::