aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap49
1 files changed, 49 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index a93ee90..750dc3c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -423,6 +423,51 @@ version_controlled_file() {
423 test $found = yes 423 test $found = yes
424} 424}
425 425
426# AWK program to convert a Makefile(.am) file rules to Automake 1.11
427# silent mode.
428silent_rules_prog='
429# state = 0 - outside rules
430# state = 1 - first line inside a rule
431# state = 2 - subsequent lines inside a rule
432# cont = 1 - this line is a continuation of the previous one
433
434# Print comment lines
435/^[ \t]*#/ { print; next }
436# Start of a rule
437/^[^ \t].*:/ { print; state = 1; cont = 0; next }
438# First action within the rule
439state == 1 && /^\t/ {
440 # Print silent rules without changes. The second match
441 # is necessary to handle @VAR@ substitutions.
442 if (match($1, /^@/) && !match($1, /@$/))
443 print
444 else {
445 sub(/^\t[\t ]*/,"")
446 print "\t$(AM_V_GEN)" $0
447 }
448 cont = match($0, /\\$/)
449 state = 2
450 next
451}
452# All non-continuation lines within the rule are prefixed
453# with $(AM_V_at).
454state == 2 && /^\t/ && NF > 0 {
455 if (!cont) {
456 sub(/^\t[\t ]*/,"")
457 print "\t$(AM_V_at)" $0
458 } else
459 print
460 cont = match($0, /\\$/)
461 next
462}
463# Everything else is output verbatim
464{ print }'
465
466silent_rules=yes
467grep 'AM_SILENT_RULES' configure.ac > /dev/null ||
468 grep '^[ ]*AM_INIT_AUTOMAKE([^)][^)]*silent-rules' configure.ac > /dev/null ||
469 silent_rules=no
470
426slurp() { 471slurp() {
427 for dir in . `(cd $1 && find * -type d -print)`; do 472 for dir in . `(cd $1 && find * -type d -print)`; do
428 copied= 473 copied=
@@ -444,6 +489,10 @@ slurp() {
444 rm -f $dir/$gnulib_mk && 489 rm -f $dir/$gnulib_mk &&
445 sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk 490 sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
446 } 491 }
492 if test "$silent_rules" = yes; then
493 awk "$silent_rules_prog" $dir/$gnulib_mk > $dir/${gnulib_mk}-t &&
494 mv $dir/${gnulib_mk}-t $dir/${gnulib_mk}
495 fi
447 elif { test "${2+set}" = set && test -r $2/$dir/$file; } || 496 elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
448 version_controlled_file $dir $file; then 497 version_controlled_file $dir $file; then
449 echo "$0: $dir/$file overrides $1/$dir/$file" 498 echo "$0: $dir/$file overrides $1/$dir/$file"

Return to:

Send suggestions and report system problems to the System administrator.