Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

autogen.sh updates

- Abort run if a configuring program fails.
- Generate NEWS with old timestamp if missing so automake can run
- small doc and message updates
  • Loading branch information...
commit bd4787ebe01df1a898ffa7c42f825f666e0e59a4 1 parent 6d0925a
Dave Beckett authored June 26, 2012

Showing 1 changed file with 38 additions and 3 deletions. Show diff stats Hide diff stats

  1. 41  autogen.sh
41  autogen.sh
... ...
@@ -1,6 +1,6 @@
1 1
 #!/bin/sh
2 2
 #
3  
-# autogen.sh - Generates initial makefiles from a pristine CVS tree
  3
+# autogen.sh - Generates initial makefiles from a pristine source tree
4 4
 #
5 5
 # USAGE:
6 6
 #   autogen.sh [configure options]
@@ -298,12 +298,12 @@ if test -f $GITMODULES ; then
298 298
   $DRYRUN git submodule update
299 299
 fi
300 300
 
301  
-
302 301
 for coin in `find $SRCDIR -name configure.ac -print | grep -v /releases/`
303 302
 do 
  303
+  status=0
304 304
   dir=`dirname $coin`
305 305
   if test -f "$dir/NO-AUTO-GEN"; then
306  
-    echo $program: Skipping $dir -- flagged as no auto-gen
  306
+    echo "$program: Skipping $dir -- flagged as no auto-generation"
307 307
   else
308 308
     echo " "
309 309
     echo $program: Processing directory $dir
@@ -344,12 +344,25 @@ do
344 344
       echo "$program: Running $libtoolize $libtoolize_args"
345 345
       $DRYRUN rm -f ltmain.sh libtool
346 346
       eval $DRYRUN $libtoolize $libtoolize_args
  347
+      status=$?
  348
+      if test $status != 0; then
  349
+	  break
  350
+      fi
347 351
 
348 352
       if grep "^GTK_DOC_CHECK" configure.ac >/dev/null; then
349 353
         # gtkdocize junk
350 354
         $DRYRUN rm -rf gtk-doc.make
351 355
         echo "$program: Running $gtkdocize $gtkdocize_args"
352 356
         $DRYRUN $gtkdocize $gtkdocize_args
  357
+        status=$?
  358
+	if test $status != 0; then
  359
+	    break
  360
+	fi
  361
+      fi
  362
+
  363
+      if test ! -f NEWS; then
  364
+        echo "$program: Creating empty NEWS file to allow configure to work"
  365
+        $DRYRUN touch -t 200001010000 NEWS
353 366
       fi
354 367
 
355 368
       echo "$program: Running $aclocal $aclocal_args"
@@ -357,16 +370,36 @@ do
357 370
       if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
358 371
 	echo "$program: Running $autoheader"
359 372
 	$DRYRUN $autoheader
  373
+        status=$?
  374
+	if test $status != 0; then
  375
+	    break
  376
+	fi
360 377
       fi
361 378
       echo "$program: Running $automake $automake_args"
362 379
       $DRYRUN $automake $automake_args $automake_args
  380
+      status=$?
  381
+      if test $status != 0; then
  382
+	  break
  383
+      fi
  384
+
363 385
       echo "$program: Running $autoconf"
364 386
       $DRYRUN $autoconf $autoconf_args
  387
+      status=$?
  388
+      if test $status != 0; then
  389
+	  break
  390
+      fi
365 391
     )
366 392
   fi
  393
+
  394
+  if test $status != 0; then
  395
+    echo "$program: FAILED to configure $dir"
  396
+    exit $status
  397
+  fi
  398
+
367 399
 done
368 400
 
369 401
 
  402
+
370 403
 rm -f config.cache
371 404
 
372 405
 AUTOMAKE=$automake
@@ -390,3 +423,5 @@ if test "X$NOCONFIGURE" = X; then
390 423
     $DRYRUN ./configure $configure_args "$@"
391 424
   fi
392 425
 fi
  426
+
  427
+exit $status

0 notes on commit bd4787e

Please sign in to comment.
Something went wrong with that request. Please try again.