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.
24 SUBDIRS=fontconfig fc-case fc-lang fc-glyphname src \
25 fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
26 fc-validate conf.d test
31 ACLOCAL_AMFLAGS = -I m4
41 CLEANFILES = fonts.conf
42 DISTCLEANFILES = config.cache doltcompile
43 MAINTAINERCLEANFILES = \
44 $(srcdir)/aclocal.m4 \
45 $(srcdir)/autoscan.log \
47 $(srcdir)/config.guess \
48 $(srcdir)/config.h.in \
49 $(srcdir)/config.sub \
50 $(srcdir)/configure.scan \
52 $(srcdir)/install-sh \
55 $(srcdir)/mkinstalldirs \
56 $(srcdir)/test-driver \
57 `find "$(srcdir)" -type f -name Makefile.in -print`
59 pkgconfig_DATA = fontconfig.pc
61 baseconfigdir = $(BASECONFIGDIR)
62 configdir = $(CONFIGDIR)
68 RUN_FC_CACHE_TEST=false
70 RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
73 # Creating ChangeLog from git log:
75 MAINTAINERCLEANFILES += $(srcdir)/ChangeLog
76 EXTRA_DIST += ChangeLog
77 ChangeLog: $(srcdir)/ChangeLog
79 if test -d "$(srcdir)/.git"; then \
80 (GIT_DIR=$(top_srcdir)/.git $(GIT) log --stat) | fmt --split-only > $@.tmp \
83 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
84 (test -f $@ || echo git-log is required to generate this file >> $@)); \
87 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
88 echo A git checkout and git-log is required to generate this file >> $@); \
93 fonts.conf: fonts.conf.in Makefile
95 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
96 -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \
97 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
98 -e 's,@CONFIGDIR\@,$(CONFIGDIR),g' \
99 -e 's,@PACKAGE\@,$(PACKAGE),g' \
100 -e 's,@VERSION\@,$(VERSION),g' \
101 $(srcdir)/$@.in > $@.tmp && \
104 install-data-local: fonts.conf
105 $(mkinstalldirs) $(DESTDIR)$(baseconfigdir) $(DESTDIR)$(fc_cachedir)
106 if [ -f $(DESTDIR)$(baseconfigdir)/fonts.conf ]; then \
107 echo "backing up existing $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
108 mv $(DESTDIR)$(baseconfigdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf.bak; \
110 if [ -f $(srcdir)/fonts.conf ]; then \
111 echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
112 $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \
113 else if [ -f fonts.conf ]; then \
114 echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
115 $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \
117 @(if $(RUN_FC_CACHE_TEST); then \
118 echo "fc-cache$(EXEEXT) -s -f -v"; \
119 fc-cache/fc-cache$(EXEEXT) -s -f -v; \
122 echo "*** Warning: fonts.cache not built"; \
124 echo "*** Generate this file manually on host system using fc-cache"; \
129 if [ -f $(srcdir)/fonts.conf ]; then \
130 if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \
131 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
132 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \
134 else if [ -f fonts.conf ]; then \
135 if cmp -s fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \
136 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
137 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \
141 debuild debuild-signed: debuild-dirs
142 (cd $(distdir)/debian && debuild)
144 debuild-unsigned: debuild-dirs
145 (cd $(distdir)/debian && debuild -us -uc)
147 debuild-dirs: distdir
148 $(RM) $(PACKAGE)_$(VERSION).orig.tar.gz
149 $(RM) -r $(distdir).orig
150 cp -a $(distdir) $(distdir).orig
151 $(RM) -r $(distdir).orig/debian
153 DISTCHECK_CONFIGURE_FLAGS =
155 -include $(top_srcdir)/git.mk