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