Fix escaped automake building
authorRalf Jung <post@ralfj.de>
Fri, 27 Jul 2012 12:47:56 +0000 (14:47 +0200)
committerRalf Jung <post@ralfj.de>
Fri, 27 Jul 2012 12:47:56 +0000 (14:47 +0200)
auto_debuild.py

index 422dafb3ef184812eb988df7931cd4d4a3649e1e..9252652ad246fd82a0c830d0f6f0c0374fcd0051 100755 (executable)
@@ -58,13 +58,13 @@ def automakeRules(config):
        r.rules['auto_configure'] = [
                'BUILD_TYPE=$$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) && ' + # doing the expansion beforehand ensures that we cancel if it fails
                'MULTIARCH=$$(dpkg-architecture -qDEB_BUILD_MULTIARCH) && '+
-                       safeCall(['./configure', '--build=$$BUILD_TYPE',
-                       '--prefix=/usr', '--includedir=/usr/include', '--mandir=/usr/share/man', '--infodir=/usr/share/info',
-                       '--libdir=/usr/lib/$$MULTIARCH', '--libexecdir=/usr/lib/$$MULTIARCH',
-                       '--sysconfdir=/etc', '--localstatedir=/var'] +
-                       config.get('automakeParameters', []))
+                       './configure --build=$$BUILD_TYPE '+ # do the escape manually here so we can use the variables (there's no user-controlled string in here anyway)
+                       '--prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info '+
+                       '--libdir=/usr/lib/$$MULTIARCH --libexecdir=/usr/lib/$$MULTIARCH '+
+                       '--sysconfdir=/etc --localstatedir=/var '+
+                       safeCall(config.get('automakeParameters', []))
        ]
-       r.rules['auto_clean'] = ['rm -f config.status'] # do not re-use old configuration
+       r.rules['auto_clean'] = ['rm -f config.status'] # do not re-use old configuration (no need for escaping here, obviously)
        return r
 
 # utility functions