Whamcloud - gitweb
b=19721
authorbrian <brian>
Fri, 27 Nov 2009 14:20:50 +0000 (14:20 +0000)
committerbrian <brian>
Fri, 27 Nov 2009 14:20:50 +0000 (14:20 +0000)
i=adilger

Try to be somewhat intelligent about the need to autogen.sh or not by
seeing if any of the patches touch an autoconf file.

debian/rules

index aa03070..53fa04f 100755 (executable)
@@ -77,17 +77,19 @@ SRCDIR=.
 
 autogen: autogen-stamp
 autogen-stamp: patch-stamp
-       # There is really no reason to run this unless somebody adds a
-       # patch that patches the autoconf system, in which case they can
-       # include a patch for autogen.sh and uncomment this stuff.
-       #cp /usr/share/misc/config.sub config.sub
-       #cp /usr/share/misc/config.sub libsysio/config.sub
-       #cp /usr/share/misc/config.sub ldiskfs/config.sub
-       #cp /usr/share/misc/config.guess config.guess
-       #cp /usr/share/misc/config.guess libsysio/config.guess
-       #cp /usr/share/misc/config.guess ldiskfs/config.guess
-       #sh ./autogen.sh
-       #touch $@
+       # see if any patches requires us to run autogen
+       if ! grep "^--- .*\/autoconf" debian/patches/* || \
+          [ ! -f autogen.sh ]; then \
+               exit 0; \
+       fi
+       cp /usr/share/misc/config.sub config.sub
+       cp /usr/share/misc/config.sub libsysio/config.sub
+       cp /usr/share/misc/config.sub ldiskfs/config.sub
+       cp /usr/share/misc/config.guess config.guess
+       cp /usr/share/misc/config.guess libsysio/config.guess
+       cp /usr/share/misc/config.guess ldiskfs/config.guess
+       sh ./autogen.sh
+       touch $@
 
 configure: configure-stamp
 configure-stamp: autogen-stamp debian/control.main debian/control.modules.in