summaryrefslogtreecommitdiffstats
path: root/compile
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 /compile
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 'compile')
-rwxr-xr-xcompile12
1 files changed, 7 insertions, 5 deletions
diff --git a/compile b/compile
index 80b645b0..1b1d2321 100755
--- a/compile
+++ b/compile
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
-scriptversion=2004-09-10.20
+scriptversion=2005-05-14.22
-# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@ scriptversion=2004-09-10.20
#
# 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
@@ -47,11 +47,11 @@ right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
- exit 0
+ exit $?
;;
-v | --v*)
echo "compile $scriptversion"
- exit 0
+ exit $?
;;
esac
@@ -125,6 +125,8 @@ ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"