Clean path when building autoconf and automake.

Autoconf hard codes paths into itself. This change is a first
pass at allowing a clean environment to let automake build. The
ability to 'make install DESTDIR=xxx' autoconf then use it to
build automake needs a clean environment. The purpose is to
allow a prefix that needs root without building and packaging
when root.
This commit is contained in:
Chris Johns 2013-03-05 19:43:43 +11:00
parent b521098ad6
commit 0606a65718
3 changed files with 14 additions and 4 deletions

View File

@ -31,10 +31,15 @@ cd autoconf-%{autoconf_version}
cd .. cd ..
%build %build
export PATH="%{_bindir}:${PATH}" if test "%{_internal_autotools}" == "yes"; then
export PATH="%{_bindir}:${PATH}"
else
export PATH=$SB_ORIG_PATH
fi
cd autoconf-%{autoconf_version} cd autoconf-%{autoconf_version}
if "%{_internal_autotools}" == "yes"; then if test "%{_internal_autotools}" == "yes"; then
ac_prefix=$SB_TMPPREFIX ac_prefix=$SB_TMPPREFIX
else else
ac_prefix=%{_prefix} ac_prefix=%{_prefix}

View File

@ -31,11 +31,15 @@ cd automake-%{automake_version}
cd .. cd ..
%build %build
export PATH="%{_bindir}:${PATH}" if test "%{_internal_autotools}" == "yes"; then
export PATH="%{_bindir}:${PATH}"
else
export PATH=$SB_ORIG_PATH
fi
cd automake-%{automake_version} cd automake-%{automake_version}
if "%{_internal_autotools}" == "yes"; then if test "%{_internal_autotools}" == "yes"; then
am_prefix=$SB_TMPPREFIX am_prefix=$SB_TMPPREFIX
else else
am_prefix=%{_prefix} am_prefix=%{_prefix}

View File

@ -133,6 +133,7 @@ class buildset:
# exporting to the environment # exporting to the environment
os.environ['SB_TMPPREFIX'] = tmpprefix os.environ['SB_TMPPREFIX'] = tmpprefix
os.environ['SB_TMPBINDIR'] = tmpbindir os.environ['SB_TMPBINDIR'] = tmpbindir
os.environ['SB_ORIG_PATH'] = os.environ['PATH']
os.environ['PATH'] = path.host(tmpbindir) + os.pathsep + os.environ['PATH'] os.environ['PATH'] = path.host(tmpbindir) + os.pathsep + os.environ['PATH']
self._output('path: ' + os.environ['PATH']) self._output('path: ' + os.environ['PATH'])
# shell format # shell format