bug 1363774 - error if generated old-configure is empty due to broken autoconf. r?glandium draft
authorTed Mielczarek <ted@mielczarek.org>
Wed, 10 May 2017 18:00:11 -0400
changeset 575802 16cb3e78449555787143acaaeee0c09cb5aa8c93
parent 575689 d1e46aeb0768c7908d3bd7cd183de4c1a95fdd4a
child 628025 3f334d2c3bdd295a9050924455fbd1b3b9163cb4
push id58177
push userbmo:ted@mielczarek.org
push dateWed, 10 May 2017 22:00:54 +0000
reviewersglandium
bugs1363774
milestone55.0a1
bug 1363774 - error if generated old-configure is empty due to broken autoconf. r?glandium MozReview-Commit-ID: FyS67dORiuX
build/moz.configure/old.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -99,16 +99,18 @@ def prepare_configure(old_configure, moz
             refresh = False
 
     if refresh:
         log.info('Refreshing %s with %s', old_configure, autoconf)
         script = subprocess.check_output([
             shell, autoconf,
             '--localdir=%s' % os.path.dirname(old_configure),
             old_configure + '.in'])
+        if not script:
+            die('Generated old-configure is empty! Check that your autoconf 2.13 and awk programs work!')
 
         # Make old-configure append to config.log, where we put our own log.
         # This could be done with a m4 macro, but it's way easier this way
         script = script.replace('>./config.log', '>>./config.log')
 
         with open(old_configure, 'wb') as fh:
             fh.write(script)