summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2007-04-03 22:02:59 +0000
committerShaun McCance <shaunm@src.gnome.org>2007-04-03 22:02:59 +0000
commit15b12264f4a7907ba925b90672f8a76f932eff00 (patch)
treecf9e97c8934d0729f1258d3396f0a19949f86f1d
parenta4cb5f61106c72bdfaf2a072e0ce9ad73c1764d7 (diff)
downloadgnome-doc-utils-15b12264f4a7907ba925b90672f8a76f932eff00.tar.gz
- Use gawk -W compat whenever $(AWK) is gawk
* configure.in: * doc/gnome-doc-make/Makefile.am: * doc/xslt/Makefile.am: - Use gawk -W compat whenever $(AWK) is gawk svn path=/trunk/; revision=910
-rw-r--r--ChangeLog7
-rw-r--r--configure.in12
-rw-r--r--doc/gnome-doc-make/Makefile.am2
-rw-r--r--doc/xslt/Makefile.am4
4 files changed, 22 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c59c8d..1487a6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-04-03 Shaun McCance <shaunm@gnome.org>
+
+ * configure.in:
+ * doc/gnome-doc-make/Makefile.am:
+ * doc/xslt/Makefile.am:
+ - Use gawk -W compat whenever $(AWK) is gawk
+
2007-03-19 Shaun McCance <shaunm@gnome.org>
* tools/gnome-doc-utils.make:
diff --git a/configure.in b/configure.in
index 35c06fa..213d249 100644
--- a/configure.in
+++ b/configure.in
@@ -2,6 +2,18 @@ AC_INIT([gnome-doc-utils], [0.10.1],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-doc-utils])
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
+dnl In the interest of portability, we don't use GNU awk extensions,
+dnl even though they rule. To prevent accidental use and subsequent
+dnl bug reports after busted tarballs were shipped, we use -W compat
+dnl whenever our awk is gawk.
+AC_PROG_AWK
+if test x$AWK = xgawk; then
+ GDU_AWK='gawk -W compat';
+else
+ GDU_AWK=$AWK;
+fi
+AC_SUBST(GDU_AWK)
+
gdu_cv_have_gdu=yes
GNOME_DOC_DEFINES
diff --git a/doc/gnome-doc-make/Makefile.am b/doc/gnome-doc-make/Makefile.am
index ca3e945..74ad0a8 100644
--- a/doc/gnome-doc-make/Makefile.am
+++ b/doc/gnome-doc-make/Makefile.am
@@ -6,6 +6,6 @@ DOC_MODULE = gnome-doc-make
DOC_INCLUDES = legal.xml make-ref.xml
$(srcdir)/C/make-ref.xml: $(top_srcdir)/tools/gnome-doc-utils.make
- $(AWK) -f $(srcdir)/gnome-doc-make.awk $< > $@
+ $(GDU_AWK) -f $(srcdir)/gnome-doc-make.awk $< > $@
EXTRA_DIST = gnome-doc-make.awk
diff --git a/doc/xslt/Makefile.am b/doc/xslt/Makefile.am
index 93b820c..7523709 100644
--- a/doc/xslt/Makefile.am
+++ b/doc/xslt/Makefile.am
@@ -15,7 +15,7 @@ xsldoc_docs = $(patsubst %, C/%.xml, $(xsldoc_base))
all: $(xsldoc_docs)
$(xsldoc_docs): $(xsldoc_xsls) xsldoc.awk xsldoc.xsl
- $(AWK) -W compat -f "$(srcdir)/xsldoc.awk" "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" | xsltproc -o "$@" --stringparam basename "$(basename $(notdir $@))" --stringparam xsl_file "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" "$(srcdir)/xsldoc.xsl" -
+ $(GDU_AWK) -f "$(srcdir)/xsldoc.awk" "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" | xsltproc -o "$@" --stringparam basename "$(basename $(notdir $@))" --stringparam xsl_file "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" "$(srcdir)/xsldoc.xsl" -
gnome_doc_xslt_awk='\
/<\!--BEGIN-->/ { inc=1; }\
@@ -32,7 +32,7 @@ inc {\
.PHONY: gnome-doc-xslt-check
all: gnome-doc-xslt-check
gnome-doc-xslt-check:
- @incs=`$(AWK) -W compat $(gnome_doc_xslt_awk) "$(srcdir)/C/gnome-doc-xslt.xml" | sort`; \
+ @incs=`$(GDU_AWK) $(gnome_doc_xslt_awk) "$(srcdir)/C/gnome-doc-xslt.xml" | sort`; \
xmls=`echo $(xsldoc_base) | tr '\ ' '\n' | sort`; \
if [ "$$incs" != "$$xmls" ]; then \
echo "gnome-doc-xslt.xml does not include all reference pages" 1>&2; \