Makefile.am revision a4e54154
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 src \ 25 fc-cache fc-cat fc-conflist fc-list fc-match \ 26 fc-pattern fc-query fc-scan fc-validate conf.d \ 27 its po po-conf test 28if ENABLE_DOCS 29SUBDIRS += doc 30endif 31 32ACLOCAL_AMFLAGS = -I m4 33 34MESON_FILES = \ 35 conf.d/link_confs.py \ 36 conf.d/write-35-lang-normalize-conf.py \ 37 doc/edit-sgml.py \ 38 doc/extract-man-list.py \ 39 doc/run-quiet.py \ 40 fc-case/fc-case.py \ 41 fc-lang/fc-lang.py \ 42 meson.build \ 43 meson_options.txt \ 44 src/cutout.py \ 45 src/fcstdint.h.in \ 46 src/fcwindows.h \ 47 src/fontconfig.def.in \ 48 src/makealias.py \ 49 $(wildcard $(srcdir)/*/meson.build) \ 50 $(wildcard $(srcdir)/meson-cc-tests/*) \ 51 $(wildcard $(srcdir)/subprojects/*.wrap) 52 53EXTRA_DIST = config.rpath \ 54 fontconfig.pc.in \ 55 fonts.conf.in \ 56 fonts.dtd \ 57 fontconfig-zip.in \ 58 config-fixups.h \ 59 $(MESON_FILES) 60CLEANFILES = fonts.conf 61DISTCLEANFILES = config.cache doltcompile 62MAINTAINERCLEANFILES = \ 63 $(srcdir)/aclocal.m4 \ 64 $(srcdir)/autoscan.log \ 65 $(srcdir)/compile \ 66 $(srcdir)/config.guess \ 67 $(srcdir)/config.h.in \ 68 $(srcdir)/config.sub \ 69 $(srcdir)/configure.scan \ 70 $(srcdir)/depcomp \ 71 $(srcdir)/install-sh \ 72 $(srcdir)/ltmain.sh \ 73 $(srcdir)/missing \ 74 $(srcdir)/mkinstalldirs \ 75 $(srcdir)/test-driver \ 76 `find "$(srcdir)" -type f -name Makefile.in -print` 77 78pkgconfig_DATA = fontconfig.pc 79 80baseconfigdir = $(BASECONFIGDIR) 81configdir = $(CONFIGDIR) 82 83xmldir = $(XMLDIR) 84xml_DATA = fonts.dtd 85 86if !ENABLE_CACHE_BUILD 87 RUN_FC_CACHE_TEST=false 88else 89 RUN_FC_CACHE_TEST=test -z "$(DESTDIR)" 90endif 91 92# Creating ChangeLog from git log: 93 94MAINTAINERCLEANFILES += $(srcdir)/ChangeLog 95EXTRA_DIST += ChangeLog 96ChangeLog: $(srcdir)/ChangeLog 97$(srcdir)/ChangeLog: 98 if test -d "$(srcdir)/.git"; then \ 99 (GIT_DIR=$(top_srcdir)/.git $(GIT) log --stat) | fmt --split-only > $@.tmp \ 100 && mv -f $@.tmp $@ \ 101 || ($(RM) $@.tmp; \ 102 echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \ 103 (test -f $@ || echo git-log is required to generate this file >> $@)); \ 104 else \ 105 test -f $@ || \ 106 (echo A git checkout and git-log is required to generate ChangeLog >&2 && \ 107 echo A git checkout and git-log is required to generate this file >> $@); \ 108 fi 109 110.PHONY: ChangeLog 111 112FC_CONFIGDIR = $(subst $(BASECONFIGDIR)/,,$(CONFIGDIR)) 113 114fonts.conf: fonts.conf.in Makefile 115 sed \ 116 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \ 117 -e 's,@FC_DEFAULT_FONTS\@, $(FC_DEFAULT_FONTS),g' \ 118 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \ 119 -e 's,@CONFIGDIR\@,$(FC_CONFIGDIR),g' \ 120 -e 's,@PACKAGE\@,$(PACKAGE),g' \ 121 -e 's,@VERSION\@,$(VERSION),g' \ 122 $(srcdir)/$@.in > $@.tmp && \ 123 mv $@.tmp $@ 124 125install-data-local: fonts.conf 126 $(mkinstalldirs) $(DESTDIR)$(baseconfigdir) $(DESTDIR)$(fc_cachedir) 127 if [ -f $(DESTDIR)$(baseconfigdir)/fonts.conf ]; then \ 128 echo "backing up existing $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 129 mv $(DESTDIR)$(baseconfigdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf.bak; \ 130 fi 131 if [ -f $(srcdir)/fonts.conf ]; then \ 132 echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 133 $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \ 134 else if [ -f fonts.conf ]; then \ 135 echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 136 $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \ 137 fi; fi 138 @(if $(RUN_FC_CACHE_TEST); then \ 139 echo "fc-cache$(EXEEXT) -s -f -v"; \ 140 fc-cache/fc-cache$(EXEEXT) -s -f -v; \ 141 else \ 142 echo "***"; \ 143 echo "*** Warning: fonts.cache not built"; \ 144 echo "***"; \ 145 echo "*** Generate this file manually on host system using fc-cache"; \ 146 echo "***"; \ 147 fi) 148 149uninstall-local: 150 if [ -f $(srcdir)/fonts.conf ]; then \ 151 if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \ 152 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 153 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \ 154 fi; \ 155 else if [ -f fonts.conf ]; then \ 156 if cmp -s fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \ 157 echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \ 158 $(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \ 159 fi; \ 160 fi; fi 161 162debuild debuild-signed: debuild-dirs 163 (cd $(distdir)/debian && debuild) 164 165debuild-unsigned: debuild-dirs 166 (cd $(distdir)/debian && debuild -us -uc) 167 168debuild-dirs: distdir 169 $(RM) $(PACKAGE)_$(VERSION).orig.tar.gz 170 $(RM) -r $(distdir).orig 171 cp -a $(distdir) $(distdir).orig 172 $(RM) -r $(distdir).orig/debian 173 174DISTCHECK_CONFIGURE_FLAGS = 175 176check-versions: 177 @$(GREP) -e "^[[:space:]]*version[[:space:]]*:[[:space:]]*'$(VERSION)'," $(srcdir)/meson.build >/dev/null || { \ 178 echo "======================================================================================"; \ 179 echo "Meson version does not seem to match autotools version $(VERSION), update meson.build!"; \ 180 echo "======================================================================================"; \ 181 exit 1; \ 182 } 183 184all-local: check-versions 185 186-include $(top_srcdir)/git.mk 187