]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Don't build packages that haven't been selected.
authorEtienne Dechamps <etienne.dechamps@ovh.net>
Tue, 17 Jul 2012 08:08:22 +0000 (10:08 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 26 Jul 2012 21:54:32 +0000 (14:54 -0700)
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 <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Issue zfsonlinux/zfs#851

Makefile.in
config/arch.am
config/deb.am
config/rpm.am
config/tgz.am

index 5fd793e6e5a03cf21e0f3c9f936c34b97083e43b..a700798934feba6757d80d6b17a76bfead83c903 100644 (file)
@@ -845,20 +845,18 @@ uninstall-am:
 
 
 srpm-modules:
-       $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common
+@CONFIG_KERNEL_TRUE@   $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common
 
 srpm-utils:
-       $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common
+@CONFIG_USER_TRUE@     $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common
 
 srpm: srpm-modules srpm-utils
 
 rpm-modules: srpm-modules
-       $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common
+@CONFIG_KERNEL_TRUE@   $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common
 
 rpm-utils: srpm-utils
-       $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common
-
-rpm-modules: srpm-modules
+@CONFIG_USER_TRUE@     $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common
 
 rpm: rpm-modules rpm-utils
 
@@ -936,22 +934,22 @@ deb-local:
        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} | tail -1`; \
-       pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \
-       pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \
-       fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \
-       $(RM) $$pkg1 $$pkg2
+@CONFIG_KERNEL_TRUE@   name=${PACKAGE}-modules; \
+@CONFIG_KERNEL_TRUE@   version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \
+@CONFIG_KERNEL_TRUE@   release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \
+@CONFIG_KERNEL_TRUE@   arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
+@CONFIG_KERNEL_TRUE@   pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \
+@CONFIG_KERNEL_TRUE@   pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \
+@CONFIG_KERNEL_TRUE@   fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \
+@CONFIG_KERNEL_TRUE@   $(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} | tail -1`; \
-       pkg1=$${name}-$${version}.$${arch}.rpm; \
-       fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \
-       $(RM) $$pkg1
+@CONFIG_USER_TRUE@     name=${PACKAGE}; \
+@CONFIG_USER_TRUE@     version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \
+@CONFIG_USER_TRUE@     arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
+@CONFIG_USER_TRUE@     pkg1=$${name}-$${version}.$${arch}.rpm; \
+@CONFIG_USER_TRUE@     fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \
+@CONFIG_USER_TRUE@     $(RM) $$pkg1
 
 deb: deb-modules deb-utils
 
@@ -965,22 +963,22 @@ tgz-local:
        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} | tail -1`; \
-       pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \
-       pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \
-       fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \
-       $(RM) $$pkg1 $$pkg2
+@CONFIG_KERNEL_TRUE@   name=${PACKAGE}-modules; \
+@CONFIG_KERNEL_TRUE@   version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \
+@CONFIG_KERNEL_TRUE@   release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \
+@CONFIG_KERNEL_TRUE@   arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
+@CONFIG_KERNEL_TRUE@   pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \
+@CONFIG_KERNEL_TRUE@   pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \
+@CONFIG_KERNEL_TRUE@   fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2; \
+@CONFIG_KERNEL_TRUE@   $(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} | tail -1`; \
-       pkg1=$${name}-$${version}.$${arch}.rpm; \
-       fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \
-       $(RM) $$pkg1
+@CONFIG_USER_TRUE@     name=${PACKAGE}; \
+@CONFIG_USER_TRUE@     version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \
+@CONFIG_USER_TRUE@     arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
+@CONFIG_USER_TRUE@     pkg1=$${name}-$${version}.$${arch}.rpm; \
+@CONFIG_USER_TRUE@     fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \
+@CONFIG_USER_TRUE@     $(RM) $$pkg1
 
 tgz: tgz-modules tgz-utils
 
@@ -993,10 +991,10 @@ sarch-utils:
 sarch: sarch-modules sarch-utils
 
 arch-modules:
-       $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common
+@CONFIG_KERNEL_TRUE@   $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" arch-common
 
 arch-utils:
-       $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common
+@CONFIG_USER_TRUE@     $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" arch-common
 
 arch: arch-modules arch-utils
 
index 591013afd10c68d6953544d6102fa10fa0254ccc..da43fe73898e2ac04346af502871079cb3cf71b2 100644 (file)
@@ -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
 
index ce84cfa9ccb9d41b7755bb53b653cc8e17ccbad1..75e31dfec213d11ff3b384ceeaf1d7741baca91c 100644 (file)
@@ -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
index 7dfe4fd9b96b0f3d30e034d07fdf83f94898e06f..a0a4ed1487b5e0cd90e3cbf5fae392a725fb15f7 100644 (file)
@@ -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
 
index bbc204a65a29b9cd982c403a7ab5c2918e5b451b..1aaf4dde2737e688a7b3d45dc15399b57b2367f3 100644 (file)
@@ -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