Updated build system as per Ralf's suggestions to Chapter 9 in Autotools book.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@1108 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -1,25 +1,26 @@
|
||||
rpmspec = $(PACKAGE_TARNAME).spec
|
||||
|
||||
rpmmacros =\
|
||||
--define='_rpmdir $(PWD)/..'\
|
||||
--define='_srcrpmdir $(PWD)/..'\
|
||||
--define='_sourcedir $(PWD)/..'\
|
||||
--define='_specdir $(PWD)/..'\
|
||||
--define='_builddir $(PWD)/..'
|
||||
--define="_rpmdir $${PWD}"\
|
||||
--define="_srcrpmdir $${PWD}"\
|
||||
--define="_sourcedir $${PWD}/.."\
|
||||
--define="_specdir $${PWD}"\
|
||||
--define="_builddir $${PWD}"
|
||||
|
||||
rpmopts = --nodeps --buildroot='$(PWD)/_rpm'
|
||||
RPMBUILD = rpmbuild
|
||||
RPMFLAGS = --nodeps --buildroot="$${PWD}/_rpm"
|
||||
|
||||
rpmcheck:
|
||||
@which rpmbuild &> /dev/null; \
|
||||
if [ $$? -ne 0 ]; then \
|
||||
if [ which rpmbuild &> /dev/null ]; then \
|
||||
echo "*** This make target requires an rpm-based linux distribution."; \
|
||||
(exit 1); exit 1; \
|
||||
fi
|
||||
|
||||
srcrpm: rpmcheck $(rpmspec)
|
||||
rpmbuild -bs $(rpmmacros) $(rpmopts) $(rpmspec)
|
||||
$(RPMBUILD) $(RPMFLAGS) -bs $(rpmmacros) $(rpmspec)
|
||||
|
||||
rpms: rpmcheck $(rpmspec)
|
||||
rpmbuild -ba $(rpmmacros) $(rpmopts) $(rpmspec)
|
||||
$(RPMBUILD) $(RPMFLAGS) -ba $(rpmmacros) $(rpmspec)
|
||||
|
||||
.PHONY: rpmcheck srcrpm rpms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user