]> git.wh0rd.org - fontconfig.git/blobdiff - Makefile.am
Adopt some RedHat suggestions for standard font configuration.
[fontconfig.git] / Makefile.am
index fd10fbb3da3984900f18c41f84b46956baf7f325..53c1920554e2fd741adf398c568a402af2c31845 100644 (file)
@@ -1,7 +1,7 @@
 # 
 #  $Id$
 # 
-#  Copyright © 2003 Keith Packard
+#  Copyright Â© 2003 Keith Packard
 # 
 #  Permission to use, copy, modify, distribute, and sell this software and its
 #  documentation for any purpose is hereby granted without fee, provided that
@@ -21,7 +21,8 @@
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-SUBDIRS=fontconfig fc-lang fc-glyphname src fc-cache fc-list fc-match doc test
+DOCSRC=@DOCSRC@
+SUBDIRS=fontconfig fc-lang fc-glyphname fc-case src fc-cache fc-list fc-match $(DOCSRC) test
 
 EXTRA_DIST = \
         fontconfig.pc.in \
@@ -36,9 +37,21 @@ pkgconfigdir=$(libdir)/pkgconfig
 pkgconfig_DATA = fontconfig.pc
 
 configdir=$(CONFDIR)
-config_DATA=fonts.conf fonts.dtd
+config_DATA=fonts.dtd
 
 install-data-local:
+       $(mkinstalldirs) $(DESTDIR)$(configdir)
+       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; \
+       fi
+       if [ -f $(srcdir)/fonts.conf ]; then \
+         echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
+         $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
+       else if [ -f fonts.conf ]; then \
+         echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
+         $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
+       fi; fi
        if [ -f $(DESTDIR)$(configdir)/local.conf ]; then \
          echo "not overwriting existing $(DESTDIR)$(configdir)/local.conf"; \
        else if [ -f $(srcdir)/local.conf ]; then \
@@ -49,3 +62,27 @@ install-data-local:
          $(INSTALL_DATA) local.conf $(DESTDIR)$(configdir)/local.conf; \
        fi; fi; fi
        if [ x$(DESTDIR) = x ]; then fc-cache/fc-cache -f -v; fi
+
+uninstall-local:
+       if [ -f $(srcdir)/fonts.conf ]; then \
+         if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
+            echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
+            rm -f $(DESTDIR)$(configdir)/fonts.conf; \
+         fi; \
+       else if [ -f fonts.conf ]; then \
+         if cmp -s fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
+            echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
+            rm -f $(DESTDIR)$(configdir)/fonts.conf; \
+         fi; \
+       fi; fi
+       if [ -f $(srcdir)/local.conf ]; then \
+         if cmp -s $(srcdir)/local.conf $(DESTDIR)$(configdir)/local.conf; then \
+            echo " uninstall standard $(DESTDIR)$(configdir)/local.conf"; \
+            rm -f $(DESTDIR)$(configdir)/local.conf; \
+         fi; \
+       else if [ -f local.conf ]; then \
+         if cmp -s local.conf $(DESTDIR)$(configdir)/local.conf; then \
+            echo " uninstall standard $(DESTDIR)$(configdir)/local.conf"; \
+            rm -f $(DESTDIR)$(configdir)/local.conf; \
+         fi; \
+       fi; fi