]> git.pld-linux.org Git - packages/kernel.git/blob - kernel-BuildASM.sh
- moving config-* fixed.
[packages/kernel.git] / kernel-BuildASM.sh
1 #!/bin/sh
2 INCPATH=${1:-/usr/include}
3 cd $INCPATH
4 if [ ! -d asm-sparc -o ! -d asm-sparc64 ] ; then
5         echo You must create $INCPATH/asm-sparc* symlinks first.
6         exit 1
7 fi
8 if [ ! -d asm ]; then mkdir asm; fi
9 cd asm
10 for I in `( ls ../asm-sparc; ls ../asm-sparc64 ) | grep '\.h$' | sort -u`; do
11         J=`echo $I | tr a-z. A-Z_`
12         cat > $I << EOF
13 #ifndef __SPARCSTUB__${J}__
14 #define __SPARCSTUB__${J}__
15 EOF
16         if [ -f ../asm-sparc/$I -a -f ../asm-sparc64/$I ]; then
17                 cat >> $I <<EOF
18 #ifdef __sparc_v9__
19 #include <asm-sparc64/$I>
20 #else
21 #include <asm-sparc/$I>
22 #endif
23 #endif
24 EOF
25         elif [ -f ../asm-sparc/$I ]; then
26                 cat >> $I <<EOF
27 #ifndef __sparc_v9__
28 #include <asm-sparc/$I>
29 #endif
30 #endif
31 EOF
32         else
33                 cat >> $I <<EOF
34 #ifdef __sparc_v9__
35 #include <asm-sparc64/$I>
36 #endif
37 #endif
38 EOF
39         fi
40 done
This page took 0.02841 seconds and 3 git commands to generate.