summaryrefslogtreecommitdiffstats
path: root/missing
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2006-11-02 03:11:40 +0000
committerRich Megginson <rmeggins@redhat.com>2006-11-02 03:11:40 +0000
commite5ead29c3e278442b37138bc09acbfdc682fd72b (patch)
treea04f6b59b6dd0a2b5eb744e872055ed76b7a292a /missing
parent55654f531c5bb4135fa7b0f461a721c44fab3302 (diff)
downloadds-e5ead29c3e278442b37138bc09acbfdc682fd72b.tar.gz
ds-e5ead29c3e278442b37138bc09acbfdc682fd72b.tar.xz
ds-e5ead29c3e278442b37138bc09acbfdc682fd72b.zip
Bug(s) fixed: 213352
Bug Description: autotools: support redhat/fedora rpmbuild %configure and %makeinstall Reviewed by: nhosoi (Thanks!) Fix Description: The standard way to do an rpmbuild on fedora/redhat is to use the %configure macro in the %prep section of the spec file and the %makeinstall macro in the %install section. These set all of the bindir, libdir, datadir, sysconfdir, etc. paths used by the application. %configure sets them to their "real" runtime locations e.g. /usr/lib, and %makeinstall sets them to their paths used for rpm packaging e.g. /var/tmp/fedora-ds-foo-bar-baz/usr/lib. There were a few places in our autotools files where we were running afoul of this. Another thing is that configure defines bindir etc. as literally '${exec_prefix}/bin' so that the real value doesn't get expanded until make or make install time. This means that we cannot create scripts from templates in configure, we have to do that in make. So this adds a sed command to Makefile.am in order to do all of the script and config file path replacement at make time. Since we do the subst this way, whatever $prefix is set during make will be incorporated into the value of $bindir etc. so we can omit directly referencing @prefix@ in the template files. Platforms tested: RHEL4 Flag Day: no Doc impact: no
Diffstat (limited to 'missing')
-rwxr-xr-xmissing23
1 files changed, 15 insertions, 8 deletions
diff --git a/missing b/missing
index 64b5f901..894e786e 100755
--- a/missing
+++ b/missing
@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2004-09-07.08
+scriptversion=2005-06-08.21
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@@ -19,8 +19,8 @@ scriptversion=2004-09-07.08
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -87,12 +87,12 @@ Supported PROGRAM values:
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
- exit 0
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
- exit 0
+ exit $?
;;
-*)
@@ -288,11 +288,18 @@ WARNING: \`$1' is $msg. You should only need it if
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
touch $file
;;