lib/Makefile.am: Replace custom install rules with new sysconf_DATA variable. Factor out variable substitution rule from enscript.cfg generation. - enscript - GNU Enscript
 (HTM) git clone git://thinkerwim.org/enscript.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2ebf0fd4bd6ec1cb90408c070724a6d1f98facc9
 (DIR) parent f45916a858830c812a6c29bd978fc65ec5c08555
 (HTM) Author: Tim Retout <diocles@gnu.org>
       Date:   Sun,  3 Feb 2008 15:49:11 +0000
       
       lib/Makefile.am: Replace custom install rules with new sysconf_DATA variable.
       Factor out variable substitution rule from enscript.cfg generation.
       
       Diffstat:
         M lib/ChangeLog                       |      12 ++++++++++++
         M lib/Makefile.am                     |      27 ++++++++++-----------------
       
       2 files changed, 22 insertions(+), 17 deletions(-)
       ---
 (DIR) diff --git a/lib/ChangeLog b/lib/ChangeLog
       @@ -1,3 +1,15 @@
       +2008-02-03  Tim Retout  <diocles@gnu.org>
       +
       +        * Makefile.am (install-data-local): Remove.  (Note that a backup of the
       +        config file will no longer be taken during installation.)
       +        (uninstall-local): Likewise.
       +        (all-local): Likewise.
       +        (sysconf_DATA): New variable for location of config file.
       +        (CLEANFILES): Reference $(sysconf_DATA) variable.
       +        (do_subst): New variable to hold the variable substitution command.
       +        (enscript.cfg): Use $(do_subst).  Remove unnecessary $(srcdir) prefix
       +        from enscript.cfg.in dependency.
       +
        2008-01-29  Tim Retout  <diocles@gnu.org>
        
                * Makefile.am (install-data-local): Prefix installation paths with
 (DIR) diff --git a/lib/Makefile.am b/lib/Makefile.am
       @@ -30,25 +30,18 @@ koi8.enc 88591.enc 88592.enc 88593.enc 88594.enc 88595.enc 88597.enc        \
        edd.hdr emacs.hdr enscript.hdr enscript-color.hdr frame.hdr mp.hdr        \
        simple.hdr squeeze.hdr enscript.pro
        
       +sysconf_DATA = enscript.cfg
       +CLEANFILES = $(sysconf_DATA)
       +
        EXTRA_DIST = enscript.cfg.in $(pkgdata_DATA) Makefile-encodings \
        make-encoding.pl
        
       -CLEANFILES = enscript.cfg
       -
       -all-local: enscript.cfg
       -
       -install-data-local: enscript.cfg
       -        $(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 $(DESTDIR)$(sysconfdir)/enscript.cfg
       +do_subst = sed -e 's%@DATADIR@%$(datadir)%g' \
       +               -e 's%@media@%@MEDIA@%g' \
       +               -e 's%@BINDIR@%$(bindir)%g' \
       +               -e 's%@spooler@%@SPOOLER@%g' \
       +               -e 's%@pslevel@%@PSLEVEL@%g'
        
       -uninstall-local:
       -        rm -f $(DESTDIR)$(sysconfdir)/enscript.cfg
       +enscript.cfg: enscript.cfg.in Makefile
       +        $(do_subst) < $(srcdir)/enscript.cfg.in > 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' \
       -        $(srcdir)/enscript.cfg.in >enscript.cfg