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 src \
25 fc-cache fc-cat fc-conflist fc-list fc-match \
26 fc-pattern fc-query fc-scan fc-validate conf.d \
32 ACLOCAL_AMFLAGS = -I m4
35 conf.d/link_confs.py \
36 conf.d/write-35-lang-normalize-conf.py \
38 doc/extract-man-list.py \
47 src/fontconfig.def.in \
49 $(wildcard $(srcdir)/*/meson.build) \
50 $(wildcard $(srcdir)/meson-cc-tests/*) \
51 $(wildcard $(srcdir)/subprojects/*.wrap)
53 EXTRA_DIST = config.rpath \
60 CLEANFILES = fonts.conf
61 DISTCLEANFILES = config.cache doltcompile
62 MAINTAINERCLEANFILES = \
63 $(srcdir)/aclocal.m4 \
64 $(srcdir)/autoscan.log \
66 $(srcdir)/config.guess \
67 $(srcdir)/config.h.in \
68 $(srcdir)/config.sub \
69 $(srcdir)/configure.scan \
71 $(srcdir)/install-sh \
74 $(srcdir)/mkinstalldirs \
75 $(srcdir)/test-driver \
76 `find "$(srcdir)" -type f -name Makefile.in -print`
78 pkgconfig_DATA = fontconfig.pc
80 baseconfigdir = $(BASECONFIGDIR)
81 configdir = $(CONFIGDIR)
86 if !ENABLE_CACHE_BUILD
87 RUN_FC_CACHE_TEST=false
89 RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
92 # Creating ChangeLog from git log:
94 MAINTAINERCLEANFILES += $(srcdir)/ChangeLog
95 EXTRA_DIST += ChangeLog
96 ChangeLog: $(srcdir)/ChangeLog
98 if test -d "$(srcdir)/.git"; then \
99 (GIT_DIR=$(top_srcdir)/.git $(GIT) log --stat) | fmt --split-only > $@.tmp \
102 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
103 (test -f $@ || echo git-log is required to generate this file >> $@)); \
106 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
107 echo A git checkout and git-log is required to generate this file >> $@); \
112 FC_CONFIGDIR = $(subst $(BASECONFIGDIR)/,,$(CONFIGDIR))
114 fonts.conf: fonts.conf.in Makefile
116 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
117 -e 's,@FC_DEFAULT_FONTS\@, $(FC_DEFAULT_FONTS),g' \
118 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
119 -e 's,@CONFIGDIR\@,$(FC_CONFIGDIR),g' \
120 -e 's,@PACKAGE\@,$(PACKAGE),g' \
121 -e 's,@VERSION\@,$(VERSION),g' \
122 $(srcdir)/$@.in > $@.tmp && \
125 install-data-local: fonts.conf
126 $(mkinstalldirs) $(DESTDIR)$(baseconfigdir) $(DESTDIR)$(fc_cachedir)
127 if [ -f $(DESTDIR)$(baseconfigdir)/fonts.conf ]; then \
128 echo "backing up existing $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
129 mv $(DESTDIR)$(baseconfigdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf.bak; \
131 if [ -f $(srcdir)/fonts.conf ]; then \
132 echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
133 $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \
134 else if [ -f fonts.conf ]; then \
135 echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
136 $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \
138 @(if $(RUN_FC_CACHE_TEST); then \
139 echo "fc-cache$(EXEEXT) -s -f -v"; \
140 fc-cache/fc-cache$(EXEEXT) -s -f -v; \
143 echo "*** Warning: fonts.cache not built"; \
145 echo "*** Generate this file manually on host system using fc-cache"; \
150 if [ -f $(srcdir)/fonts.conf ]; then \
151 if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \
152 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
153 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \
155 else if [ -f fonts.conf ]; then \
156 if cmp -s fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \
157 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
158 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \
162 debuild debuild-signed: debuild-dirs
163 (cd $(distdir)/debian && debuild)
165 debuild-unsigned: debuild-dirs
166 (cd $(distdir)/debian && debuild -us -uc)
168 debuild-dirs: distdir
169 $(RM) $(PACKAGE)_$(VERSION).orig.tar.gz
170 $(RM) -r $(distdir).orig
171 cp -a $(distdir) $(distdir).orig
172 $(RM) -r $(distdir).orig/debian
174 DISTCHECK_CONFIGURE_FLAGS =
177 @$(GREP) -e "^[[:space:]]*version[[:space:]]*:[[:space:]]*'$(VERSION)'," $(srcdir)/meson.build >/dev/null || { \
178 echo "======================================================================================"; \
179 echo "Meson version does not seem to match autotools version $(VERSION), update meson.build!"; \
180 echo "======================================================================================"; \
184 all-local: check-versions
186 -include $(top_srcdir)/git.mk