SPECS: kernel-vanilla.spec - allow reusing sources to build differ...
glen
glen at pld-linux.org
Tue Apr 22 07:52:14 CEST 2008
Author: glen Date: Tue Apr 22 05:52:14 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- allow reusing sources to build different targets
---- Files affected:
SPECS:
kernel-vanilla.spec (1.142 -> 1.143)
---- Diffs:
================================================================
Index: SPECS/kernel-vanilla.spec
diff -u SPECS/kernel-vanilla.spec:1.142 SPECS/kernel-vanilla.spec:1.143
--- SPECS/kernel-vanilla.spec:1.142 Tue Apr 22 07:15:10 2008
+++ SPECS/kernel-vanilla.spec Tue Apr 22 07:52:08 2008
@@ -131,9 +131,10 @@
%define initrd_dir /boot
-%define topdir %{_builddir}/%{name}-%{version}
-%define srcdir %{topdir}/linux-%{_basever}
-%define objdir %{topdir}/o
+%define topdir %{_builddir}/%{name}-%{version}
+%define srcdir %{topdir}/linux-%{_basever}
+%define objdir %{topdir}/%{targetobj}
+%define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
%define CommonOpts HOSTCC="%{kgcc}" HOSTCFLAGS="-Wall -Wstrict-prototypes %{rpmcflags} -fomit-frame-pointer"
%if "%{_target_base_arch}" != "%{_arch}"
@@ -374,10 +375,9 @@
%prep
%setup -qc
-install -d o/scripts
-ln -s %{SOURCE2} o/scripts/kernel-module-build.pl
-ln -s %{SOURCE3} o/scripts/kernel-config.py
-ln -s %{SOURCE4} o/scripts/kernel-config-update.py
+ln -s %{SOURCE2} kernel-module-build.pl
+ln -s %{SOURCE3} kernel-config.py
+ln -s %{SOURCE4} kernel-config-update.py
ln -s %{SOURCE5} Makefile
cd linux-%{_basever}
@@ -396,7 +396,8 @@
%if %{without noarch}
%build
-cat > multiarch.make <<'EOF'
+install -d %{objdir}
+cat > %{targetobj}.mk <<'EOF'
# generated by %{name}.spec
KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{_basever}
KERNELOUTPUT := %{objdir}
@@ -470,13 +471,13 @@
# generate .config and kernel.conf
pykconfig > %{objdir}/.kernel-autogen.conf
-%{__make} pykconfig
+%{__make} TARGETOBJ=%{targetobj} pykconfig
# build kernel
-%{__make} all
+%{__make} TARGETOBJ=%{targetobj} all
# build reverse config and show diff
-%{__make} pykconfig
+%{__make} TARGETOBJ=%{targetobj} pykconfig
diff -u %{_sourcedir}/kernel-vanilla-multiarch.conf %{objdir}/kernel.conf || :
%endif # arch build
@@ -830,6 +831,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.143 2008-04-22 05:52:08 glen
+- allow reusing sources to build different targets
+
Revision 1.142 2008-04-22 05:15:10 glen
- .old links trash cleanup in /boot
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/kernel-vanilla.spec?r1=1.142&r2=1.143&f=u
More information about the pld-cvs-commit
mailing list