The conversion rule from postgres.sgml to postgres.xml didn't work with
authorPeter Eisentraut
Fri, 31 Oct 2008 14:35:30 +0000 (14:35 +0000)
committerPeter Eisentraut
Fri, 31 Oct 2008 14:35:30 +0000 (14:35 +0000)
BSD sed.  So write it in Perl, which is more portable and a bit faster, too.
We already use Perl for standard documentation builds, so this imposes no
additional requirement.

doc/src/sgml/Makefile

index 40eb31bb3a1d7099491c1c1ac7dee84b136f1532..49ac9460919c73ab21e606027794de6e6530e8a9 100644 (file)
@@ -2,7 +2,7 @@
 #
 # PostgreSQL documentation makefile
 #
-# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.108 2008/10/04 02:19:08 tgl Exp $
+# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.109 2008/10/31 14:35:30 petere Exp $
 #
 #----------------------------------------------------------------------------
 
@@ -228,8 +228,8 @@ XSLTPROC = xsltproc
 
 postgres.xml: postgres.sgml $(GENERATED_SGML)
    $(OSX) -D. -x lower $< | \
-     sed -e 's/\[\(amp\|copy\|egrave\|gt\|lt\|mdash\|nbsp\|ouml\|pi\|quot\|uuml\) *\]/\&\1;/g' \
-         -e '1a\' -e '' \
+     $(PERL) -p -e 's/\[(amp|copy|egrave|gt|lt|mdash|nbsp|ouml|pi|quot|uuml) *\]/\&\1;/g;' \
+                -e '$$_ .= qq{\n} if $$. == 1;' \
      >$@
 # ' hello Emacs