1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
TOPDIR=../..
DOCBOOKS := alsa-driver-api.sgml writing-an-alsa-driver.sgml
include $(TOPDIR)/Makefile.conf
TOPDIR = $(MAINSRCDIR)
CURDIR = $(subst $(MAINSRCDIR)/,,$(shell /bin/pwd))
# The targets that may be used.
.PHONY: depend sgmldocs psdocs pdfdocs htmldocs clean mrproper
BOOKS := $(DOCBOOKS)
sgmldocs: $(BOOKS)
PS := $(patsubst %.sgml, %.ps, $(BOOKS))
psdocs: $(PS) $(DOCPROC)
PDF := $(patsubst %.sgml, %.pdf, $(BOOKS))
pdfdocs: $(PDF) $(DOCPROC)
HTML := $(patsubst %.sgml, %, $(BOOKS))
htmldocs: $(HTML) $(DOCPROC)
###
# non-standard rules below to simplify...
KERNELDOC=$(TOPDIR)/scripts/kernel-doc
DOCPROC=$(TOPDIR)/scripts/docproc
$(DOCPROC):
$(MAKE) -C $(TOPDIR)/scripts docproc
%.tmpl:
ln -s $(TOPDIR)/alsa-kernel/Documentation/DocBook/$@
%.sgml: %.tmpl
(cd $(TOPDIR);\
$(DOCPROC) doc $(CURDIR)/$< > $(CURDIR)/$@)
###
DVI := $(patsubst %.sgml, %.dvi, $(BOOKS))
AUX := $(patsubst %.sgml, %.aux, $(BOOKS))
TEX := $(patsubst %.sgml, %.tex, $(BOOKS))
LOG := $(patsubst %.sgml, %.log, $(BOOKS))
OUT := $(patsubst %.sgml, %.out, $(BOOKS))
clean:
rm -f core *~
rm -f $(BOOKS) $(patsubst %.sgml, %.tmpl, $(BOOKS))
rm -f $(DVI) $(AUX) $(TEX) $(LOG) $(OUT)
rm -f $(PNG-parportbook) $(EPS-parportbook)
rm -f $(C-procfs-example)
mrproper: clean
rm -f $(PS) $(PDF)
rm -f -r $(HTML)
rm -f .depend
rm -f $(TOPDIR)/scripts/mkdep-docbook
rm -rf DBTOHTML_OUTPUT*
JADE = openjade
JADETEX = jadetex
PDFJADETEX = pdfjadetex
DVIPS = dvips
DSLBASE = /usr/share/sgml
JADECTL = $(DSLBASE)/openjade/catalog
DOCBKCTL = $(DSLBASE)/CATALOG.docbook_4
DOCBKPRN = $(DSLBASE)/docbook/dsssl-stylesheets/print/docbook.dsl
DOCBKHTM = $(DSLBASE)/docbook/dsssl-stylesheets/html/docbook.dsl
JADEX = $(JADE) -c $(DOCBKCTL) -c $(JADECTL)
%.html: %.sgml
$(JADEX) -d $(DOCBKHTM) -t sgml $<
%.tex: %.sgml
$(JADEX) -d $(DOCBKPRN) -t tex $<
%.css: %.sgml
$(JADEX) -d $(DOCBKHTM) -t html -o $@ $<
%.dvi: %.tex
$(JADETEX) $< && $(JADETEX) $< && $(JADETEX) $<
%.pdf: %.tex
$(PDFJADETEX) $< && $(PDFJADETEX) $< && $(PDFJADETEX) $<
%.ps: %.dvi
$(DVIPS) $<
%: %.sgml
rm -rf $@
mkdir $@
(cd $@;\
$(JADEX) -d $(DOCBKHTM) -t sgml ../$<)
|