From 946d0cd219b85a5d5e0a7fdb2549bc8653a4ab1e Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 15 Apr 2012 14:51:04 -0400 Subject: [PATCH] Add readme.pdf and internal.pdf --- .gitignore | 2 +- Changes | 2 ++ Makefile.in | 38 ++++++++++++++++++++++++++++---------- src/pod2latexfix | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 11 deletions(-) create mode 100755 src/pod2latexfix diff --git a/.gitignore b/.gitignore index 680ca5056..d7191f23c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ .*.swp *.tmp *.tex +*.pdf /Makefile README autom4te.cache @@ -19,6 +20,5 @@ dddrun* doxygen-doc gdbrun* internals.txt -verilator.pdf verilator.txt verilator_bin* diff --git a/Changes b/Changes index ef43aa22f..492c2ff30 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Add SELRANGE as warning instead of error, bug477. [Alex Solomatnikov] +**** Add readme.pdf and internal.pdf and doxygen, bug483. [by Jeremy Bennett] + **** Fix change detections on arrays, bug364. [John Stevenson, Alex Solomatnikov] **** Fix signed array warning, bug456. [Alex Solomatnikov] diff --git a/Makefile.in b/Makefile.in index ec8179c73..27d8de78b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -59,6 +59,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = makeinfo POD2TEXT = pod2text +POD2LATEXFIX = $(srcdir)/src/pod2latexfix PERL = @PERL@ # Destination prefix for RPMs @@ -100,7 +101,8 @@ SHELL = /bin/sh SUBDIRS = src test_verilated test_c test_sc test_sp test_regress test_vcs -INFOS = README internals.txt verilator.txt verilator.html verilator.1 verilator.pdf +INFOS = README README.html README.pdf internals.txt internals.html \ + internals.pdf verilator.txt verilator.html verilator.1 verilator.pdf # Files that can be generated, but should be up to date for a distribution. DISTDEP = info Makefile @@ -216,15 +218,7 @@ verilator.html: ${srcdir}/bin/verilator # PDF needs DIST variables; but having configure.ac as dependency isn't detected verilator.pdf: ${srcdir}/bin/verilator Makefile pod2latex --full --out verilator.tex ${srcdir}/bin/verilator - cat < verilator.tex \ - | sed 's/\\begin{document}/\\usepackage[left=1.7in,right=1.7in,top=1.3in,bottom=1.3in]{geometry}\n\\begin{document}/' \ - | sed 's/\\begin{document}/\\usepackage[pdftex,bookmarks=true,bookmarksnumbered=true,hypertexnames=false,breaklinks=true,linkbordercolor={0 0 1}]{hyperref}\n\\begin{document}/' \ - | sed 's/\\begin{document}/\\usepackage{fancyhdr} \\pagestyle{fancy}\n\\begin{document}/' \ - | sed 's/\\begin{document}/\\setlength{\\parindent}{0pt} \\setlength{\\parskip}{\\baselineskip}\n\\begin{document}/' \ - | sed 's/\\begin{document}/\\title{$(DISTTITLE)} \\date{${DISTDATE}} \\author{Wilson Snyder\\\\ http:\/\/www.veripool.org}\n\\begin{document}/' \ - | sed 's/\\begin{document}/\\lhead[$(DISTTITLE)]{$(DISTTITLE)}\n\\begin{document}/' \ - | sed 's/\\tableofcontents/\\begin{titlepage} \\maketitle \\end{titlepage}\n\\tableofcontents/' \ - > verilator2.tex + $(PERL) $(POD2LATEXFIX) "$(DISTTITLE)" "${DISTDATE}" < verilator.tex > verilator2.tex mv verilator2.tex verilator.tex pdflatex verilator.tex pdflatex verilator.tex @@ -234,10 +228,34 @@ README: readme.pod -rm -f $@ $(POD2TEXT) --loose $< > $@ +README.html: readme.pod + pod2html $< >$@ + +# PDF needs DIST variables; but having configure.ac as dependency isn't detected +README.pdf: readme.pod Makefile + pod2latex --full --out README.tex readme.pod + $(PERL) $(POD2LATEXFIX) "$(DISTTITLE) README File" "${DISTDATE}" < README.tex > README2.tex + mv README2.tex README.tex + pdflatex README.tex + pdflatex README.tex + -rm -f README.toc README.aux README.idx README.out + internals.txt: internals.pod -rm -f $@ $(POD2TEXT) --loose $< > $@ +internals.html: internals.pod + pod2html $< >$@ + +# PDF needs DIST variables; but having configure.ac as dependency isn't detected +internals.pdf: internals.pod Makefile + pod2latex --full --out internals.tex internals.pod + $(PERL) $(POD2LATEXFIX) "$(DISTTITLE) Internals Manual" "${DISTDATE}" < internals.tex > internals2.tex + mv internals2.tex internals.tex + pdflatex internals.tex + pdflatex internals.tex + -rm -f internals.toc internals.aux internals.idx internals.out + # See uninstall also - don't put wildcards in this variable, it might uninstall other stuff VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg \ verilator_includer verilator_profcfunc diff --git a/src/pod2latexfix b/src/pod2latexfix new file mode 100755 index 000000000..ceb3d976f --- /dev/null +++ b/src/pod2latexfix @@ -0,0 +1,33 @@ +#!/usr/bin/perl -w +###################################################################### +# +# Copyright 2002-2012 by Wilson Snyder. Verilator is free software; you +# can redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +###################################################################### + +# DESCRIPTION: Edits pod2latex output + +my $Opt_DistTitle = $ARGV[0] or die "%Error: No disttitle specified,"; +my $Opt_DistDate = $ARGV[1] or die "%Error: No distdate specified,"; + +my $header = ("\\usepackage[left=1.7in,right=1.7in,top=1.3in,bottom=1.3in]{geometry}\n" + ."\\usepackage[pdftex,bookmarks=true,bookmarksnumbered=true,hypertexnames=false,breaklinks=true,linkbordercolor={0 0 1}]{hyperref}\n" + ."\\usepackage{fancyhdr} \\pagestyle{fancy}\n" + ."\\setlength{\\parindent}{0pt} \\setlength{\\parskip}{\\baselineskip}\n" + ."\\title{${Opt_DistTitle}} \\date{${Opt_DistDate}} \\author{Wilson Snyder\\\\ http:\/\/www.veripool.org}\n" + ."\\lhead[${Opt_DistTitle}]{${Opt_DistTitle}}\n" + ); + +foreach my $line () { + $line =~ s/(\\begin{document})/${header}$1/; + $line =~ s/(\\tableofcontents)/\\begin{titlepage} \\maketitle \\end{titlepage}\n$1/; + print "$line"; +}