The "clean" target of debian/rules is shared between the source and the
modules package so needs some tweaking...

A better patch is attached!

Alex Owen
--- rules.old   Tue Apr 19 12:12:15 2005
+++ rules       Tue Apr 19 12:20:18 2005
@@ -130,14 +130,14 @@
 # seperate binary-modules target to make testing the package building
 # easier
 kdist_image:
-       $(MAKE) $(MFLAGS) -f debian/rules binary-modules
-       $(MAKE) $(MFLAGS) -f debian/rules clean
+       $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-modules
+       $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
 
 # the kdist_clean target is called by make-kpkg modules_clean. It is
 # responsible for cleaning up any changes that have been made by the
 # other kdist_commands (except for the .deb files created).
 kdist_clean:
-       $(MAKE) $(MFLAGS) -f debian/rules clean
+       $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
 
 ### end  KERNEL SETUP
 
@@ -222,13 +222,13 @@
 build: build-arch build-indep
 
 clean:
-       dh_testdir
+       dh_testdir || [ -f debian/rules ]
        dh_testroot
        rm -f build-arch-stamp build-indep-stamp configure-stamp
 
        # Add here commands to clean up after the build process.
        -$(MAKE) clean
-
+       [ -f debian/control ] || touch debian/control
        dh_clean
 
 install: DH_OPTIONS=

Reply via email to