diff options
author | Etienne Dechamps <[email protected]> | 2012-07-17 10:08:22 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-07-26 14:54:32 -0700 |
commit | 016432fbeb625f3588039017c682f5df260c86d4 (patch) | |
tree | a7ea8fb3cb65d9264bfe292a3bbac91ab6163032 /config | |
parent | 94aac9c9bcd1a222ac87d7452afa5284c16229bc (diff) |
Don't build packages that haven't been selected.
Currently, when configure --with-config is used, selective compilation
is only effective for the simple "make" case. Package builders (e.g.
make rpm) still build everything (utils and modules). This patch fixes
that.
This patch also drops the duplicate rpm-modules build target.
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Prakash Surya <[email protected]>
Issue zfsonlinux/zfs#851
Diffstat (limited to 'config')
-rw-r--r-- | config/arch.am | 4 | ||||
-rw-r--r-- | config/deb.am | 4 | ||||
-rw-r--r-- | config/rpm.am | 10 | ||||
-rw-r--r-- | config/tgz.am | 4 |
4 files changed, 20 insertions, 2 deletions
diff --git a/config/arch.am b/config/arch.am index 591013afd..da43fe738 100644 --- a/config/arch.am +++ b/config/arch.am @@ -13,10 +13,14 @@ sarch-utils: sarch: sarch-modules sarch-utils arch-modules: +if CONFIG_KERNEL $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common +endif arch-utils: +if CONFIG_USER $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common +endif arch: arch-modules arch-utils diff --git a/config/deb.am b/config/deb.am index ce84cfa9c..75e31dfec 100644 --- a/config/deb.am +++ b/config/deb.am @@ -29,6 +29,7 @@ deb-local: fi) deb-modules: deb-local rpm-modules +if CONFIG_KERNEL name=${PACKAGE}-modules; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ @@ -37,13 +38,16 @@ deb-modules: deb-local rpm-modules pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \ $(RM) $$pkg1 $$pkg2 +endif deb-utils: deb-local rpm-utils +if CONFIG_USER name=${PACKAGE}; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \ $(RM) $$pkg1 +endif deb: deb-modules deb-utils diff --git a/config/rpm.am b/config/rpm.am index 7dfe4fd9b..a0a4ed148 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -7,20 +7,26 @@ ############################################################################### srpm-modules: +if CONFIG_KERNEL $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common +endif srpm-utils: +if CONFIG_USER $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common +endif srpm: srpm-modules srpm-utils rpm-modules: srpm-modules +if CONFIG_KERNEL $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common +endif rpm-utils: srpm-utils +if CONFIG_USER $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common - -rpm-modules: srpm-modules +endif rpm: rpm-modules rpm-utils diff --git a/config/tgz.am b/config/tgz.am index bbc204a65..1aaf4dde2 100644 --- a/config/tgz.am +++ b/config/tgz.am @@ -22,6 +22,7 @@ tgz-local: fi) tgz-modules: tgz-local rpm-modules +if CONFIG_KERNEL name=${PACKAGE}-modules; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \ @@ -30,13 +31,16 @@ tgz-modules: tgz-local rpm-modules pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \ $(RM) $$pkg1 $$pkg2 +endif tgz-utils: tgz-local rpm-utils +if CONFIG_USER name=${PACKAGE}; \ version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \ $(RM) $$pkg1 +endif tgz: tgz-modules tgz-utils |