2 # fontconfig/Makefile.am
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 the author(s) not be used in
11 # advertising or publicity pertaining to distribution of the software without
12 # specific, written prior permission. The authors make no
13 # representations about the suitability of this software for any purpose. It
14 # is provided "as is" without express or implied warranty.
16 # THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 # EVENT SHALL THE AUTHOR(S) 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.
25 SUBDIRS=fontconfig fc-case fc-lang fc-glyphname src \
26 fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
37 CLEANFILES = fonts.conf
38 DISTCLEANFILES = config.cache doltcompile
39 MAINTAINERCLEANFILES = \
40 $(srcdir)/aclocal.m4 \
41 $(srcdir)/autoscan.log \
43 $(srcdir)/config.guess \
44 $(srcdir)/config.h.in \
45 $(srcdir)/config.sub \
46 $(srcdir)/configure.scan \
48 $(srcdir)/install-sh \
51 $(srcdir)/mkinstalldirs \
52 `find "$(srcdir)" -type f -name Makefile.in -print`
54 pkgconfigdir=$(libdir)/pkgconfig
55 pkgconfig_DATA = fontconfig.pc
61 RUN_FC_CACHE_TEST=false
63 RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
66 # Creating ChangeLog from git log:
68 MAINTAINERCLEANFILES += $(srcdir)/ChangeLog
69 EXTRA_DIST += ChangeLog
70 ChangeLog: $(srcdir)/ChangeLog
72 if test -d "$(srcdir)/.git"; then \
73 (GIT_DIR=$(top_srcdir)/.git ./missing --run git log --stat) | fmt --split-only > $@.tmp \
76 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
77 (test -f $@ || echo git-log is required to generate this file >> $@)); \
80 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
81 echo A git checkout and git-log is required to generate this file >> $@); \
86 fonts.conf: fonts.conf.in Makefile
88 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
89 -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \
90 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
91 -e 's,@PACKAGE\@,$(PACKAGE),g' \
92 -e 's,@VERSION\@,$(VERSION),g' \
93 $(srcdir)/$@.in > $@.tmp && \
96 install-data-local: fonts.conf
97 $(mkinstalldirs) $(DESTDIR)$(configdir) $(DESTDIR)$(fc_cachedir)
98 if [ -f $(DESTDIR)$(configdir)/fonts.conf ]; then \
99 echo "backing up existing $(DESTDIR)$(configdir)/fonts.conf"; \
100 mv $(DESTDIR)$(configdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf.bak; \
102 if [ -f $(srcdir)/fonts.conf ]; then \
103 echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
104 $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
105 else if [ -f fonts.conf ]; then \
106 echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
107 $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
109 @(if $(RUN_FC_CACHE_TEST); then \
110 echo "fc-cache$(EXEEXT) -s -f -v"; \
111 fc-cache/fc-cache$(EXEEXT) -s -f -v; \
114 echo "*** Warning: fonts.cache not built"; \
116 echo "*** Generate this file manually on host system using fc-cache"; \
121 if [ -f $(srcdir)/fonts.conf ]; then \
122 if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
123 echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
124 $(RM) $(DESTDIR)$(configdir)/fonts.conf; \
126 else if [ -f fonts.conf ]; then \
127 if cmp -s fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
128 echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
129 $(RM) $(DESTDIR)$(configdir)/fonts.conf; \
133 debuild debuild-signed: debuild-dirs
134 (cd $(distdir)/debian && debuild)
136 debuild-unsigned: debuild-dirs
137 (cd $(distdir)/debian && debuild -us -uc)
139 debuild-dirs: distdir
140 $(RM) $(PACKAGE)_$(VERSION).orig.tar.gz
141 $(RM) -r $(distdir).orig
142 cp -a $(distdir) $(distdir).orig
143 $(RM) -r $(distdir).orig/debian