Changeset 992 in kBuild
- Timestamp:
- May 29, 2007 7:45:16 PM (18 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/env.sh
r811 r992 27 27 #set -x 28 28 29 # kBuild path. 29 # 30 # Determin the kBuild path from the script location. 31 # 30 32 if [ -z "$PATH_KBUILD" ]; then 31 33 PATH_KBUILD=`dirname "$0"` … … 40 42 echo "dbg: PATH_KBUILD=$PATH_KBUILD" 41 43 42 # Type. 44 # 45 # Set default build type. 46 # 43 47 if [ -z "$BUILD_TYPE" ]; then 44 48 BUILD_TYPE=release … … 47 51 echo "dbg: BUILD_TYPE=$BUILD_TYPE" 48 52 49 50 # Host platform. 51 if [ -z "$BUILD_PLATFORM_CPU" ]; then 52 BUILD_PLATFORM_CPU=`uname -m` 53 case "$BUILD_PLATFORM_CPU" in 54 x86_64|AMD64|amd64) 55 BUILD_PLATFORM_CPU='k8' 56 ;; 57 esac 58 fi 59 export BUILD_PLATFORM_CPU 60 echo "dbg: BUILD_PLATFORM_CPU=$BUILD_PLATFORM_CPU" 61 53 # 54 # Determin the host platform. 55 # 56 # The CPU isn't important, only the other two are. But, since the cpu, 57 # arch and platform (and build type) share a common key space, try make 58 # sure any new additions are unique. (See header.kmk, KBUILD_OSES/ARCHES.) 59 # 62 60 if [ -z "$BUILD_PLATFORM_ARCH" ]; then 63 case "$BUILD_PLATFORM_CPU" in 64 i[3456789]86|i86pc) 61 # Try deduce it from the cpu if given. 62 if [ -s "$BUILD_PLATFORM_CPU" ]; then 63 case "$BUILD_PLATFORM_CPU" in 64 i[3456789]86) 65 BUILD_PLATFORM_ARCH='x86' 66 ;; 67 k8|k8l|k9|k10) 68 BUILD_PLATFORM_ARCH='amd64' 69 ;; 70 esac 71 fi 72 fi 73 if [ -z "$BUILD_PLATFORM_ARCH" ]; then 74 # Use uname (lots of guesses here, please help clean this up...) 75 BUILD_PLATFORM_ARCH=`uname -m` 76 case "$BUILD_PLATFORM_ARCH" in 77 x86_64|AMD64|amd64|k8|k8l|k9|k10) 78 BUILD_PLATFORM_ARCH='amd64' 79 ;; 80 x86|i86pc|ia32|i[3456789]86) 65 81 BUILD_PLATFORM_ARCH='x86' 66 82 ;; 67 k8|k8l|k9|k10) 68 BUILD_PLATFORM_ARCH='amd64' 69 ;; 83 sparc32|sparc) 84 BUILD_PLATFORM_ARCH='sparc32' 85 ;; 86 sparc64) 87 BUILD_PLATFORM_ARCH='sparc64' 88 ;; 89 s390) 90 ## @todo: 31-bit vs 64-bit on the mainframe? 91 BUILD_PLATFORM_ARCH='s390' 92 ;; 93 ppc32|ppc|powerpc) 94 BUILD_PLATFORM_ARCH='ppc32' 95 ;; 96 ppc64|powerpc64) 97 BUILD_PLATFORM_ARCH='ppc64' 98 ;; 99 mips32|mips) 100 BUILD_PLATFORM_ARCH='mips32' 101 ;; 102 mips64) 103 BUILD_PLATFORM_ARCH='mips64' 104 ;; 105 ia64) 106 BUILD_PLATFORM_ARCH='ia64' 107 ;; 108 #hppa32|hppa|parisc32|parisc)? 109 hppa32|parisc32) 110 BUILD_PLATFORM_ARCH='hppa32' 111 ;; 112 hppa64|parisc64) 113 BUILD_PLATFORM_ARCH='hppa64' 114 ;; 115 arm) 116 BUILD_PLATFORM_ARCH='arm' 117 ;; 118 alpha) 119 BUILD_PLATFORM_ARCH='alpha' 120 ;; 121 70 122 *) echo "$0: unknown cpu/arch - $BUILD_PLATFORM_CPU" 71 123 sleep 1 … … 78 130 echo "dbg: BUILD_PLATFORM_ARCH=$BUILD_PLATFORM_ARCH" 79 131 132 if [ -s "$BUILD_PLATFORM_CPU" ]; then 133 BUILD_PLATFORM_CPU="blend" 134 fi 135 export BUILD_PLATFORM_CPU 136 echo "dbg: BUILD_PLATFORM_CPU=$BUILD_PLATFORM_CPU" 80 137 81 138 if [ -z "$BUILD_PLATFORM" ]; then … … 125 182 126 183 127 # Target platform. 184 # 185 # The target platform. 186 # Defaults to the host when not specified. 187 # 128 188 if [ -z "$BUILD_TARGET_CPU" ]; then 129 BUILD_TARGET_CPU= $BUILD_PLATFORM_CPU189 BUILD_TARGET_CPU="$BUILD_PLATFORM_CPU" 130 190 fi 131 191 export BUILD_TARGET_CPU … … 133 193 134 194 if [ -z "$BUILD_TARGET_ARCH" ]; then 135 case "$BUILD_TARGET_CPU" in 136 i[3456789]86|i86pc) 137 BUILD_TARGET_ARCH='x86' 138 ;; 139 k8|k8l|k9|k10) 140 BUILD_TARGET_ARCH='amd64' 141 ;; 142 *) echo "$0: unknown cpu/arch - $BUILD_TARGET_CPU" 143 sleep 1 144 exit 1 145 ;; 146 esac 147 195 BUILD_TARGET_ARCH="$BUILD_PLATFORM_ARCH" 148 196 fi 149 197 export BUILD_TARGET_ARCH … … 151 199 152 200 if [ -z "$BUILD_TARGET" ]; then 153 BUILD_TARGET= $BUILD_PLATFORM201 BUILD_TARGET="$BUILD_PLATFORM" 154 202 fi 155 203 export BUILD_TARGET … … 161 209 _PATH_SEP=":" 162 210 case "$BUILD_PLATFORM" in 163 os2|win| win32|win64|nt|winnt|win2k|winxp)211 os2|win|nt) 164 212 _SUFF_EXE=".exe" 165 213 _PATH_SEP=";" … … 167 215 esac 168 216 169 # Make shell 217 # Make shell. OS/2 and DOS only? 170 218 export MAKESHELL="$PATH_KBUILD/bin/$BUILD_PLATFORM.$BUILD_PLATFORM_ARCH/kmk_ash${_SUFF_EXE}"; 171 219 172 # The PATH. 220 # 221 # Add the bin/x.y/ directory to the PATH. 222 # NOTE! Once bootstrapped this is the only thing that is actually necessary. 223 # 173 224 PATH="$PATH_KBUILD/bin/$BUILD_PLATFORM.$BUILD_PLATFORM_ARCH/${_PATH_SEP}$PATH" 174 225 export PATH -
trunk/kBuild/header.kmk
r989 r992 138 138 # 139 139 KBUILD_OSES := darwin freebsd l4 linux netbsd nt openbsd os2 solaris win 140 KBUILD_ARCHES := x86 amd64 sparc32 sparc64 mips32 mips64 ppc32 ppc64140 KBUILD_ARCHES := x86 amd64 sparc32 sparc64 s390 ppc32 ppc64 mips32 mips64 ia64 hppa32 hppa64 arm alpha 141 141 142 142
Note:
See TracChangeset
for help on using the changeset viewer.