From 7a458c4277d49fb899ab7eee28706267a65da10d Mon Sep 17 00:00:00 2001 From: jacob Date: Thu, 20 Jan 2005 21:12:46 +0000 Subject: [PATCH] b=5573 fix savedheaders when we have multiple target-archs in a given target. this probably breaks srource rpms if we were to build i586 and i686, but we don't do that (yet). --- build/lmake | 11 +++++++---- build/lustre-kernel-2.4.spec.in | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build/lmake b/build/lmake index 52037bb..adf50ba 100755 --- a/build/lmake +++ b/build/lmake @@ -502,18 +502,21 @@ install_kms() save_headers() { - echo "Saving headers for $1 $2..." + (( $SAVE_HEADERS )) || return 0 + + echo "Saving headers for ${TARGET_CONFIG:-up} ${TARGET_ARCH}..." pushd linux >/dev/null KVERREL="${VERSION}-${EXTRA_VERSION}" # deal with the kernel headers that are version specific - saveddir="$RPM_BUILD_ROOT/usr/src/linux-${KVERREL}/savedheaders/$2/$1" + saveddir="$RPM_BUILD_ROOT/usr/src/linux-${KVERREL}/savedheaders/${TARGET_ARCH}/${TARGET_CONFIG:-up}" mkdir -p "$saveddir" install -m 644 include/linux/autoconf.h "$saveddir/autoconf.h" install -m 644 include/linux/version.h "$saveddir/version.h" mv include/linux/modules "$saveddir/" - echo $2 $1 ../../savedheaders/$2/$1/ >> $RPM_BUILD_ROOT/usr/src/linux-${KVERREL}/savedheaders/list + echo ${TARGET_ARCH} ${TARGET_CONFIG} ../../savedheaders/${TARGET_ARCH}/${TARGET_CONFIG:-up}/ \ + >> "$RPM_BUILD_ROOT/usr/src/linux-${KVERREL}/savedheaders/list" popd >/dev/null } @@ -660,6 +663,6 @@ install_lustre install_kms -save_all_headers +save_headers exit 0 diff --git a/build/lustre-kernel-2.4.spec.in b/build/lustre-kernel-2.4.spec.in index 1cb8f6e..cddbd57 100644 --- a/build/lustre-kernel-2.4.spec.in +++ b/build/lustre-kernel-2.4.spec.in @@ -472,6 +472,7 @@ BuildKernel() sh -x ./build/lmake \ --build-kernel --build-lustre \ --install \ + --save-headers \ --target @LUSTRE_TARGET@ \ --target-arch %{_target_cpu} \ ${target_config} \ @@ -546,7 +547,6 @@ BuildKernel %if %{buildbase} BuildLustre -SaveHeaders %endif popd >/dev/null -- 1.8.3.1