]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Use pkgdatadir consistently.
authorEric Blake <ebb9@byu.net>
Tue, 24 Feb 2009 16:27:15 +0000 (09:27 -0700)
committerEric Blake <ebb9@byu.net>
Tue, 24 Feb 2009 16:38:01 +0000 (09:38 -0700)
* bin/Makefile.am (edit): Substitute pkgdatadir, not datadir.
* lib/Makefile.am (edit): Likewise.
* lib/autom4te.in (Autoconf-without-aclocal-m4, Autotest, M4sh)
(M4sugar): Use @pkgdatadir@, not @datadir@.
* bin/autoheader.in ($datadir): Likewise.
* bin/autom4te.in ($datadir): Likewise.
* bin/autoreconf.in ($datadir): Likewise.
* bin/autoscan.in ($datadir): Likewise.
* bin/autoupdate.in ($datadir): Likewise.
* bin/ifnames.in ($datadir): Likewise.
* doc/autoconf.texi (Installation Directory Variables): Update
example to be consistent; focus on $(bindir) as an autoconf
variable, and mention that $(pkgdatadir) comes from automake.
Reported by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
bin/Makefile.am
bin/autoheader.in
bin/autom4te.in
bin/autoreconf.in
bin/autoscan.in
bin/autoupdate.in
bin/ifnames.in
doc/autoconf.texi
lib/Makefile.am
lib/autom4te.in

index c68d1b5de148f39ddbf3cf708bec68d7f1835aad..08f9e292c850cd0237380dc05046832e07e594fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2009-02-24  Eric Blake  <ebb9@byu.net>
+
+       Use pkgdatadir consistently.
+       * bin/Makefile.am (edit): Substitute pkgdatadir, not datadir.
+       * lib/Makefile.am (edit): Likewise.
+       * lib/autom4te.in (Autoconf-without-aclocal-m4, Autotest, M4sh)
+       (M4sugar): Use @pkgdatadir@, not @datadir@.
+       * bin/autoheader.in ($datadir): Likewise.
+       * bin/autom4te.in ($datadir): Likewise.
+       * bin/autoreconf.in ($datadir): Likewise.
+       * bin/autoscan.in ($datadir): Likewise.
+       * bin/autoupdate.in ($datadir): Likewise.
+       * bin/ifnames.in ($datadir): Likewise.
+       * doc/autoconf.texi (Installation Directory Variables): Update
+       example to be consistent; focus on $(bindir) as an autoconf
+       variable, and mention that $(pkgdatadir) comes from automake.
+       Reported by Reuben Thomas.
+
 2009-02-19  Eric Blake  <ebb9@byu.net>
 
        Use m4_translit more efficiently in AS_ESCAPE.
index acb5e61b948a6da987ef87cb7207d21493bf672c..ba88ab01f5899b1bd1349fad0523131b9cb6c7ef 100644 (file)
@@ -1,7 +1,7 @@
 # Make Autoconf commands.
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+# 2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ edit = sed \
        -e 's|@SHELL[@]|$(SHELL)|g' \
        -e 's|@PERL[@]|$(PERL)|g' \
        -e 's|@bindir[@]|$(bindir)|g' \
-       -e 's|@datadir[@]|$(pkgdatadir)|g' \
+       -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
        -e 's|@prefix[@]|$(prefix)|g' \
        -e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
        -e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
index 66a2f2cf96668f070da0761724b5276622950ebd..9f9fba36e71ce96530016e8ee8ff9f3df7c96562 100644 (file)
@@ -31,8 +31,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 BEGIN
 {
-  my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@';
-  unshift @INC, "$datadir";
+  my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
+  unshift @INC, "$pkgdatadir";
 
   # Override SHELL.  On DJGPP SHELL may not be set to a shell
   # that can handle redirection and quote arguments correctly,
index 946452cd450737dfd205e64cfb5403a940a31781..471b1656ce7afaec89a2f8c2b56e5dcd29d45b0a 100644 (file)
@@ -27,8 +27,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 BEGIN
 {
-  my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@';
-  unshift @INC, $datadir;
+  my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
+  unshift @INC, $pkgdatadir;
 
   # Override SHELL.  On DJGPP SHELL may not be set to a shell
   # that can handle redirection and quote arguments correctly,
@@ -47,7 +47,7 @@ use File::Basename;
 use strict;
 
 # Data directory.
-my $datadir = $ENV{'AC_MACRODIR'} || '@datadir@';
+my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@';
 
 # $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE.
 my %language;
@@ -958,7 +958,7 @@ sub freeze ($)
 ## -------------- ##
 
 mktmpdir ('am4t');
-load_configuration ($ENV{'AUTOM4TE_CFG'} || "$datadir/autom4te.cfg");
+load_configuration ($ENV{'AUTOM4TE_CFG'} || "$pkgdatadir/autom4te.cfg");
 load_configuration ("$ENV{'HOME'}/.autom4te.cfg")
   if exists $ENV{'HOME'} && -f "$ENV{'HOME'}/.autom4te.cfg";
 load_configuration (".autom4te.cfg")
index 9bedbf643567591bbe1ec39f19e5561c971230a7..2eae7176cefd50a39ec50b59a87c7ea16e243e4e 100644 (file)
@@ -29,8 +29,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 BEGIN
 {
-  my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@';
-  unshift @INC, $datadir;
+  my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
+  unshift @INC, $pkgdatadir;
 
   # Override SHELL.  On DJGPP SHELL may not be set to a shell
   # that can handle redirection and quote arguments correctly,
index df39c9b19cad0946c4a246ffb5598cbb73c59276..75abd1cd2dc7d3109cf69e396a44382f9575109b 100644 (file)
@@ -28,8 +28,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 BEGIN
 {
-  my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@';
-  unshift @INC, $datadir;
+  my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
+  unshift @INC, $pkgdatadir;
 
   # Override SHELL.  On DJGPP SHELL may not be set to a shell
   # that can handle redirection and quote arguments correctly,
@@ -97,7 +97,7 @@ my $log;
 my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
 my $autoconf = "$autom4te --language=autoconf";
 my @prepend_include;
-my @include = ('@datadir@');
+my @include = ('@pkgdatadir@');
 
 # $help
 # -----
index 50987b47f97214b856c697cc58905943b17f5dd7..e6f17e7f8563008bd264204726cdae1231cb0cb5 100644 (file)
@@ -29,8 +29,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 BEGIN
 {
-  my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@';
-  unshift @INC, $datadir;
+  my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
+  unshift @INC, $pkgdatadir;
 
   # Override SHELL.  On DJGPP SHELL may not be set to a shell
   # that can handle redirection and quote arguments correctly,
@@ -53,7 +53,7 @@ my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
 my $autoconf = "$autom4te --language=autoconf";
 # We need to find m4sugar.
 my @prepend_include;
-my @include = ('@datadir@');
+my @include = ('@pkgdatadir@');
 my $force = 0;
 # m4.
 my $m4 = $ENV{"M4"} || '@M4@';
index f99e4b973415267a1d9cd2c850056c2862c9ffc0..d470744c2c05fa8cb327f980c53e5446f2a14e91 100644 (file)
@@ -33,8 +33,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 BEGIN
 {
-  my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@';
-  unshift @INC, $datadir;
+  my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
+  unshift @INC, $pkgdatadir;
 
   # Override SHELL.  On DJGPP SHELL may not be set to a shell
   # that can handle redirection and quote arguments correctly,
index dcf591d28d2ed3f705a0beb6320614c13737850f..0c0740b8df7d698b964d41d30c17ae0de52596f9 100644 (file)
@@ -2729,7 +2729,7 @@ you should add
 @code{CPPFLAGS} (@code{AM_CPPFLAGS} if you are also using Automake).
 
 Similarly, you should not rely on @code{AC_CONFIG_FILES} to replace
-@code{datadir} and friends in your shell scripts and other files; instead,
+@code{bindir} and friends in your shell scripts and other files; instead,
 let @command{make} manage their replacement.  For instance Autoconf
 ships templates of its shell scripts ending with @samp{.in}, and uses a
 makefile snippet similar to the following to build scripts like
@@ -2738,14 +2738,17 @@ makefile snippet similar to the following to build scripts like
 @example
 @group
 edit = sed \
-        -e 's|@@datadir[@@]|$(pkgdatadir)|g' \
+        -e 's|@@bindir[@@]|$(bindir)|g' \
+        -e 's|@@pkgdatadir[@@]|$(pkgdatadir)|g' \
         -e 's|@@prefix[@@]|$(prefix)|g'
 @end group
 
 @group
 autoheader autom4te: Makefile
         rm -f $@@ $@@.tmp
-        $(edit) '$(srcdir)/$@@.in' >$@@.tmp
+        srcdir=''; \
+          test -f ./$@@.in || srcdir=$(srcdir)/; \
+          $(edit) $$@{srcdir@}$@@.in >$@@.tmp
         chmod +x $@@.tmp
         chmod a-w $@@.tmp
         mv $@@.tmp $@@
@@ -2760,20 +2763,24 @@ autom4te: $(srcdir)/autom4te.in
 Some details are noteworthy:
 
 @table @asis
-@item @samp{@@datadir[@@]}
+@item @samp{@@bindir[@@]}
 The brackets prevent @command{configure} from replacing
-@samp{@@datadir@@} in the Sed expression itself.
+@samp{@@bindir@@} in the Sed expression itself.
 Brackets are preferable to a backslash here, since
 Posix says @samp{\@@} is not portable.
 
-@item @samp{$(pkgdatadir)}
-Don't use @samp{@@pkgdatadir@@}!  Use the matching makefile variable
+@item @samp{$(bindir)}
+Don't use @samp{@@bindir@@}!  Use the matching makefile variable
 instead.
 
+@item @samp{$(pkgdatadir)}
+The example takes advantage of the variable @samp{$(pkgdatadir)}
+provided by Automake; it is equivalent to @samp{$(datadir)/$(PACKAGE)}.
+
 @item @samp{/}
 Don't use @samp{/} in the Sed expressions that replace file names since
 most likely the
-variables you use, such as @samp{$(pkgdatadir)}, contain @samp{/}.
+variables you use, such as @samp{$(bindir)}, contain @samp{/}.
 Use a shell metacharacter instead, such as @samp{|}.
 
 @item special characters
index ac5dfb95a008b96f1d02623d1b3dbbd69670ba3e..ab52b66db2f457e319bae6f43842c609796a652b 100644 (file)
@@ -1,7 +1,7 @@
 # Make Autoconf-related libraries.
 
-# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software
+# Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ edit = sed \
        -e 's|@SHELL[@]|$(SHELL)|g' \
        -e 's|@PERL[@]|$(PERL)|g' \
        -e 's|@bindir[@]|$(bindir)|g' \
-       -e 's|@datadir[@]|$(pkgdatadir)|g' \
+       -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
        -e 's|@prefix[@]|$(prefix)|g' \
        -e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
        -e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
index 36ea61a6c245194e24d95848d120b5ec06e01ec1..e473fd4426ab169359ba8803fea76732f765c35d 100644 (file)
@@ -1,7 +1,7 @@
 # Definition of Autom4te option sets.                     -*- Makefile -*-
 #
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free
-# Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
 #
 # This file is part of GNU Autoconf.
 #
@@ -100,7 +100,7 @@ end-language: "Autoreconf-preselections"
 # This intermediate language is used by aclocal to build aclocal.m4.
 
 begin-language: "Autoconf-without-aclocal-m4"
-args: --prepend-include '@datadir@'
+args: --prepend-include '@pkgdatadir@'
 args: --cache=autom4te.cache
 args: autoconf/autoconf.m4f
 args: acsite.m4?
@@ -127,7 +127,7 @@ end-language: "Autoconf"
 ## -------- ##
 
 begin-language: "Autotest"
-args: --prepend-include '@datadir@'
+args: --prepend-include '@pkgdatadir@'
 args: autotest/autotest.m4f
 args: package.m4?
 args: local.at?
@@ -141,7 +141,7 @@ end-language: "Autotest"
 ## ---- ##
 
 begin-language: "M4sh"
-args: --prepend-include '@datadir@'
+args: --prepend-include '@pkgdatadir@'
 args: m4sugar/m4sh.m4f
 args: --mode 777
 args: --language M4sugar
@@ -153,7 +153,7 @@ end-language: "M4sh"
 ## ------- ##
 
 begin-language: "M4sugar"
-args: --prepend-include '@datadir@'
+args: --prepend-include '@pkgdatadir@'
 args: m4sugar/m4sugar.m4f
 args: --warnings syntax
 end-language: "M4sugar"