Fix escaped automake building
[auto-debuild.git] / auto_debuild.py
index 526068993cf91b27a244a7e7d3209bb4ed0455bc..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) && '+
        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
        return r
 
 # utility functions