]> git.wh0rd.org - fontconfig.git/blame - Makefile.am
A few fixups for make distcheck
[fontconfig.git] / Makefile.am
CommitLineData
20fa60c9
KP
1#
2# $Id$
3#
46b51147 4# Copyright © 2003 Keith Packard
20fa60c9
KP
5#
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.
15#
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.
23
2b45ef3a 24DOCSRC=@DOCSRC@
2b629781 25SUBDIRS=fontconfig fc-case fc-lang fc-glyphname fc-arch src \
248b5903 26 fc-cache fc-cat fc-list fc-match conf.d $(DOCSRC) test
dc2e06ab 27
20fa60c9
KP
28EXTRA_DIST = \
29 fontconfig.pc.in \
30 fonts.conf.in \
31 fonts.dtd \
8fc10a72 32 fontconfig.spec.in \
daeed6e0 33 fontconfig.spec \
fd11da84 34 fontconfig-zip.in
89d6119c 35DISTCLEANFILES = config.cache ChangeLog
2ec3ed08
KP
36MAINTAINERCLEANFILES = \
37 $(srcdir)/aclocal.m4 \
38 $(srcdir)/autoscan.log \
39 $(srcdir)/compile \
40 $(srcdir)/config.guess \
41 $(srcdir)/config.h.in \
42 $(srcdir)/config.sub \
43 $(srcdir)/configure.scan \
44 $(srcdir)/depcomp \
45 $(srcdir)/install-sh \
46 $(srcdir)/ltmain.sh \
47 $(srcdir)/missing \
48 $(srcdir)/mkinstalldirs \
49 `find "$(srcdir)" -type f -name Makefile.in -print`
20fa60c9
KP
50
51pkgconfigdir=$(libdir)/pkgconfig
52pkgconfig_DATA = fontconfig.pc
53
54configdir=$(CONFDIR)
4f27c1c0 55config_DATA=fonts.dtd
20fa60c9 56
d8ae9c92
KP
57if CROSS_COMPILING
58 RUN_FC_CACHE_TEST=false
59else
60 RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
61endif
62
2ec3ed08
KP
63# Creating ChangeLog from git log:
64
65MAINTAINERCLEANFILES += ChangeLog
66
67EXTRA_DIST += ChangeLog
68
00268a50
KP
69ChangeLog:
70 if test -d "$(srcdir)/.git"; then \
71 (GIT_DIR=$(top_srcdir)/.git ./missing --run git-log --stat) | fmt --split-only > $@.tmp \
2ec3ed08
KP
72 && mv -f $@.tmp $@ \
73 || ($(RM) $@.tmp; \
74 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
75 (test -f $@ || echo git-log is required to generate this file >> $@)); \
76 else \
77 test -f $@ || \
78 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
79 echo A git checkout and git-log is required to generate this file >> $@); \
80 fi
81
00268a50 82.PHONY: ChangeLog
2ec3ed08 83
20fa60c9 84install-data-local:
4c34c0c5 85 $(mkinstalldirs) $(DESTDIR)$(configdir) $(DESTDIR)$(fc_cachedir)
4f27c1c0
KP
86 if [ -f $(DESTDIR)$(configdir)/fonts.conf ]; then \
87 echo "backing up existing $(DESTDIR)$(configdir)/fonts.conf"; \
88 mv $(DESTDIR)$(configdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf.bak; \
89 fi
90 if [ -f $(srcdir)/fonts.conf ]; then \
91 echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
92 $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
93 else if [ -f fonts.conf ]; then \
94 echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
95 $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
96 fi; fi
9596dce9 97 @(if $(RUN_FC_CACHE_TEST); then \
fd7223c7 98 echo " fc-cache/fc-cache -s -f -v"; \
cfccd487 99 fc-cache/fc-cache -s -f -v; \
d8ae9c92 100 else \
b152a85b
PL
101 echo "***"; \
102 echo "*** Warning: fonts.cache not built"; \
103 echo "***"; \
104 echo "*** Generate this file manually on host system using fc-cache"; \
105 echo "***"; \
106 fi)
fc2cc873
KP
107
108uninstall-local:
109 if [ -f $(srcdir)/fonts.conf ]; then \
110 if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
111 echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
112 rm -f $(DESTDIR)$(configdir)/fonts.conf; \
113 fi; \
114 else if [ -f fonts.conf ]; then \
115 if cmp -s fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
116 echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
117 rm -f $(DESTDIR)$(configdir)/fonts.conf; \
118 fi; \
119 fi; fi
dc2e06ab
KP
120
121debuild debuild-signed: debuild-dirs
122 (cd $(distdir)/debian && debuild)
123
124debuild-unsigned: debuild-dirs
125 (cd $(distdir)/debian && debuild -us -uc)
126
127debuild-dirs: distdir
128 rm -f $(PACKAGE)_$(VERSION).orig.tar.gz
129 rm -rf $(distdir).orig
130 cp -a $(distdir) $(distdir).orig
131 rm -rf $(distdir).orig/debian