Whamcloud - gitweb
b=5573
authorjacob <jacob>
Thu, 20 Jan 2005 21:12:46 +0000 (21:12 +0000)
committerjacob <jacob>
Thu, 20 Jan 2005 21:12:46 +0000 (21:12 +0000)
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
build/lustre-kernel-2.4.spec.in

index 52037bb..adf50ba 100755 (executable)
@@ -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
index 1cb8f6e..cddbd57 100644 (file)
@@ -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