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 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.
25 SUBDIRS=fontconfig fc-case fc-lang fc-glyphname fc-arch src \
26 fc-cache fc-cat fc-list fc-match fc-query fc-scan conf.d $(DOCSRC) test
35 CLEANFILES = fonts.conf
36 DISTCLEANFILES = config.cache ChangeLog doltcompile
37 MAINTAINERCLEANFILES = \
38 $(srcdir)/aclocal.m4 \
39 $(srcdir)/autoscan.log \
41 $(srcdir)/config.guess \
42 $(srcdir)/config.h.in \
43 $(srcdir)/config.sub \
44 $(srcdir)/configure.scan \
46 $(srcdir)/install-sh \
49 $(srcdir)/mkinstalldirs \
50 `find "$(srcdir)" -type f -name Makefile.in -print`
52 pkgconfigdir=$(libdir)/pkgconfig
53 pkgconfig_DATA = fontconfig.pc
59 RUN_FC_CACHE_TEST=false
61 RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
64 # Creating ChangeLog from git log:
66 MAINTAINERCLEANFILES += ChangeLog
68 EXTRA_DIST += ChangeLog
71 if test -d "$(srcdir)/.git"; then \
72 (GIT_DIR=$(top_srcdir)/.git ./missing --run git-log --stat) | fmt --split-only > $@.tmp \
75 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
76 (test -f $@ || echo git-log is required to generate this file >> $@)); \
79 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
80 echo A git checkout and git-log is required to generate this file >> $@); \
85 fonts.conf: fonts.conf.in Makefile
87 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
88 -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \
89 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
90 -e 's,@PACKAGE\@,$(PACKAGE),g' \
91 -e 's,@VERSION\@,$(VERSION),g' \
95 install-data-local: fonts.conf
96 $(mkinstalldirs) $(DESTDIR)$(configdir) $(DESTDIR)$(fc_cachedir)
97 if [ -f $(DESTDIR)$(configdir)/fonts.conf ]; then \
98 echo "backing up existing $(DESTDIR)$(configdir)/fonts.conf"; \
99 mv $(DESTDIR)$(configdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf.bak; \
101 if [ -f $(srcdir)/fonts.conf ]; then \
102 echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
103 $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
104 else if [ -f fonts.conf ]; then \
105 echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
106 $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
108 @(if $(RUN_FC_CACHE_TEST); then \
109 echo " $(bindir)/fc-cache -s -f -v"; \
110 $(bindir)/fc-cache -s -f -v; \
113 echo "*** Warning: fonts.cache not built"; \
115 echo "*** Generate this file manually on host system using fc-cache"; \
120 if [ -f $(srcdir)/fonts.conf ]; then \
121 if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
122 echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
123 rm -f $(DESTDIR)$(configdir)/fonts.conf; \
125 else if [ -f fonts.conf ]; then \
126 if cmp -s fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
127 echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
128 rm -f $(DESTDIR)$(configdir)/fonts.conf; \
132 debuild debuild-signed: debuild-dirs
133 (cd $(distdir)/debian && debuild)
135 debuild-unsigned: debuild-dirs
136 (cd $(distdir)/debian && debuild -us -uc)
138 debuild-dirs: distdir
139 rm -f $(PACKAGE)_$(VERSION).orig.tar.gz
140 rm -rf $(distdir).orig
141 cp -a $(distdir) $(distdir).orig
142 rm -rf $(distdir).orig/debian