summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
blob: 6b18c1aed36ad89dc5ba0d8ada8fdd64e09f5df3 (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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
DOC_MODULE=fontconfig
DOC2HTML=docbook2html
DOC2TXT=docbook2txt
DOC2MAN=docbook2man

TXT=fontconfig-user.txt fontconfig-devel.txt
HTML=fontconfig-user/index.html fontconfig-devel/index.html
SGML=fontconfig-user.sgml fontconfig-devel.sgml

DOC_FUNCS_FNCS=\
	fcmatrix.fncs \
	fccharset.fncs \
	fcvalue.fncs \
	fcpattern.fncs \
	fcfontset.fncs \
	fcobjectset.fncs \
	fcobjecttype.fncs \
	fcconstant.fncs \
	fcblanks.fncs \
	fcconfig.fncs
	
DOC_FUNCS_SGML=\
	fcmatrix.sgml \
	fccharset.sgml \
	fcvalue.sgml \
	fcpattern.sgml \
	fcfontset.sgml \
	fcobjectset.sgml \
	fcobjecttype.sgml \
	fcconstant.sgml \
	fcblanks.sgml \
	fcconfig.sgml
	
man3_MANS= \
	FcCharSetAddChar.3 \
	FcCharSetCopy.3 \
	FcCharSetCount.3 \
	FcCharSetCreate.3 \
	FcCharSetDestroy.3 \
	FcCharSetEqual.3 \
	FcCharSetFirstPage.3 \
	FcCharSetHasChar.3 \
	FcCharSetIntersect.3 \
	FcCharSetIntersectCount.3 \
	FcCharSetIsSubset.3 \
	FcCharSetNextPage.3 \
	FcCharSetSubtract.3 \
	FcCharSetSubtractCount.3 \
	FcCharSetUnion.3 \
	FcMatrixCopy.3 \
	FcMatrixEqual.3 \
	FcMatrixInit.3 \
	FcMatrixMultiply.3 \
	FcMatrixRotate.3 \
	FcMatrixScale.3 \
	FcMatrixShear.3 \
	FcValueDestroy.3 \
	FcValueSave.3

noinst_PROGRAMS=edit-sgml
edit_sgml_SOURCES=edit-sgml.c

DOCDIR=@DOCDIR@
TARGET_DIR=$(DOCDIR)

SUFFIXES=.fncs .sgml .txt .html

.fncs.sgml:
	$(RM) $@
	./edit-sgml func.sgml < $*.fncs > $*.sgml

.sgml.txt:
	$(RM) $@
	$(DOC2TXT) $*.sgml

EXTRA_DIST = $(TXT) $(HTML) $(SGML) $(man3_MANS)
	
if ENABLE_DOCS
DOCS=$(TXT) $(HTML)
all-local: all-local-docs
clean-local: clean-local-docs
install-data-local: install-local-docs
else
all-local:
clean-local:
install-data-local:
endif

$(man3_MANS): manpage.refs

$(DOCS): $(DOC_FUNCS_SGML)

manpage.refs: fontconfig-devel.sgml $(DOC_FUNCS_SGML)
	$(DOC2MAN) fontconfig-devel.sgml

$(DOC_FUNCS_SGML): edit-sgml func.sgml

all-local-docs: $(DOCS)

clean-local-docs:
	rm -f $(DOCS)

fontconfig-devel/index.html: fontconfig-devel.sgml
	$(RM) -rf fontconfig-devel
	docbook2html -o fontconfig-devel fontconfig-devel.sgml

fontconfig-user/index.html: fontconfig-user.sgml
	$(RM) -rf fontconfig-user
	docbook2html -o fontconfig-user fontconfig-user.sgml

install-local-docs:
	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
	for i in $(DOCS); do \
	  echo '-- Installing'$$i ; \
	  $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR)/$$i; \
	done