4 # Copyright © 2003 Keith Packard
6 # Permission to use, copy, modify, distribute, and sell this software and its
7 # documentation for any purpose is hereby granted without fee, provided that
8 # the above copyright notice appear in all copies and that both that
9 # copyright notice and this permission notice appear in supporting
10 # documentation, and that the name of Keith Packard not be used in
11 # advertising or publicity pertaining to distribution of the software without
12 # specific, written prior permission. Keith Packard makes no
13 # representations about the suitability of this software for any purpose. It
14 # is provided "as is" without express or implied warranty.
16 # KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 # EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 # PERFORMANCE OF THIS SOFTWARE.
24 DOC_SRC = ${top_srcdir}/doc
25 DOC_BLD = ${top_builddir}/doc
26 DOC_MODULE = fontconfig
27 DOC2HTML = docbook2html
31 TXT = fontconfig-user.txt fontconfig-devel.txt
32 HTML_FILES = fontconfig-user.html
33 HTML_DIRS = fontconfig-devel
34 SGML = ${DOC_SRC}/fontconfig-user.sgml ${DOC_SRC}/fontconfig-devel.sgml
35 FNCS_TMPL = ${DOC_SRC}/func.sgml
73 man_MANS=fonts-conf.5 \
74 FcAtomicCreate.3 FcAtomicDeleteNew.3 FcAtomicDestroy.3 FcAtomicLock.3 \
75 FcAtomicNewFile.3 FcAtomicOrigFile.3 FcAtomicReplaceOrig.3 FcAtomicUnlock.3 \
76 FcBlanksAdd.3 FcBlanksCreate.3 FcBlanksDestroy.3 FcBlanksIsMember.3 \
77 FcCharSetAddChar.3 FcCharSetCopy.3 FcCharSetCount.3 FcCharSetCreate.3 \
78 FcCharSetDestroy.3 FcCharSetEqual.3 FcCharSetFirstPage.3 FcCharSetHasChar.3 \
79 FcCharSetIntersect.3 FcCharSetIntersectCount.3 FcCharSetIsSubset.3 \
80 FcCharSetNextPage.3 FcCharSetSubtract.3 FcCharSetSubtractCount.3 \
81 FcCharSetUnion.3 FcConfigAppFontAddDir.3 FcConfigAppFontAddFile.3 \
82 FcConfigAppFontClear.3 FcConfigBuildFonts.3 FcConfigCreate.3 \
83 FcConfigDestroy.3 FcConfigFilename.3 FcConfigGetBlanks.3 FcConfigGetCache.3 \
84 FcConfigGetConfigDirs.3 FcConfigGetConfigFiles.3 FcConfigGetCurrent.3 \
85 FcConfigGetFontDirs.3 FcConfigGetFonts.3 FcConfigGetRescanInverval.3 \
86 FcConfigParseAndLoad.3 FcConfigSetCurrent.3 FcConfigSetRescanInverval.3 \
87 FcConfigSubstitute.3 FcConfigSubstituteWithPat.3 FcConfigUptoDate.3 \
88 FcDefaultSubstitute.3 FcDirCacheValid.3 FcDirSave.3 FcDirScan.3 FcFini.3 FcFileScan.3 \
89 FcFontList.3 FcFontMatch.3 FcFontRenderPrepare.3 FcFontSetAdd.3 \
90 FcFontSetCreate.3 FcFontSetDestroy.3 FcFontSort.3 FcFreeTypeCharIndex.3 \
91 FcFreeTypeCharSet.3 FcFreeTypeQuery.3 FcGetVersion.3 FcInit.3 \
92 FcInitBringUptoDate.3 FcInitLoadConfig.3 FcInitLoadConfigAndFonts.3 \
93 FcInitReinitialize.3 FcMatrixCopy.3 FcMatrixEqual.3 FcMatrixInit.3 \
94 FcMatrixMultiply.3 FcMatrixRotate.3 FcMatrixScale.3 FcMatrixShear.3 \
95 FcNameConstant.3 FcNameGetConstant.3 FcNameGetObjectType.3 FcNameParse.3 \
96 FcNameRegisterConstants.3 FcNameRegisterObjectTypes.3 FcNameUnparse.3 \
97 FcNameUnregisterConstants.3 FcNameUnregisterObjectTypes.3 FcObjectSetAdd.3 \
98 FcObjectSetBuild.3 FcObjectSetCreate.3 FcObjectSetDestroy.3 \
99 FcPatternAdd-Type.3 FcPatternAdd.3 FcPatternAddWeak.3 FcPatternBuild.3 \
100 FcPatternCreate.3 FcPatternDel.3 FcPatternDestroy.3 FcPatternEqual.3 \
101 FcPatternEqualSubset.3 FcPatternGet-Type.3 FcPatternGet.3 FcPatternHash.3 \
102 FcPatternPrint.3 FcStrBasename.3 FcStrCmpIgnoreCase.3 FcStrCopy.3 \
103 FcStrCopyFilename.3 FcStrDirname.3 FcStrListCreate.3 FcStrListDone.3 \
104 FcStrListNext.3 FcStrSetAdd.3 FcStrSetAddFilename.3 FcStrSetCreate.3 \
105 FcStrSetDel.3 FcStrSetDestroy.3 FcStrSetMember.3 FcUcs4ToUtf8.3 FcUtf16Len.3 \
106 FcUtf16ToUcs4.3 FcUtf8Len.3 FcUtf8ToUcs4.3 FcValueDestroy.3 FcValueSave.3
108 noinst_PROGRAMS=edit-sgml
109 edit_sgml_SOURCES=edit-sgml.c
113 DOC_FILES=$(TXT) $(HTML_FILES)
114 DOC_DIRS=$(HTML_DIRS)
115 LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(DOC_DIRS)
117 EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in
119 SUFFIXES=.fncs .sgml .txt .html
125 ./edit-sgml $(FNCS_TMPL) < `test -f '$<' || echo '$(srcdir)/'`$< > $*.sgml
129 test -f '$<' || ln -s '$(srcdir)/'$< $<
132 $(man_MANS): func.refs
134 func.refs: fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
136 $(DOC2MAN) fontconfig-devel.sgml
137 mv manpage.refs func.refs
140 $(DOC_FUNCS_SGML): edit-sgml $(FNCS_TMPL)
142 fonts-conf.5: fontconfig-user.sgml version.sgml confdir.sgml
144 $(DOC2MAN) fontconfig-user.sgml
145 $(RM) manpage.refs manpage.links
147 all-local: $(LOCAL_DOCS)
150 $(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
153 fontconfig-devel: ./fontconfig-devel.sgml $(DOCS_FUNCS_SGML) version.sgml confdir.sgml
154 $(RM) -r fontconfig-devel
155 $(DOC2HTML) -o fontconfig-devel fontconfig-devel.sgml
157 fontconfig-devel.txt: ./fontconfig-devel.sgml version.sgml confdir.sgml
159 fontconfig-user.html: ./fontconfig-user.sgml version.sgml confdir.sgml
160 $(DOC2HTML) -u fontconfig-user.sgml
162 fontconfig-user.txt: ./fontconfig-user.sgml version.sgml confdir.sgml
164 ./fontconfig-user.sgml: ALWAYS
165 test -f fontconfig-user.sgml || $(LN_S) ${srcdir}/fontconfig-user.sgml fontconfig-user.sgml
167 ./fontconfig-devel.sgml: ALWAYS
168 test -f fontconfig-devel.sgml || $(LN_S) ${srcdir}/fontconfig-devel.sgml fontconfig-devel.sgml
172 STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
173 confdir.sgml: ${DOC_SRC}/confdir.sgml.in
174 sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
185 $(mkinstalldirs) $(DESTDIR)$(DOCDIR)
186 for i in $(DOC_FILES); do \
187 echo '-- Installing '$$i ; \
188 $(INSTALL_DATA) $$i $(DESTDIR)$(DOCDIR)/$$i; \
190 for i in $(DOC_DIRS); do \
191 $(mkinstalldirs) $(DESTDIR)$(DOCDIR)/$$i ; \
193 echo '-- Installing '$$f ; \
194 $(INSTALL_DATA) $$f $(DESTDIR)$(DOCDIR)/$$f; \
199 for i in $(DOC_FILES); do \
200 echo '-- Uninstalling '$$i ; \
201 $(RM) $(DESTDIR)$(DOCDIR)/$$i ; \
203 for i in $(DOC_DIRS); do \
204 echo '-- Uninstalling '$$i ; \
205 rm -rf $(DESTDIR)$(DOCDIR)/$$i ; \
207 rmdir $(DESTDIR)$(DOCDIR)