SPECS: pwc.spec - new module build system

sparky sparky at pld-linux.org
Mon Feb 20 00:43:57 CET 2006


Author: sparky                       Date: Sun Feb 19 23:43:57 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- new module build system

---- Files affected:
SPECS:
   pwc.spec (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SPECS/pwc.spec
diff -u SPECS/pwc.spec:1.10 SPECS/pwc.spec:1.11
--- SPECS/pwc.spec:1.10	Sun Feb 19 22:39:54 2006
+++ SPECS/pwc.spec	Mon Feb 20 00:43:52 2006
@@ -116,36 +116,27 @@
 	if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
 		exit 1
 	fi
-	rm -rf include
-	install -d include/{linux,config}
-	ln -sf %{_kernelsrcdir}/config-$cfg .config
-	ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
-%ifarch ppc
-	if [ -d "%{_kernelsrcdir}/include/asm-powerpc" ]; then
-		install -d include/asm
-		cp -a %{_kernelsrcdir}/include/asm-%{_target_base_arch}/* include/asm
-		cp -a %{_kernelsrcdir}/include/asm-powerpc/* include/asm
-	else
-		ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
-	fi
-%else
-	ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
-%endif
-	ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
-	touch include/config/MARKER
-	if grep -q "^CONFIG_PREEMPT_RT=y$" .config; then
+	install -d o/include/linux
+	ln -sf %{_kernelsrcdir}/config-$cfg o/.config
+	ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
+	ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
+	if grep -q "^CONFIG_PREEMPT_RT=y$" o/.config; then
 		sed 's/SPIN_LOCK_UNLOCKED/SPIN_LOCK_UNLOCKED(pdev->ptrlock)/' \
 			pwc-if.c.orig > pwc-if.c
 	else
 		cat pwc-if.c.orig > pwc-if.c
 	fi
-	%{__make} -C %{_kernelsrcdir} clean \
-		RCS_FIND_IGNORE="-name '*.ko' -o" \
-		M=$PWD O=$PWD \
-		%{?with_verbose:V=1}
+
+	%if %{with dist_kernel}
+		%{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
+	%else
+		install -d o/include/config
+		touch o/include/config/MARKER
+		ln -sf %{_kernelsrcdir}/scripts o/scripts
+	%endif
 	%{__make} -C %{_kernelsrcdir} modules \
 		CC="%{__cc}" CPP="%{__cpp}" \
-		M=$PWD O=$PWD \
+		M=$PWD O=$PWD/o \
 		%{?with_verbose:V=1}
 	mv pwc{,-$cfg}.ko
 done
@@ -209,6 +200,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.11  2006/02/19 23:43:52  sparky
+- new module build system
+
 Revision 1.10  2006/02/19 21:39:54  sparky
 - conditional preempt realtime hack
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/pwc.spec?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list