Skip to content
Snippets Groups Projects
Commit 0aca8161 authored by scjody's avatar scjody
Browse files

Branch b1_6

Modify mkmakefile usage and add buildsubdir workaround to fix RPM build on
RHEL 5.

b=13422
i=yangsheng
parent 8eb479cb
No related branches found
No related tags found
No related merge requests found
......@@ -364,6 +364,11 @@ is necessary if you want to access a Lustre filesystem.
#The Lustre book, sample configurations, and other documentation for
#Lustre.
# This is required in rpm >= 4.4.? and _should_ be set by the %setup macro
# but isn't, at least for 4.4.2. Yay RPM.
%define buildsubdir lustre-kernel-%{version}
%define _buildsubdir lustre-kernel-%{version}
%prep
%setup -n lustre-kernel-%{version} -q -c
if [ ! -d lustre ] ; then
......@@ -648,16 +653,25 @@ BuildObj ()
$MAKE clean
rm -rf $o/.config.old $o/include/config
# Replace the Makefile in the object directory with a version
# that has relative path names.
# that has relative path names. This is done by fixing the Makefile
# after the fact to work with 2.6.17 and newer mkmakefile.
read VERSION PATCHLEVEL SUBLEVEL <<-EOF
$(set -- 2.6.5 ; echo ${*//./ })
EOF
rm -f $o/Makefile
source scripts/mkmakefile \
../../../linux-%{KVERREL} \
../linux-%{KVERREL}-obj/%{_target_cpu}/$flavor \
$o \
$VERSION \
$PATCHLEVEL \
> $o/Makefile
> $o/Makefile.in
if [ -f $o/Makefile ] ; then
# will exist only for 2.6.17 and newer because mkmakefile
# now writes the makefile to $o instead of stdout
mv -f $o/Makefile $o/Makefile.in
fi
sed -e "s^$o^../linux-%{KVERREL}-obj/%{_target_cpu}/$flavor^" \
$o/Makefile.in > $o/Makefile
zcat "$RPM_BUILD_ROOT/boot/symvers-%{KVERREL}-%{_target_cpu}${flavtgt}.gz" \
> $o/Module.symvers
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment