From 1bc33708e8f88a2989409d77119d22f2f343e0cf Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 21 Sep 2010 17:25:05 -0700 Subject: [PATCH] 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. --- debian/module/rules | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 -- 2.39.5