docbook-quickguide-makefile-20061201
authorRuss Allbery <rra@stanford.edu>
Sat, 2 Dec 2006 02:22:34 +0000 (02:22 +0000)
committerRuss Allbery <rra@stanford.edu>
Sat, 2 Dec 2006 02:22:34 +0000 (02:22 +0000)
Add some comments to the makefile, set up dependencies to build the index
automatically, remove a bunch of unnecessary @-signs in front of commands,
and add a clean target.

doc/xml/QuickStartUnix/Makefile

index 1e68c79..124aae3 100644 (file)
@@ -1,22 +1,38 @@
+# Makefile to build the AFS QuickStart guide for Unix.
+#
+# This makefile assumes that various utilities are available on the system.
+# On Debian etch, installing the packages:
+#
+#     docbook-utils
+#     docbook-dsssl
+#     libxml2-utils
+#
+# gave me all the utilities needed.  You may need to install fewer packages as
+# several depend on the others.
+
 BOOK = auqbg000.xml
 IDX = auqbg009.xml
-SRCS = $(BOOK) auqbg003.xml auqbg004.xml auqbg005.xml auqbg006.xml auqbg007.xml auqbg008.xml
+SRCS = $(BOOK) auqbg003.xml auqbg004.xml auqbg005.xml auqbg006.xml \
+       auqbg007.xml auqbg008.xml
 FLAGS = -e no-idref
 
 all: pdf html
 
-html: $(SRCS)
-       docbook2html $(FLAGS) -d mystyle.dsl#html $(BOOK)
+html: $(SRCS) $(IDX)
+       docbook2html $(FLAGS) -d mystyle.dsl\#html $(BOOK)
 
-pdf: $(SRCS)
-       docbook2pdf $(FLAGS) -d mystyle.dsl#print $(BOOK)
+pdf: $(SRCS) $(IDX)
+       docbook2pdf $(FLAGS) -d mystyle.dsl\#print $(BOOK)
 
-index:
+$(IDX): $(SRCS)
        @echo "Building index..."
-       @/usr/bin/collateindex.pl -N -o $(IDX)
-       @jw -d mystyle.dsl#html -V html-index -o tmpindex $(BOOK)
-       @/usr/bin/collateindex.pl -g -o $(IDX) tmpindex/HTML.index
-       @rm -rf tmpindex
+       /usr/bin/collateindex.pl -N -o $(IDX)
+       jw -d mystyle.dsl\#html -V html-index -o tmpindex $(BOOK)
+       /usr/bin/collateindex.pl -g -o $(IDX) tmpindex/HTML.index
+       rm -rf tmpindex
 
 check:
        xmllint --noout --valid $(BOOK)
+
+clean:
+       rm -f *.html *.pdf $(IDX)