diff options
author | Brian Behlendorf <[email protected]> | 2010-09-02 12:12:39 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-09-05 21:49:05 -0700 |
commit | a7958f7eef5ba55987810336d887437767941d26 (patch) | |
tree | 58f613c18dcd1b6e71991c2dd5d3ab47e8380c92 /Makefile.in | |
parent | d8a1b739359b04f016e2b81844a29c4d0de60bd8 (diff) |
Support custom build directories
One of the neat tricks an autoconf style project is capable of
is allow configurion/building in a directory other than the
source directory. The major advantage to this is that you can
build the project various different ways while making changes
in a single source tree.
For example, this project is designed to work on various different
Linux distributions each of which work slightly differently. This
means that changes need to verified on each of those supported
distributions perferably before the change is committed to the
public git repo.
Using nfs and custom build directories makes this much easier.
I now have a single source tree in nfs mounted on several different
systems each running a supported distribution. When I make a
change to the source base I suspect may break things I can
concurrently build from the same source on all the systems each
in their own subdirectory.
wget -c http://github.com/downloads/behlendorf/spl/spl-x.y.z.tar.gz
tar -xzf spl-x.y.z.tar.gz
cd spl-x-y-z
------------------------- run concurrently ----------------------
<ubuntu system> <fedora system> <debian system> <rhel6 system>
mkdir ubuntu mkdir fedora mkdir debian mkdir rhel6
cd ubuntu cd fedora cd debian cd rhel6
../configure ../configure ../configure ../configure
make make make make
make check make check make check make check
This is something the project has almost supported for a long time
but finishing this support should save me lots of time.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 102 |
1 files changed, 97 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in index 4180b8167..e5304d0a0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -23,6 +23,34 @@ # Build targets for RPM packages. ############################################################################### +############################################################################### +# Copyright (C) 2010 Lawrence Livermore National Security, LLC. +# Written by Brian Behlendorf <[email protected]>. +############################################################################### +# Build targets for DEB packages. +# +# Long term native distro specific Debian style packaging should be added. +# In the short term RPM packages are built and converted to DEB packages +# using alien. If someone familiar with Debian style packaging were to +# update the build system to correctly build Debian style packages I would +# happily take it. Until then we will have to make due with alien. +# +############################################################################### + +############################################################################### +# Copyright (C) 2010 Lawrence Livermore National Security, LLC. +# Written by Brian Behlendorf <[email protected]>. +############################################################################### +# Build targets for TGZ packages. +# +# Long term native distro specific Slackware style packaging should be added. +# In the short term RPM packages are built and converted to TGZ packages +# using alien. If someone familiar with Slackware style packaging were to +# update the build system to correctly build Slackware style packages I would +# happily take it. Until then we will have to make due with alien. +# +############################################################################### + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -46,7 +74,8 @@ target_triplet = @target@ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/spl-modules.spec.in $(srcdir)/spl.spec.in \ - $(srcdir)/spl_config.h.in $(top_srcdir)/config/rpm.am \ + $(srcdir)/spl_config.h.in $(top_srcdir)/config/deb.am \ + $(top_srcdir)/config/rpm.am $(top_srcdir)/config/tgz.am \ $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ @@ -291,7 +320,7 @@ all: spl_config.h .SUFFIXES: am--refresh: @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -860,8 +889,71 @@ rpm-common: --nodeps --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild -include ${top_srcdir}/config/deb.am -include ${top_srcdir}/config/tgz.am + +deb-local: + @(if test "${HAVE_DPKGBUILD}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${DPKGBUILD} missing. Please install the\n" \ + "*** package for your distribution which provides ${DPKGBUILD},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi; \ + if test "${HAVE_ALIEN}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${ALIEN} missing. Please install the\n" \ + "*** package for your distribution which provides ${ALIEN},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi) + +deb-modules: deb-local rpm-modules + name=${PACKAGE}-modules; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ + pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ + $(RM) $$pkg1 $$pkg2 + +deb-utils: deb-local rpm-utils + name=${PACKAGE}; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ + $(RM) $$pkg1 + +deb: deb-modules deb-utils + +tgz-local: + @(if test "${HAVE_ALIEN}" = "no"; then \ + echo -e "\n" \ + "*** Required util ${ALIEN} missing. Please install the\n" \ + "*** package for your distribution which provides ${ALIEN},\n" \ + "*** re-run configure, and try again.\n"; \ + exit 1; \ + fi) + +tgz-modules: tgz-local rpm-modules + name=${PACKAGE}-modules; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \ + pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ + $(RM) $$pkg1 $$pkg2 + +tgz-utils: tgz-local rpm-utils + name=${PACKAGE}; \ + version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ + arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch}`; \ + pkg1=$${name}-$${version}.$${arch}.rpm; \ + fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ + $(RM) $$pkg1 + +tgz: tgz-modules tgz-utils distclean-local:: -$(RM) -R autom4te*.cache @@ -878,7 +970,7 @@ distclean-local:: @CONFIG_KERNEL_TRUE@install-data-local: @CONFIG_KERNEL_TRUE@ destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/$$destname; \ -@CONFIG_KERNEL_TRUE@ echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ +@CONFIG_KERNEL_TRUE@ echo "$(SPL_META_VERSION)" >$$instdest/spl.release; \ @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ @CONFIG_KERNEL_TRUE@ done |