summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2009-01-19 17:02:55 -0500
committerBehdad Esfahbod <behdad@behdad.org>2009-02-15 13:40:16 -0800
commitc08216c6f468ce22cb7c0c1959019a7caad3484a (patch)
tree1bb7a0dde83d5d69bddcaa59cc9a66d97c601e38 /Makefile.am
parent98d765a53ba33d28283e499ebd1098d27cbe6d02 (diff)
downloadfontconfig-c08216c6f468ce22cb7c0c1959019a7caad3484a.tar.gz
Let make expand fc_cachedir/FC_CACHEDIR (bug #18675)
configure replaces a NONE prefix with the default prefix too late. So we move fonts.conf creation to Makefile, such that prefix is correctly expanded. Ugly, but works.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index e982dd2..ec7a5d9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,6 +32,7 @@ EXTRA_DIST = \
fontconfig.spec.in \
fontconfig.spec \
fontconfig-zip.in
+CLEANFILES = fonts.conf
DISTCLEANFILES = config.cache ChangeLog doltcompile
MAINTAINERCLEANFILES = \
$(srcdir)/aclocal.m4 \
@@ -81,7 +82,17 @@ ChangeLog:
.PHONY: ChangeLog
-install-data-local:
+fonts.conf: fonts.conf.in Makefile
+ sed \
+ -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
+ -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \
+ -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
+ -e 's,@PACKAGE\@,$(PACKAGE),g' \
+ -e 's,@VERSION\@,$(VERSION),g' \
+ $< > $@.tmp && \
+ mv $@.tmp $@
+
+install-data-local: fonts.conf
$(mkinstalldirs) $(DESTDIR)$(configdir) $(DESTDIR)$(fc_cachedir)
if [ -f $(DESTDIR)$(configdir)/fonts.conf ]; then \
echo "backing up existing $(DESTDIR)$(configdir)/fonts.conf"; \