Skip to content
Snippets Groups Projects
Commit 2fbdd2d9 authored by Alessandro Rubini's avatar Alessandro Rubini
Browse files

doc/Makefile: use multiple input, general cleanup

parent 210ae84c
No related merge requests found
...@@ -4,71 +4,53 @@ ...@@ -4,71 +4,53 @@
# Copyright 1994,2000,2010,2011 Alessandro Rubini <rubini@linux.it> # Copyright 1994,2000,2010,2011 Alessandro Rubini <rubini@linux.it>
# #
################# #################
#
# BE CAREFUL in editing:
# due to the large number of index files, and my use of a non standard
# info input file, any file $(TARGET).* is removed by "make clean"
#
# I chose to use a prefix for the input file ("doc.$(TARGET)"), to ease
# makeing clean and applying my own rules.
#
###################################################################
TARGET = wrs-software
# Assume makeinfo can do images and --html.
# In any case, MAKEINFO can be specified on the commandline
MAKEINFO = makeinfo
##############################################
# There is not basenames here, all *.in are considered input
INPUT = $(wildcard *.in) INPUT = $(wildcard *.in)
TEXI = $(INPUT:.in=.texi) TEXI = $(INPUT:.in=.texi)
INFO = $(INPUT:.in=.info)
HTML = $(INPUT:.in=.html)
TXT = $(INPUT:.in=.txt)
PDF = $(INPUT:.in=.pdf)
.SUFFIXES: .in .texi .info .html .txt ALL = $(INFO) $(HTML) $(TXT) $(PDF)
.in.texi: MAKEINFO ?= makeinfo
%.texi: %.in
@rm -f $@ @rm -f $@
sed -f ./infofilter $< > $@ sed -f ./infofilter $< > $@
emacs -batch --no-site-file -l fixinfo $@ emacs -batch --no-site-file -l fixinfo $@
chmod -w $@ chmod -w $@
# unfortuantely implicit rules are not concatenated, so force a make run %.pdf: %.texi
%.pdf: %.texi $(TEXI)
$(MAKE) $(TEXI)
texi2pdf --batch $< texi2pdf --batch $<
%.info: %.texi $(TEXI) %.info: %.texi
$(MAKE) $(TEXI)
$(MAKEINFO) $< -o $@ $(MAKEINFO) $< -o $@
%.html: %.texi $(TEXI) %.html: %.texi
$(MAKE) $(TEXI)
$(MAKEINFO) --html --no-split -o $@ $< $(MAKEINFO) --html --no-split -o $@ $<
%.txt: %.texi $(TEXI) %.txt: %.texi
$(MAKE) $(TEXI)
$(MAKEINFO) --no-headers $< > $@ $(MAKEINFO) --no-headers $< > $@
############################################## ##############################################
.PHONY: all images check terse clean install
.INTERMEDIATE: $(TEXI)
ALL = $(TARGET).info $(TARGET).txt $(TARGET).html $(TARGET).pdf all: images $(ALL)
$(MAKE) terse
all: images $(TEXI) $(ALL)
images:: images::
if [ -d images ]; then $(MAKE) -C images || exit 1; fi if [ -d images ]; then $(MAKE) -C images || exit 1; fi
info: $(TARGET).info
check: _err.ps check: _err.ps
gs -sDEVICE=linux -r320x200x16 $< gs -sDEVICE=linux -r320x200x16 $<
terse: terse:
for n in cp fn ky pg toc tp vr; do \ for n in cp fn ky pg toc tp vr aux log; do rm -f *.$$n; done
rm -f $(TARGET).$$n; \
done
rm -f *~ rm -f *~
clean: terse clean: terse
......
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