Browse Source

* move preamble to separate include file so changes only need to
be done to this file.

peter 24 years ago
parent
commit
adb7873adc
10 changed files with 97 additions and 127 deletions
  1. 47 15
      docs/Makefile
  2. 3 14
      docs/internal.tex
  3. 3 15
      docs/onechap.tex
  4. 14 0
      docs/preamble.book
  5. 6 0
      docs/preamble.html
  6. 14 0
      docs/preamble.report
  7. 2 21
      docs/prog.tex
  8. 1 19
      docs/ref.tex
  9. 1 20
      docs/units.tex
  10. 6 23
      docs/user.tex

+ 47 - 15
docs/Makefile

@@ -24,6 +24,9 @@
 # Which docs are made when 'html' is specified
 HTML = user units ref prog
 
+# Can be 'report','book' or 'html'
+PREAMBLETYPE = report
+
 # Where do you want the html files to be put ?
 ifndef PREFIXINSTALLDIR
 PREFIXINSTALLDIR=/usr
@@ -168,6 +171,7 @@ help:
 	@echo ' pdfdist       : pdf, and archive result.'
 
 clean:
+	-rm -f preamble.inc date.inc
 	-rm -f *.htex
 	-rm -rf $(HTML) onechap
 	-rm -f $(TOC) $(LOG) $(DVI) $(PDF) $(AUX) $(OUT) $(PS) *.i* $(LOT) $(TXT) $(CHK)
@@ -234,26 +238,39 @@ endif
 messages: 
 	msg2inc -TE ../compiler/errore.msg messages.tex
 
+#
+# Include files
+#
+
 date.inc:
 	@echo \\date\{`date +'%B %Y'`\} > date.inc
 
+preamble.inc:
+	cp -f preamble.$(PREAMBLETYPE) preamble.inc
+
+includes: date.inc preamble.inc
+
+#
+# DVI files
+#
+
 onechap: onechap.dvi
 
-units.dvi: units.tex date.inc $(CHAPTERS)
+units.dvi: units.tex includes $(CHAPTERS)
 
-ref.dvi: ref.tex date.inc
+ref.dvi: ref.tex includes
 
-prog.dvi: prog.tex date.inc
+prog.dvi: prog.tex includes
 
-user.dvi: user.tex date.inc
+user.dvi: user.tex includes
 
-units.pdf: units.tex date.inc $(CHAPTERS)
+units.pdf: units.tex includes $(CHAPTERS)
 
-ref.pdf: ref.tex date.inc
+ref.pdf: ref.tex includes
 
-user.pdf: user.tex date.inc
+user.pdf: user.tex includes
 
-prog.pdf: prog.tex date.inc
+prog.pdf: prog.tex includes
 
 dvi : $(DVI)
 
@@ -275,11 +292,12 @@ htex.chk: $(wildcard *.tex)
 	touch htex.chk
 
 user: user.chk
-user.chk: htex.chk date.inc
+user.chk: htex.chk includes
 ifdef INSTALLDEBUG
 	mkdir user
 	cp user.tex user/index.html
 else
+	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 2 -link 2\
 	-t "User's guide for Free Pascal" user.htex
 	-sed -f foot.sed <user/footnode.html >user/footnote.html
@@ -290,11 +308,12 @@ endif
 	touch user.chk
 
 units: units.chk
-units.chk: unitex.chk htex.chk date.inc
+units.chk: unitex.chk htex.chk includes
 ifdef INSTALLDEBUG
 	mkdir units
 	cp units.tex units/index.html
 else
+	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 3 -link 2\
 	-t "Unit reference for Free Pascal" units.htex
 	-sed -f foot.sed <units/footnode.html >units/footnote.html
@@ -307,11 +326,12 @@ endif
 	touch units.chk
 
 ref: ref.chk
-ref.chk: refex.chk htex.chk date.inc
+ref.chk: refex.chk htex.chk includes
 ifdef INSTALLDEBUG
 	mkdir ref
 	cp ref.tex ref/index.html
 else
+	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 4 -link 2\
 	-t "Free Pascal reference guide" ref.htex
 	-sed -f foot.sed <ref/footnode.html >ref/footnote.html
@@ -324,11 +344,12 @@ endif
 	touch ref.chk	
 
 prog: prog.chk
-prog.chk: progex.chk htex.chk date.inc
+prog.chk: progex.chk htex.chk includes
 ifdef INSTALLDEBUG
 	mkdir prog
 	cp prog.tex prog/index.html
 else
+	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 2 -link 2\
 	-t "Free Pascal programmers guide" prog.htex
 	-sed -f foot.sed <prog/footnode.html >prog/footnote.html
@@ -341,11 +362,12 @@ endif
 	touch prog.chk
 
 internal: internal.chk
-internal.chk: htex.chk date.inc
+internal.chk: htex.chk 
 ifdef INSTALLDEBUG
 	mkdir internal
 	cp internal.tex internal/index.html
 else
+	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 4 -link 2\
 	-t "Free Pascal Compiler Documentation" internal.htex
 	-sed -f foot.sed <internal/footnode.html >internal/footnote.html
@@ -358,11 +380,12 @@ endif
 	touch internal.chk	
 
 onechap: onechap.chk
-onechap.chk: unitex.chk htex.chk date.inc
+onechap.chk: unitex.chk htex.chk includes
 ifdef INSTALLDEBUG
 	mkdir onechap
 	cp onechap.tex onechap/index.html
 else
+	cp -f preamble.html preamble.inc
 	$(LATEX2HTML) $(LATEX2HTMLOPTS) -split 4 -link 2\
 	-t "Free Pascal reference guide" onechap.htex
 	-sed -f foot.sed <onechap/footnode.html >onechap/footnote.html
@@ -376,6 +399,11 @@ endif
 
 html: $(HTML)
 
+
+#####################################################################
+# GTK Articles
+#####################################################################
+
 gtk: $(GTKPDF)
 
 gtk1.pdf: gtk1.tex
@@ -502,7 +530,11 @@ linuxexamples: examples
 
 #
 # $Log$
-# Revision 1.5  2001-07-10 22:01:15  michael
+# Revision 1.6  2001-07-29 20:28:00  peter
+#   * move preamble to separate include file so changes only need to
+#     be done to this file.
+#
+# Revision 1.5  2001/07/10 22:01:15  michael
 # + Some cleaning up
 #
 # Revision 1.4  2000/10/12 10:41:58  peter

+ 3 - 14
docs/internal.tex

@@ -18,20 +18,9 @@
 %   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 %   Boston, MA 02111-1307, USA.
 %
-\documentclass{report}
-%
-% Preamble
-%
-\ifx\pdfoutput\undefined
-  \usepackage{html}
-  \usepackage{htmllist}
-  \latex{\usepackage{fpc}}
-\else
-  \usepackage{fpc}
-\fi
-%
-\html{\input{fpc-html.tex}}
-%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Preamble.
+\input{preamble.inc}
 \ifpdf
   \pdfinfo{/Author(Michael Van Canneyt)
            /Title(Programmers' Guide)

+ 3 - 15
docs/onechap.tex

@@ -18,21 +18,9 @@
 %   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 %   Boston, MA 02111-1307, USA.
 %
-\documentclass{report}
-%
-% Preamble
-%
-\usepackage{tabularx}
-\ifx\pdfoutput\undefined
-  \usepackage{html}
-  \usepackage{htmllist}
-  \latex{\usepackage{fpc}}
-\else
-  \usepackage{fpc}
-\fi
-%
-\html{\input{fpc-html.tex}}
-%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Preamble.
+\input{preamble.inc}
 \ifpdf
   \pdfinfo{/Author(Michael Van Canneyt)
            /Title(Programmers' Guide)

+ 14 - 0
docs/preamble.book

@@ -0,0 +1,14 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Preamble for book output
+
+%
+\documentclass{book}
+
+%
+\usepackage{fpcbook}
+
+% Use times for PDF
+\ifx\pdfoutput\undefined
+\else
+  \usepackage{times}
+\fi

+ 6 - 0
docs/preamble.html

@@ -0,0 +1,6 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Preamble for HTML output
+%
+\usepackage{html}
+\usepackage{htmllist}
+\input{fpc-html.tex}

+ 14 - 0
docs/preamble.report

@@ -0,0 +1,14 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Preamble for report output
+
+%
+\documentclass{report}
+
+%
+\usepackage{fpc}
+
+% Use times for PDF
+\ifx\pdfoutput\undefined
+\else
+  \usepackage{times}
+\fi

+ 2 - 21
docs/prog.tex

@@ -20,26 +20,7 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Preamble.
-% Uncomment the one you need here. The book version is for the published
-% book version.
-%\documentclass{report}
-\documentclass{book}
-%
-% Preamble
-\usepackage{epsfig}
-\usepackage{multicol}
-\ifx\pdfoutput\undefined
-  \usepackage{html}
-  \usepackage{htmllist}
-%  \latex{\usepackage{fpc}}
-  \latex{\usepackage{fpcbook}}
-  \html{\input{fpc-html.tex}}
-\else
-  % Uncomment the fpc or fpcbook version, depending on the output format
-  % you want.
-%  \usepackage{fpc}
-  \usepackage{fpcbook}
-\fi
+\input{preamble.inc}
 \latex{%
   \ifpdf
   \pdfinfo{/Author(Michael Van Canneyt)
@@ -3050,7 +3031,7 @@ of your program.  This returns zero in the \fpc implementation of the
 system unit, since both code and data are in the same memory space.
 \item [Ptr]: Accepted a segment and offset from an address, and would return
 a pointer to this address. This has been changed in the run-time library, it
-now simply returns the offset. 
+now simply returns the offset.
 \item [memw and mem]: These arrays gave access to the \dos memory. \fpc
 supports them on the go32v2 platform, they are mapped into \dos memory
 space. You need the \file{go32} unit for this. On other platforms, they are

+ 1 - 19
docs/ref.tex

@@ -20,25 +20,7 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Preamble.
-% Uncomment the one you need here. The book version is for the published
-% book version.
-%\documentclass{report}
-\documentclass{book}
-%
-% Preamble
-%
-\ifx\pdfoutput\undefined
-  \usepackage{html}
-  \usepackage{htmllist}
-%  \latex{\usepackage{fpc}}
-  \latex{\usepackage{fpcbook}}
-  \html{\input{fpc-html.tex}}
-\else
-% Uncomment the fpc or fpcbook version, depending on the output format
-% you want.
-%  \usepackage{fpc}
-  \usepackage{fpcbook}
-\fi
+\input{preamble.inc}
 \latex{%
   \ifpdf
   \pdfinfo{/Author(Michael Van Canneyt)

+ 1 - 20
docs/units.tex

@@ -20,26 +20,7 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Preamble.
-% Uncomment the one you need here. The book version is for the published
-% book version.
-%\documentclass{report}
-\documentclass{book}
-%
-% Preamble
-%
-\usepackage{multicol}
-\ifx\pdfoutput\undefined
-  \usepackage{html}
-  \usepackage{htmllist}
-%  \latex{\usepackage{fpc}}
-  \latex{\usepackage{fpcbook}}
-  \html{\input{fpc-html.tex}}
-\else
-% Uncomment the fpc or fpcbook version, depending on the output format
-% you want.
-%  \usepackage{fpc}
-  \usepackage{fpcbook}
-\fi
+\input{preamble.inc}
 \latex{%
   \ifpdf
     \pdfinfo{/Author(Michael Van Canneyt)

+ 6 - 23
docs/user.tex

@@ -18,27 +18,10 @@
 %   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 %   Boston, MA 02111-1307, USA.
 %
-%\documentclass{book}
-\documentclass{report}
-%
-% Preamble
-%
-% Don't know why it's needed, but latex2html will else core dump
-% when trying to create an image
-\usepackage{epsfig}
-\usepackage{multicol}
-\ifx\pdfoutput\undefined
-  \usepackage{html}
-  \usepackage{htmllist}
-  \latex{\usepackage{fpc}}
-%  \latex{\usepackage{fpcbook}}
-  \html{\input{fpc-html.tex}}
-\else
-  \usepackage{fpc}
-%  \usepackage{fpcbook}
-\fi
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Preamble.
+\input{preamble.inc}
 \latex{%
-  \usepackage{times}
   \ifpdf
   \pdfinfo{/Author(Michael Van Canneyt)
            /Title(Users' Guide)
@@ -866,7 +849,7 @@ full in the programmers guide.
 \item \textbf{IO-error -2 at ...} : Under \linux you can get this message at
 compiler startup. It means typically that the compiler doesn't find the
 error definitions file. You can correct this mistake with the \seeo{Fr}
-option under \linux. 
+option under \linux.
 \item \textbf {Error : File not found : xxx} or \textbf{Error: couldn't compile
 unit xxx}: This typically happens when
 your unit path isn't set correctly. Remember that the compiler looks for
@@ -1513,9 +1496,9 @@ which were possible in Turbo Pascal are no longer possible in Free Pascal.
 \item A file is opened for output only (using \var{fmOutput}) when it is
 opened with \var{Rewrite}. In order to be able to read from it, it should
 be reset with \var{Reset}.
-\item Destructors cannot have parameters. This restriction can be solved by 
+\item Destructors cannot have parameters. This restriction can be solved by
 using the \var{-So} switch.
-\item There can be only one destructor. This restriction can also be 
+\item There can be only one destructor. This restriction can also be
 solved by using the \var{-So} switch.
 \item The order in which expressions are evaluated is not necessarily the
 same. In the following expression: