From: Russ Allbery Date: Wed, 22 Sep 2010 00:25:05 +0000 (-0700) Subject: Ensure we set up debian/control before doing module builds X-Git-Tag: debian/1.5.77-1~1 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1bc33708e8f88a2989409d77119d22f2f343e0cf;p=packages%2Fo%2Fopenafs.git Ensure we set up debian/control before doing module builds 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. --- diff --git a/debian/module/rules b/debian/module/rules index 8ffc4cf7c..684b6ba53 100755 --- a/debian/module/rules +++ b/debian/module/rules @@ -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