]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # $Id$ | |
3 | # | |
4 | # Copyright © 2003 Keith Packard | |
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 | ||
24 | DOCSRC=@DOCSRC@ | |
25 | SUBDIRS=fontconfig fc-case fc-lang fc-glyphname fc-arch src \ | |
26 | fc-cache fc-cat fc-list fc-match conf.avail conf.d $(DOCSRC) test | |
27 | ||
28 | EXTRA_DIST = \ | |
29 | fontconfig.pc.in \ | |
30 | fonts.conf.in \ | |
31 | fonts.dtd \ | |
32 | fontconfig.spec.in \ | |
33 | fontconfig.spec \ | |
34 | fontconfig-zip.in | |
35 | DISTCLEANFILES = config.cache | |
36 | MAINTAINERCLEANFILES = \ | |
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` | |
50 | ||
51 | pkgconfigdir=$(libdir)/pkgconfig | |
52 | pkgconfig_DATA = fontconfig.pc | |
53 | ||
54 | configdir=$(CONFDIR) | |
55 | config_DATA=fonts.dtd | |
56 | ||
57 | if CROSS_COMPILING | |
58 | RUN_FC_CACHE_TEST=false | |
59 | else | |
60 | RUN_FC_CACHE_TEST=test -z "$(DESTDIR)" | |
61 | endif | |
62 | ||
63 | # Creating ChangeLog from git log: | |
64 | ||
65 | MAINTAINERCLEANFILES += ChangeLog | |
66 | ||
67 | EXTRA_DIST += ChangeLog | |
68 | ||
69 | ChangeLog: $(srcdir)/ChangeLog | |
70 | ||
71 | $(srcdir)/ChangeLog: | |
72 | @if test -d "$(srcdir)/.git"; then \ | |
73 | (cd "$(srcdir)" && \ | |
74 | ./missing --run git-log --stat) | fmt --split-only > $@.tmp \ | |
75 | && mv -f $@.tmp $@ \ | |
76 | || ($(RM) $@.tmp; \ | |
77 | echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \ | |
78 | (test -f $@ || echo git-log is required to generate this file >> $@)); \ | |
79 | else \ | |
80 | test -f $@ || \ | |
81 | (echo A git checkout and git-log is required to generate ChangeLog >&2 && \ | |
82 | echo A git checkout and git-log is required to generate this file >> $@); \ | |
83 | fi | |
84 | ||
85 | .PHONY: ChangeLog $(srcdir)/ChangeLog | |
86 | ||
87 | install-data-local: | |
88 | $(mkinstalldirs) $(DESTDIR)$(configdir) $(DESTDIR)$(fc_cachedir) | |
89 | if [ -f $(DESTDIR)$(configdir)/fonts.conf ]; then \ | |
90 | echo "backing up existing $(DESTDIR)$(configdir)/fonts.conf"; \ | |
91 | mv $(DESTDIR)$(configdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf.bak; \ | |
92 | fi | |
93 | if [ -f $(srcdir)/fonts.conf ]; then \ | |
94 | echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \ | |
95 | $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \ | |
96 | else if [ -f fonts.conf ]; then \ | |
97 | echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \ | |
98 | $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \ | |
99 | fi; fi | |
100 | (if $(RUN_FC_CACHE_TEST); then \ | |
101 | echo " fc-cache/fc-cache -s -f -v"; \ | |
102 | fc-cache/fc-cache -s -f -v; \ | |
103 | else \ | |
104 | echo "***"; \ | |
105 | echo "*** Warning: fonts.cache not built"; \ | |
106 | echo "***"; \ | |
107 | echo "*** Generate this file manually on host system using fc-cache"; \ | |
108 | echo "***"; \ | |
109 | fi) | |
110 | ||
111 | uninstall-local: | |
112 | if [ -f $(srcdir)/fonts.conf ]; then \ | |
113 | if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \ | |
114 | echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \ | |
115 | rm -f $(DESTDIR)$(configdir)/fonts.conf; \ | |
116 | fi; \ | |
117 | else if [ -f fonts.conf ]; then \ | |
118 | if cmp -s fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \ | |
119 | echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \ | |
120 | rm -f $(DESTDIR)$(configdir)/fonts.conf; \ | |
121 | fi; \ | |
122 | fi; fi | |
123 | ||
124 | debuild debuild-signed: debuild-dirs | |
125 | (cd $(distdir)/debian && debuild) | |
126 | ||
127 | debuild-unsigned: debuild-dirs | |
128 | (cd $(distdir)/debian && debuild -us -uc) | |
129 | ||
130 | debuild-dirs: distdir | |
131 | rm -f $(PACKAGE)_$(VERSION).orig.tar.gz | |
132 | rm -rf $(distdir).orig | |
133 | cp -a $(distdir) $(distdir).orig | |
134 | rm -rf $(distdir).orig/debian |