Makefile.am revision 6fc018e4
1# 2# fontconfig/Makefile.am 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 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. 15# 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. 23 24SUBDIRS=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 27if ENABLE_DOCS 28SUBDIRS += doc 29endif 30 31ACLOCAL_AMFLAGS = -I m4 32 33EXTRA_DIST = \ 34 fontconfig.pc.in \ 35 fonts.conf.in \ 36 fonts.dtd \ 37 fontconfig.spec.in \ 38 fontconfig.spec \ 39 fontconfig-zip.in \ 40 config-fixups.h 41CLEANFILES = fonts.conf 42DISTCLEANFILES = config.cache doltcompile 43MAINTAINERCLEANFILES = \ 44 $(srcdir)/aclocal.m4 \ 45 $(srcdir)/autoscan.log \ 46 $(srcdir)/compile \ 47 $(srcdir)/config.guess \ 48 $(srcdir)/config.h.in \ 49 $(srcdir)/config.sub \ 50 $(srcdir)/configure.scan \ 51 $(srcdir)/depcomp \ 52 $(srcdir)/install-sh \ 53 $(srcdir)/ltmain.sh \ 54 $(srcdir)/missing \ 55 $(srcdir)/mkinstalldirs \ 56 $(srcdir)/test-driver \ 57 `find "$(srcdir)" -type f -name Makefile.in -print` 58 59pkgconfig_DATA = fontconfig.pc 60 61baseconfigdir = $(BASECONFIGDIR) 62configdir = $(CONFIGDIR) 63 64xmldir = $(XMLDIR) 65xml_DATA = fonts.dtd 66 67if CROSS_COMPILING 68 RUN_FC_CACHE_TEST=false 69else 70 RUN_FC_CACHE_TEST=test -z "$(DESTDIR)" 71endif 72 73# Creating ChangeLog from git log: 74 75MAINTAINERCLEANFILES += $(srcdir)/ChangeLog 76EXTRA_DIST += ChangeLog 77ChangeLog: $(srcdir)/ChangeLog 78$(srcdir)/ChangeLog: 79 if test -d "$(srcdir)/.git"; then \ 80 (GIT_DIR=$(top_srcdir)/.git $(GIT) log --stat) | fmt --split-only > $@.tmp \ 81 && mv -f $@.tmp $@ \ 82 || ($(RM) $@.tmp; \ 83 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \ 84 (test -f $@ || echo git-log is required to generate this file >> $@)); \ 85 else \ 86 test -f $@ || \ 87 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \ 88 echo A git checkout and git-log is required to generate this file >> $@); \ 89 fi 90 91.PHONY: ChangeLog 92 93FC_CONFIGDIR = $(subst $(BASECONFIGDIR)/,,$(CONFIGDIR)) 94 95fonts.conf: fonts.conf.in Makefile 96 sed \ 97 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \ 98 -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \ 99 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \ 100 -e 's,@CONFIGDIR\@,$(FC_CONFIGDIR),g' \ 101 -e 's,@PACKAGE\@,$(PACKAGE),g' \ 102 -e 's,@VERSION\@,$(VERSION),g' \ 103 $(srcdir)/$@.in > $@.tmp && \ 104 mv $@.tmp $@ 105 106install-data-local: fonts.conf 107 $(mkinstalldirs) $(DESTDIR)$(baseconfigdir) $(DESTDIR)$(fc_cachedir) 108 if [ -f $(DESTDIR)$(baseconfigdir)/fonts.conf ]; then \ 109 echo "backing up existing $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 110 mv $(DESTDIR)$(baseconfigdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf.bak; \ 111 fi 112 if [ -f $(srcdir)/fonts.conf ]; then \ 113 echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 114 $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \ 115 else if [ -f fonts.conf ]; then \ 116 echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 117 $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \ 118 fi; fi 119 @(if $(RUN_FC_CACHE_TEST); then \ 120 echo "fc-cache$(EXEEXT) -s -f -v"; \ 121 fc-cache/fc-cache$(EXEEXT) -s -f -v; \ 122 else \ 123 echo "***"; \ 124 echo "*** Warning: fonts.cache not built"; \ 125 echo "***"; \ 126 echo "*** Generate this file manually on host system using fc-cache"; \ 127 echo "***"; \ 128 fi) 129 130uninstall-local: 131 if [ -f $(srcdir)/fonts.conf ]; then \ 132 if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \ 133 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 134 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \ 135 fi; \ 136 else if [ -f fonts.conf ]; then \ 137 if cmp -s fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \ 138 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 139 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \ 140 fi; \ 141 fi; fi 142 143debuild debuild-signed: debuild-dirs 144 (cd $(distdir)/debian && debuild) 145 146debuild-unsigned: debuild-dirs 147 (cd $(distdir)/debian && debuild -us -uc) 148 149debuild-dirs: distdir 150 $(RM) $(PACKAGE)_$(VERSION).orig.tar.gz 151 $(RM) -r $(distdir).orig 152 cp -a $(distdir) $(distdir).orig 153 $(RM) -r $(distdir).orig/debian 154 155DISTCHECK_CONFIGURE_FLAGS = 156 157-include $(top_srcdir)/git.mk 158