From 1fd57585c8ea536630d69de3fc16ce0c6f81c82b Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 11 Apr 2007 19:53:32 +0000 Subject: * cpp/qpidc.spec.in: Added qpidd-devel sub-package. * cpp/configure.ac: Use a more reliable srcdir test file. * cpp/docs/api/Makefile.am: Fix bug in VPATH builds. * cpp/gentools/*, src/**.h,**.cpp: Fix #includes of files in gen/ * cpp/rpm/Makefile.am: Removed. RPM targets defined in top level Makefile.am. * cpp/Makefile.am: Add RPM targets, fix VPATH bug with RPM targets * cpp/rpm/README.qpidd-devel: placeholder for qpidd-devel documentation. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@527639 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/Makefile.am | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'cpp/Makefile.am') diff --git a/cpp/Makefile.am b/cpp/Makefile.am index 1d6c142109..dcdcb7cea0 100644 --- a/cpp/Makefile.am +++ b/cpp/Makefile.am @@ -1,13 +1,15 @@ AUTOMAKE_OPTIONS = 1.9.2 foreign ACLOCAL_AMFLAGS = -I m4 +SPEC=$(PACKAGE).spec + EXTRA_DIST = \ LICENSE NOTICE README \ etc/qpidd \ - $(PACKAGE).spec \ - $(PACKAGE).spec.in + $(SPEC) $(SPEC).in \ + rpm/README.qpidd-devel -SUBDIRS = src docs/api docs/man rpm +SUBDIRS = src docs/api docs/man # Update libtool, if needed. libtool: $(LIBTOOL_DEPS) @@ -16,11 +18,31 @@ libtool: $(LIBTOOL_DEPS) # This cannot be done by AC_CONFIG_FILES, because automake's # make distcheck target does not like auto-generated files # being included in the distributed archive. -$(PACKAGE).spec: %: %.in +$(SPEC): %: %.in Makefile sed 's/@''PACKAGE@/@PACKAGE@/;s/@''VERSION@/@VERSION@/' $< > $@-tmp mv $@-tmp $@ -MAINTAINERCLEANFILES = $(PACKAGE).spec +MAINTAINERCLEANFILES = $(SPEC) + +# +# Build RPMs from the distribution tarball. +# +RPMDIRS=rpm/BUILD rpm/RPMS rpm/SPECS rpm/SRPMS +RPMMACROS=--define "_topdir @abs_builddir@/rpm" --define "_sourcedir @abs_builddir@" +# Override this variable e.g. with -bs to produce srpm only +RPMOPTS=-ba + +clean-local: + -rm -rf $(RPMDIRS) + +.PHONY: rpmbuild + +rpmbuild: $(SPEC) dist-gzip + mkdir -p $(RPMDIRS) + rpmbuild $(RPMMACROS) $(RPMOPTS) $(SPEC) +if HAS_RPMLINT + rpmlint `find rpm -name '*.rpm'` +else + @echo "WARNING: rpmlint not found, could not validate RPMs." +endif + -.PHONY: rpm srpm -rpm srpm: dist - cd rpm && $(MAKE) $(MAKEFLAGS_AM) $@ -- cgit v1.2.1