]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Ensure we set up debian/control before doing module builds
authorRuss Allbery <rra@debian.org>
Wed, 22 Sep 2010 00:25:05 +0000 (17:25 -0700)
committerRuss Allbery <rra@debian.org>
Wed, 22 Sep 2010 00:25:05 +0000 (17:25 -0700)
In the openafs-modules-source package, we have to be sure to generate
a debian/control file listing our module package before we run any
dh commands, since otherwise dh gives up and quits.

debian/module/rules

index 8ffc4cf7cfb8bae7e6da090f6da650fdfbd30ad2..684b6ba530ac1c2f38f0530d9696166613b913c3 100755 (executable)
@@ -29,16 +29,21 @@ package    = openafs
 modulepkg := openafs-modules-$(KVERS)${INT_SUBARCH}
 moduledir := debian/$(modulepkg)/lib/modules/$(KVERS)/fs
 
-%:
-       dh $@
-
-override_dh_auto_configure:
+# This setup must be done before running any other target if it hasn't
+# already been done.
+setup:
        @if test x"$(SYS_NAME)" = x"UNKNOWN" ; then exit 1 ; fi
        @if test x"$(KVERS)" = x ; then \
            echo 'No version in $(KSRC)/include/linux/version.h' >&2 ; \
            exit 1 ; \
        fi
        sh debian/prep-modules $(KSRC)
+       touch $@
+
+%: setup
+       dh $@
+
+override_dh_auto_configure:
        sh configure --prefix=$(CURDIR)/debian/tmp \
            --with-afs-sysname=$(SYS_NAME) \
            --disable-linux-syscall-probing \
@@ -55,7 +60,7 @@ override_dh_auto_install:
 
 override_dh_clean:
        rm -rf src/libafs/MODLOAD-* *-stamp
-       dh_clean Makefile config.log config.status src/libafs/Makefile \
+       dh_clean Makefile config.log config.status setup src/libafs/Makefile \
            src/libafs/Makefile.common src/libafs/asm src/libafs/asm-generic \
            src/libafs/h src/libafs/linux src/libafs/net src/libafs/netinet \
            src/libafs/rpc src/libafs/sys