mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-24 22:59:09 +00:00
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:
parent
59437e27aa
commit
6ec7c60ffe
1 changed files with 17 additions and 10 deletions
27
rpm.make
27
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::
|
||||
|
|
Loading…
Reference in a new issue