aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap49
-rw-r--r--configure.ac5
-rw-r--r--gacopyz/Makefile.am2
-rw-r--r--mfd/Makefile.am22
4 files changed, 64 insertions, 14 deletions
diff --git a/bootstrap b/bootstrap
index a93ee909..750dc3c7 100755
--- a/bootstrap
+++ b/bootstrap
@@ -425,2 +425,47 @@ version_controlled_file() {
+# AWK program to convert a Makefile(.am) file rules to Automake 1.11
+# silent mode.
+silent_rules_prog='
+# state = 0 - outside rules
+# state = 1 - first line inside a rule
+# state = 2 - subsequent lines inside a rule
+# cont = 1 - this line is a continuation of the previous one
+
+# Print comment lines
+/^[ \t]*#/ { print; next }
+# Start of a rule
+/^[^ \t].*:/ { print; state = 1; cont = 0; next }
+# First action within the rule
+state == 1 && /^\t/ {
+ # Print silent rules without changes. The second match
+ # is necessary to handle @VAR@ substitutions.
+ if (match($1, /^@/) && !match($1, /@$/))
+ print
+ else {
+ sub(/^\t[\t ]*/,"")
+ print "\t$(AM_V_GEN)" $0
+ }
+ cont = match($0, /\\$/)
+ state = 2
+ next
+}
+# All non-continuation lines within the rule are prefixed
+# with $(AM_V_at).
+state == 2 && /^\t/ && NF > 0 {
+ if (!cont) {
+ sub(/^\t[\t ]*/,"")
+ print "\t$(AM_V_at)" $0
+ } else
+ print
+ cont = match($0, /\\$/)
+ next
+}
+# Everything else is output verbatim
+{ print }'
+
+silent_rules=yes
+grep 'AM_SILENT_RULES' configure.ac > /dev/null ||
+ grep '^[ ]*AM_INIT_AUTOMAKE([^)][^)]*silent-rules' configure.ac > /dev/null ||
+ silent_rules=no
+
slurp() {
@@ -446,2 +491,6 @@ slurp() {
}
+ if test "$silent_rules" = yes; then
+ awk "$silent_rules_prog" $dir/$gnulib_mk > $dir/${gnulib_mk}-t &&
+ mv $dir/${gnulib_mk}-t $dir/${gnulib_mk}
+ fi
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
diff --git a/configure.ac b/configure.ac
index 4fca3bdd..bba239c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,4 +26,5 @@ AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-bzip2 std-options])
-
+AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-bzip2 std-options silent-rules])
+# Enable silent rules by default:
+test -z "$enable_silent_rules" && AM_DEFAULT_VERBOSITY=0
#
diff --git a/gacopyz/Makefile.am b/gacopyz/Makefile.am
index d658b3e7..5eb9bde0 100644
--- a/gacopyz/Makefile.am
+++ b/gacopyz/Makefile.am
@@ -37,3 +37,3 @@ INCLUDES=-I$(top_srcdir)/gnu -I../gnu
trans.h: ${top_srcdir}/gacopyz/trans.tab ${top_srcdir}/gacopyz/trans.awk ${top_srcdir}/gacopyz/gacopyz.h
- $(AWK) -f ${top_srcdir}/gacopyz/trans.awk \
+ $(AM_V_GEN) $(AWK) -f ${top_srcdir}/gacopyz/trans.awk \
-vheader_file=${top_srcdir}/gacopyz/gacopyz.h\
diff --git a/mfd/Makefile.am b/mfd/Makefile.am
index 1595b20a..b0fc6f99 100644
--- a/mfd/Makefile.am
+++ b/mfd/Makefile.am
@@ -142,6 +142,6 @@ builtin.h: Makefile.am
node-type.h: drivers.c
- $(AWK) -v MODE=types -f $(top_srcdir)/mfd/drv.awk drivers.c > node-type.h
+ $(AM_V_GEN) $(AWK) -v MODE=types -f $(top_srcdir)/mfd/drv.awk drivers.c > node-type.h
node-tab.c: drivers.c
- $(AWK) -f $(top_srcdir)/mfd/drv.awk drivers.c > node-tab.c
+ $(AM_V_GEN) $(AWK) -f $(top_srcdir)/mfd/drv.awk drivers.c > node-tab.c
@@ -154,3 +154,3 @@ SUFFIXES = .m4 .c .def .h .mfi .mfh .opc .oph .cin .hin
.mfi.c:
- $(AWK) -f $(top_srcdir)/mfd/mfstat.awk \
+ $(AM_V_GEN) $(AWK) -f $(top_srcdir)/mfd/mfstat.awk \
$(top_srcdir)/mfd/mailfromd.h $< > $@
@@ -158,3 +158,3 @@ SUFFIXES = .m4 .c .def .h .mfi .mfh .opc .oph .cin .hin
.mfi.mfh:
- $(AWK) -f $(top_srcdir)/mfd/mfstat.awk \
+ $(AM_V_GEN) $(AWK) -f $(top_srcdir)/mfd/mfstat.awk \
$(top_srcdir)/mfd/mailfromd.h $< > $@
@@ -165,4 +165,4 @@ M4=m4
.m4.c:
- $(M4) --prefix -s -DSOURCE="$<" $(top_srcdir)/mfd/snarf.m4 $< > $@-t
- sed '1{/#line/d;}' $@-t > $@
+ $(AM_V_GEN)$(M4) --prefix -s -DSOURCE="$<" $(top_srcdir)/mfd/snarf.m4 $< > $@-t && \
+ sed '1{/#line/d;}' $@-t > $@ && \
rm $@-t
@@ -170,6 +170,6 @@ M4=m4
.def.h:
- $(M4) --prefix $(top_srcdir)/mfd/init.m4 $(M4_FILES) $< > $@
+ $(AM_V_GEN) $(M4) --prefix $(top_srcdir)/mfd/init.m4 $(M4_FILES) $< > $@
.opc.c:
- $(AWK) -f $(top_srcdir)/mfd/opcode.awk \
+ $(AM_V_GEN) $(AWK) -f $(top_srcdir)/mfd/opcode.awk \
$(top_srcdir)/mfd/opcodes $< > $@
@@ -177,3 +177,3 @@ M4=m4
.oph.h:
- $(AWK) -f $(top_srcdir)/mfd/opcode.awk \
+ $(AM_V_GEN) $(AWK) -f $(top_srcdir)/mfd/opcode.awk \
$(top_srcdir)/mfd/opcodes $< > $@
@@ -183,3 +183,3 @@ optab.c optab.h: opcodes
.cin.c:
- SRCLIST=`echo $(mailfromd_SOURCES) | tr -s ' ' ','`; \
+ $(AM_V_GEN) SRCLIST=`echo $(mailfromd_SOURCES) | tr -s ' ' ','`; \
$(M4) -s -DSRCLIST="$$SRCLIST" $(top_srcdir)/mfd/debugdef.m4 $< > $@
@@ -187,3 +187,3 @@ optab.c optab.h: opcodes
.hin.h:
- SRCLIST=`echo $(mailfromd_SOURCES) | tr -s ' ' ','`; \
+ $(AM_V_GEN) SRCLIST=`echo $(mailfromd_SOURCES) | tr -s ' ' ','`; \
$(M4) -DSRCLIST="$$SRCLIST" $(top_srcdir)/mfd/debugdef.m4 $< > $@

Return to:

Send suggestions and report system problems to the System administrator.