lib/Makefile.am: Use $(DESTDIR) before local installation paths.
authorTim Retout <diocles@gnu.org>
Tue, 29 Jan 2008 21:10:40 +0000 (21:10 +0000)
committerTim Retout <diocles@gnu.org>
Tue, 29 Jan 2008 21:11:39 +0000 (21:11 +0000)
lib/ChangeLog
lib/Makefile.am

index 6507f19..db91e11 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-29  Tim Retout  <diocles@gnu.org>
+
+       * Makefile.am (install-data-local): Prefix installation paths with
+       $(DESTDIR), to avoid breaking `make distcheck'.
+       (uninstall-local): Likewise.
+
 2008-01-01  Tim Retout  <diocles@gnu.org>
 
        * ChangeLog: Run M-x change-log-redate. Add copyright notice at end.
index 61f4f19..74788fa 100644 (file)
@@ -38,15 +38,16 @@ CLEANFILES = enscript.cfg
 all-local: enscript.cfg
 
 install-data-local: enscript.cfg
-       $(top_srcdir)/mkinstalldirs $(sysconfdir)
-       if test -r $(sysconfdir)/enscript.cfg; then \
-         cp $(sysconfdir)/enscript.cfg $(sysconfdir)/enscript.cfg.old; \
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
+       if test -r $(DESTDIR)$(sysconfdir)/enscript.cfg; then \
+         cp $(DESTDIR)$(sysconfdir)/enscript.cfg \
+            $(DESTDIR)$(sysconfdir)/enscript.cfg.old; \
        else :; \
        fi
-       $(INSTALL_DATA) enscript.cfg $(sysconfdir)/enscript.cfg
+       $(INSTALL_DATA) enscript.cfg $(DESTDIR)$(sysconfdir)/enscript.cfg
 
 uninstall-local:
-       rm -f $(sysconfdir)/enscript.cfg
+       rm -f $(DESTDIR)$(sysconfdir)/enscript.cfg
 
 enscript.cfg: $(srcdir)/enscript.cfg.in Makefile
        sed 's%@DATADIR@%$(datadir)%g; s%@media@%@MEDIA@%g; s%@BINDIR@%$(bindir)%g; s%@spooler@%@SPOOLER@%g; s%@pslevel@%@PSLEVEL@%g' \