blob: dcffc63225e562e2d921b2c01e6cf5996b2a0acf (
plain)
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
|
#
# design documentation build rules
#
SUBDIRS=XFS_Performance_Tuning
# Never blow away subdirs
.PRECIOUS: $(SUBDIRS)
.PHONY: $(SUBDIRS)
DOCFILES=$(wildcard *.asciidoc)
HTML_TARGETS=$(addsuffix .html, $(basename $(DOCFILES)))
PDF_TARGETS=$(addsuffix .pdf, $(basename $(DOCFILES)))
EPUB_TARGETS=$(addsuffix .epub, $(basename $(DOCFILES)))
%.html: %.asciidoc
@echo "[html] $*"
$(Q)a2x -f xhtml $<
%.pdf: %.asciidoc
@echo "[pdf] $*"
$(Q)a2x -f pdf $<
%.epub: %.asciidoc
@echo "[epub] $*"
$(Q)a2x -f epub $<
default: html pdf epub $(SUBDIRS)
$(SUBDIRS):
@echo "Building $@"
$(Q)$(MAKE) $(MAKEOPTS) -q -C $@ || $(MAKE) $(MAKEOPTS) -C $@
html: $(HTML_TARGETS)
pdf: $(PDF_TARGETS)
epub: $(EPUB_TARGETS)
# manually construct build dependencies for target builds so that modification
# of individual files will trigger a rebuild of the document correctly.
$(PDF_TARGETS): $(DOCFILES)
$(HTML_TARGETS): $(DOCFILES)
$(EPUB_TARGETS): $(DOCFILES)
clean: $(addsuffix -clean, $(SUBDIRS))
$(Q)rm -f *.html *.pdf *.css *.epub
%-clean:
@echo "Cleaning $*"
$(Q)$(MAKE) $(MAKEOPTS) -C $* clean
|