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
29 DIST_SUBDIRS = $(SUBDIRS)
31 DIST_SUBDIRS = $(SUBDIRS) doc
34 AUTOMAKE_OPTIONS = dist-bzip2
35 ACLOCAL_AMFLAGS = -I m4
45 CLEANFILES = fonts.conf
46 DISTCLEANFILES = config.cache doltcompile
47 MAINTAINERCLEANFILES = \
48 $(srcdir)/aclocal.m4 \
49 $(srcdir)/autoscan.log \
51 $(srcdir)/config.guess \
52 $(srcdir)/config.h.in \
53 $(srcdir)/config.sub \
54 $(srcdir)/configure.scan \
56 $(srcdir)/install-sh \
59 $(srcdir)/mkinstalldirs \
60 `find "$(srcdir)" -type f -name Makefile.in -print`
62 pkgconfigdir=$(libdir)/pkgconfig
63 pkgconfig_DATA = fontconfig.pc
65 baseconfigdir = $(BASECONFIGDIR)
66 configdir = $(CONFIGDIR)
72 RUN_FC_CACHE_TEST=false
74 RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
77 # Creating ChangeLog from git log:
79 MAINTAINERCLEANFILES += $(srcdir)/ChangeLog
80 EXTRA_DIST += ChangeLog
81 ChangeLog: $(srcdir)/ChangeLog
83 if test -d "$(srcdir)/.git"; then \
84 (GIT_DIR=$(top_srcdir)/.git ./missing --run git log --stat) | fmt --split-only > $@.tmp \
87 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
88 (test -f $@ || echo git-log is required to generate this file >> $@)); \
91 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
92 echo A git checkout and git-log is required to generate this file >> $@); \
97 fonts.conf: fonts.conf.in Makefile
99 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
100 -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \
101 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
102 -e 's,@CONFIGDIR\@,$(CONFIGDIR),g' \
103 -e 's,@PACKAGE\@,$(PACKAGE),g' \
104 -e 's,@VERSION\@,$(VERSION),g' \
105 $(srcdir)/$@.in > $@.tmp && \
108 install-data-local: fonts.conf
109 $(mkinstalldirs) $(DESTDIR)$(baseconfigdir) $(DESTDIR)$(fc_cachedir)
110 if [ -f $(DESTDIR)$(baseconfigdir)/fonts.conf ]; then \
111 echo "backing up existing $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
112 mv $(DESTDIR)$(baseconfigdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf.bak; \
114 if [ -f $(srcdir)/fonts.conf ]; then \
115 echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
116 $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \
117 else if [ -f fonts.conf ]; then \
118 echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
119 $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \
121 @(if $(RUN_FC_CACHE_TEST); then \
122 echo "fc-cache$(EXEEXT) -s -f -v"; \
123 fc-cache/fc-cache$(EXEEXT) -s -f -v; \
126 echo "*** Warning: fonts.cache not built"; \
128 echo "*** Generate this file manually on host system using fc-cache"; \
133 if [ -f $(srcdir)/fonts.conf ]; then \
134 if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \
135 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
136 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \
138 else if [ -f fonts.conf ]; then \
139 if cmp -s fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \
140 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
141 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \
145 debuild debuild-signed: debuild-dirs
146 (cd $(distdir)/debian && debuild)
148 debuild-unsigned: debuild-dirs
149 (cd $(distdir)/debian && debuild -us -uc)
151 debuild-dirs: distdir
152 $(RM) $(PACKAGE)_$(VERSION).orig.tar.gz
153 $(RM) -r $(distdir).orig
154 cp -a $(distdir) $(distdir).orig
155 $(RM) -r $(distdir).orig/debian
157 DISTCHECK_CONFIGURE_FLAGS =
159 -include $(top_srcdir)/git.mk