summaryrefslogtreecommitdiff
path: root/build-aux/pmccabe2html
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-10-13 12:20:30 +0200
committerSimon Josefsson <simon@josefsson.org>2008-10-13 12:20:30 +0200
commitb13005f4bf9ed08072874318e2b377851a70263a (patch)
tree77dad5b2b0b0bd9d4af15937fa3274331604016e /build-aux/pmccabe2html
parentbbd6b5238221562644e21cd9e9f7349a28855fe8 (diff)
downloadgnulib-b13005f4bf9ed08072874318e2b377851a70263a.tar.gz
pmccabe2html: Add css and css_url parameters.
Diffstat (limited to 'build-aux/pmccabe2html')
-rwxr-xr-xbuild-aux/pmccabe2html20
1 files changed, 17 insertions, 3 deletions
diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html
index 03e697b3d9..fc472582e8 100755
--- a/build-aux/pmccabe2html
+++ b/build-aux/pmccabe2html
@@ -21,15 +21,16 @@
# Typical Invocation is from a Makefile.am:
#
-# libidn-cyclo.html:
+# cyclo-libidn.html:
# $(PMCCABE) ${top_srcdir}/lib/*.[ch] \
# | sort -nr \
# | $(AWK) -f ${top_srcdir}/build-aux/pmccabe2html \
# -v lang=html -v name="$(PACKAGE_NAME)" \
# -v vcurl="http://git.savannah.gnu.org/gitweb/?p=libidn.git;a=blob;f=%FILENAME%;hb=HEAD" \
# -v url="http://www.gnu.org/software/libidn/" \
+# -v css=../../build-aux/pmccabe.css \
# > tmp
-# mv tmp libidn-cyclo.html
+# mv tmp $@
#
# The variables available are:
# lang output language, either 'html' or 'wiki'
@@ -38,6 +39,8 @@
# vcurl URL to version controlled source code browser,
# a %FILENAME% in the string is replaced with the relative
# source filename
+# css CSS stylesheet filename, included verbatim in HTML output
+# css_url link to CSS stylesheet, an URL
# Prologue & configuration
BEGIN {
@@ -62,7 +65,6 @@ BEGIN {
}
html_epilog = "<hr color=\"black\" size=\"2\"/> \
Copyright (c) 2007, 2008 Free Software Foundation Inc."
- css_url = "pmccabe.css"
html_doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \
\"http://www.w3.org/TR/html401/loose.dtd\">"
html_comment = "<!-- Generated by gnulib's pmccabe2html at " systime() " -->"
@@ -199,6 +201,18 @@ function html_header ()
{
print "<link rel=\"stylesheet\" href=\"" css_url "\" type =\"text/css\" media=\"screen\"/>"
}
+ if (css != "")
+ {
+ print "<style type =\"text/css\" media=\"screen\">"
+ print "<!--"
+ while ((getline cssline < css) > 0)
+ {
+ print cssline
+ }
+ print "-->"
+ print "</style />"
+ close(css)
+ }
print "</head>"
print "<body lang=\"en\" bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\" \
vlink=\"#800080\" alink=\"#FF0000\">"