Commit fe809b82 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: rpm-pkg: use %{makeflags} to pass common Make options

This is useful to pass more common Make options.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 19286825
...@@ -39,6 +39,7 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \ ...@@ -39,6 +39,7 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
# $M: this line is enabled only when CONFIG_MODULES is enabled # $M: this line is enabled only when CONFIG_MODULES is enabled
sed -e '/^DEL/d' -e 's/^\t*//' <<EOF sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
%{!?make: %define make make} %{!?make: %define make make}
%define makeflags %{?_smp_mflags}
Name: kernel Name: kernel
Summary: The Linux Kernel Summary: The Linux Kernel
...@@ -91,19 +92,19 @@ $S cp %{SOURCE1} .config ...@@ -91,19 +92,19 @@ $S cp %{SOURCE1} .config
$S patch -p1 < %{SOURCE2} $S patch -p1 < %{SOURCE2}
$S $S
$S %build $S %build
$S %{make} %{?_smp_mflags} KERNELRELEASE=$KERNELRELEASE KBUILD_BUILD_VERSION=%{release} $S %{make} %{makeflags} KERNELRELEASE=$KERNELRELEASE KBUILD_BUILD_VERSION=%{release}
$S $S
%install %install
mkdir -p %{buildroot}/boot mkdir -p %{buildroot}/boot
%ifarch ia64 %ifarch ia64
mkdir -p %{buildroot}/boot/efi mkdir -p %{buildroot}/boot/efi
cp \$(%{make} -s image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE cp \$(%{make} %{makeflags} -s image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE
ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/ ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/
%else %else
cp \$(%{make} -s image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE cp \$(%{make} %{makeflags} -s image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
%endif %endif
$M %{make} %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install $M %{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} modules_install
%{make} %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install %{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE
cp .config %{buildroot}/boot/config-$KERNELRELEASE cp .config %{buildroot}/boot/config-$KERNELRELEASE
$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build $S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment