]> git.wh0rd.org - fontconfig.git/blobdiff - Makefile.am
Call git tools using "git cmd" instead of "git-cmd" syntax
[fontconfig.git] / Makefile.am
index 2fa3b34c9f24a3f897096caa998ce8a959b8f228..46dbb414cd44a873ebb5d78a37de8b50ec0a8692 100644 (file)
@@ -1,5 +1,5 @@
 # 
-#  $Id$
+#  fontconfig/Makefile.am
 # 
 #  Copyright © 2003 Keith Packard
 # 
@@ -23,7 +23,7 @@
 
 DOCSRC=@DOCSRC@
 SUBDIRS=fontconfig fc-case fc-lang fc-glyphname fc-arch src \
-       fc-cache fc-cat fc-list fc-match conf.d $(DOCSRC) test
+       fc-cache fc-cat fc-list fc-match fc-query fc-scan conf.d $(DOCSRC) test
         
 EXTRA_DIST = \
         fontconfig.pc.in \
@@ -32,6 +32,22 @@ EXTRA_DIST = \
         fontconfig.spec.in \
         fontconfig.spec \
        fontconfig-zip.in
+CLEANFILES = fonts.conf
+DISTCLEANFILES = config.cache ChangeLog doltcompile
+MAINTAINERCLEANFILES = \
+       $(srcdir)/aclocal.m4 \
+       $(srcdir)/autoscan.log \
+       $(srcdir)/compile \
+       $(srcdir)/config.guess \
+       $(srcdir)/config.h.in \
+       $(srcdir)/config.sub \
+       $(srcdir)/configure.scan \
+       $(srcdir)/depcomp \
+       $(srcdir)/install-sh \
+       $(srcdir)/ltmain.sh \
+       $(srcdir)/missing \
+       $(srcdir)/mkinstalldirs \
+       `find "$(srcdir)" -type f -name Makefile.in -print`
 
 pkgconfigdir=$(libdir)/pkgconfig
 pkgconfig_DATA = fontconfig.pc
@@ -45,8 +61,39 @@ else
   RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
 endif
 
-install-data-local:
-       $(mkinstalldirs) $(DESTDIR)$(configdir)
+# Creating ChangeLog from git log:
+
+MAINTAINERCLEANFILES += ChangeLog
+
+EXTRA_DIST += ChangeLog
+
+ChangeLog:
+       if test -d "$(srcdir)/.git"; then \
+         (GIT_DIR=$(top_srcdir)/.git ./missing --run git log --stat) | fmt --split-only > $@.tmp \
+         && mv -f $@.tmp $@ \
+         || ($(RM) $@.tmp; \
+             echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+             (test -f $@ || echo git-log is required to generate this file >> $@)); \
+       else \
+         test -f $@ || \
+         (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+         echo A git checkout and git-log is required to generate this file >> $@); \
+       fi
+
+.PHONY: ChangeLog
+
+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"; \
          mv $(DESTDIR)$(configdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf.bak; \
@@ -59,8 +106,8 @@ install-data-local:
          $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
        fi; fi
        @(if $(RUN_FC_CACHE_TEST); then \
-           echo " fc-cache/fc-cache -s -f -v"; \
-           fc-cache/fc-cache -f -v; \
+           echo " $(bindir)/fc-cache -s -f -v"; \
+           $(bindir)/fc-cache -s -f -v; \
        else \
            echo "***"; \
            echo "*** Warning: fonts.cache not built"; \