Commit d35eb409 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(pdf): New target.

(html): New target.
(Protocol-A.dvi): New target.
(Protocol-A.pdf): Use texi2dvi --pdf instead of texi2pdf.
(protocol-a.texi): New target.  Major hack.  Expand a few of the
	macros so that texinfo.tex can cope with the rest.
(protocol-a/index.html): New target.
(.texi.notab): Use automake comments instead of /bin/sh comments.
(update-www): Also depend on protocol-a/index.html, Protocol-A.dvi
	and Protocol-A.pdf, and install them.
(check): Also depend on the targets pdf and dvi.
parent d7c77828
# $Id:,v 1.40 2002/01/01 14:47:58 ceder Exp $
# $Id:,v 1.41 2002/03/29 19:19:32 ceder Exp $
# Copyright (C) 1998-1999, 2001 Lysator Academic Computer Association.
# This file is part of the LysKOM server.
......@@ -36,6 +36,10 @@ EXTRA_DIST = .cvsignore \ \
# Automake does not yet support these targets automatically.
pdf: Protocol-A.pdf
html: protocol-a/index.html protocol-a.html
# Automake tries to generate this rule automatically, but it fails
# because of the capital letters in the file name of the source file. Protocol-A.texi
......@@ -43,17 +47,51 @@ Protocol-A.texi
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
# The TeX implementation cannot cope with Protocol-A.texi. We use too
# many macros in too complex ways. But if we expand a few of them
# with a simple sed-script, texinfo.tex will do a fair job.
# Unfortunately, this means that the automake magic fails, so we
# disable it with a explicit targets for the dvi and pdf output.
Protocol-A.dvi: protocol-a.texi
TEXINPUTS="../scripts:$$TEXINPUTS" \
MAKEINFO='makeinfo -I .' \
texi2dvi protocol-a.texi
mv protocol-a.dvi $@
Protocol-A.pdf: protocol-a.texi
TEXINPUTS="../scripts:$$TEXINPUTS" \
MAKEINFO='makeinfo -I .' \
texi2dvi --pdf protocol-a.texi
mv protocol-a.pdf $@
protocol-a.texi: Protocol-A.texi
## This sed script works with texinfo.tex version 2002-03-26.08.
## With any luck, this could be replaced by a simple "cp" when
## a future version of texinfo.tex is created.
sed < $(srcdir)/Protocol-A.texi \
-e 's/@holl{\([^,]*\),\([^}]*\)}/\1H\2/g' \
-e 's/@value{IAM}/Inl@"a{}gg @}t mig/g' \
-e 's/@lt{\([^}]*\)}/\1/g' \
> $@.tmp
chmod 444 $@.tmp
$(RM) $@
mv $@.tmp $@
SUFFIXES = .texi .notab
@# Mixing tabs and non-tabs may cause the info file to look
@# ugly. Ban tabs.
## Mixing tabs and non-tabs may cause the info file to look
## ugly. Ban tabs.
$(RM) $@
if grep -n ' ' $< /dev/null ; then echo tabs detected ; exit 1; fi
gawk 'length($0) > 79 {print FILENAME ":" NR ": too long line"; e=1} \
END {exit(e)}' $<
echo no tabs found > $@
protocol-a/index.html: Protocol-A.texi
makeinfo --html $(srcdir)/Protocol-A.texi
protocol-a.html: Protocol-A.texi
makeinfo --html --no-split $(srcdir)/Protocol-A.texi
......@@ -62,9 +100,11 @@ protocol-a.html: Protocol-A.texi
PROTOEDITION=`sed -n 's/^@set PROTOEDITION //p' < $(srcdir)/Protocol-A.texi`
update-www: protocol-a.html # Protocol-A.dvi Protocol-A.pdf
update-www: protocol-a.html protocol-a/index.html \
Protocol-A.dvi Protocol-A.pdf
cd $(WWWROOT) || false
rm -rf $(WWWREV) Protocol-A-$(PROTOEDITION)-info \
rm -rf $(WWWREV) \
Protocol-A-$(PROTOEDITION)-info \
$(WWWROOT)/Protocol-A-$(PROTOEDITION)-info.tar \
mkdir $(WWWREV)
......@@ -75,16 +115,14 @@ update-www: protocol-a.html # Protocol-A.dvi Protocol-A.pdf
echo Protocol-A-$(PROTOEDITION)-info.tar|(cd $(WWWROOT)&&xargs gzip -9)
cp $(srcdir)/Protocol-A.texi $(WWWROOT)/Protocol-A-$(PROTOEDITION).texi
rm -r Protocol-A-$(PROTOEDITION)-info
## cp Protocol-A.dvi $(WWWROOT)/Protocol-A-$(PROTOEDITION).dvi
## cp Protocol-A.pdf $(WWWROOT)/Protocol-A-$(PROTOEDITION).pdf
cp Protocol-A.dvi $(WWWROOT)/Protocol-A-$(PROTOEDITION).dvi
cp Protocol-A.pdf $(WWWROOT)/Protocol-A-$(PROTOEDITION).pdf
ln -s ../Protocol-A-$(PROTOEDITION).texi $(WWWREV)/Protocol-A.texi
cp protocol-a.html $(WWWREV)/protocol-a.html
cp protocol-a/* $(WWWREV)/
echo "Don't forget to edit $(WWWROOT)/index.html"
Protocol-A.pdf: Protocol-A.texi
texi2pdf $(srcdir)/Protocol-A.texi
check: check-doc
check: check-doc pdf dvi
check-doc: Protocol-A.notab lyskomd.notab info
## Create a list of all aux-items.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment