add option to call autogen.sh
[auto-debuild.git] / auto_debuild.py
index 524603fab73d64c2832326fb8bb0f2cb82cba500..640ac4fd67aaa36b28a9d671c5a0f0be6f20d69b 100755 (executable)
@@ -105,7 +105,7 @@ class RulesFile:
                print(file=f)
                print(".PHONY: build", file=f) # there may be a directory called "build"
                print(file=f)
-               print("build %:", file=f) # need to mention "build" here again explicitly so PHONY takes effect
+               print("%:", file=f)
                # write proper dh call
                dh = self.dh
                if self.dhWith:
@@ -138,6 +138,7 @@ def automakeRules(r, config):
        #  and HOST_GNU_TYPE are equal, and if they are not, add a --host parameter)
        r.dh += ["--buildsystem=autoconf", "--builddirectory="+config.getstr('buildDir')]
        r.rules['auto_configure'] = [
+        (safeCall(*config['autogen']) + " && " if 'autogen' in config else '') +
                safeCall("mkdir", "-p", buildDir),
                safeCall("cd", buildDir) + " && " +
                'BUILD_TYPE=$$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) && ' + # doing the expansion beforehand ensures that we cancel if it fails