doc: Use --css-ref option to makeinfo, instead of postprocessing with sed.
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 29 Oct 2020 06:01:12 +0000 (23:01 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 29 Oct 2020 06:01:46 +0000 (23:01 -0700)
This option was introduced with makeinfo 4.11, released in 2007, so it
should be widely available.

doc/automake.mk

index c94608e98a3cd63917caf3dc285037626679aeb1..bf09d6a3eb13b8e50ab509fb08cc529716ee664e 100644 (file)
@@ -202,15 +202,7 @@ $(EXAMPLE_TXTS) $(EXAMPLE_HTML): $(pspp_output)
        $(AM_V_GEN)sed 's/@/@@/g' < $< > $@.tmp
        $(AM_V_at)mv $@.tmp $@
 
-# Insert the link tag for the cascading style sheet.
-# But make sure these operations are idempotent.
-html-local:
-       for h in doc/pspp.html/*.html; do \
-               if grep -Fq '<link rel="stylesheet"' $$h; then continue; fi ; \
-               $(SED) -i -e '/^<\/head>/i \\\
-<link rel="stylesheet" href="pspp-manual.css">' $$h; \
-       done
-
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) --css-ref=pspp-manual.css
 install-html-local: html-local
        $(MKDIR_P) $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html
        $(INSTALL_DATA) ${top_srcdir}/doc/pspp-manual.css $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html