Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Autodetect platform properly

  • Loading branch information...
commit 203d07766389172b25490574928cbeacc502a13e 1 parent a9e546a
Christian Neukirchen authored
1  COOKBOOK
View
@@ -52,7 +52,6 @@ Now reboot into your freshly installed Sabotage system!
Git clone the sabotage repository. Copy "KEEP/config.stage" to "config"
and adjust the variables:
- $A architecture (i386 or x86_64)
$K directory with patches
$S where sources are compiled (stage0: ~700MB, stage1: ~2.1GB)
$R root file system, potentially loopback-mounted or on a real partition
1  KEEP/config.stage0
View
@@ -1,4 +1,3 @@
-export A=$(uname -m)
export K=$(pwd)/KEEP
export S=/tmp/sabotage/src
export R=/tmp/sabotage/root
1  KEEP/config.stage1
View
@@ -1,4 +1,3 @@
-export A=$(uname -m)
export K=/tmp/src/KEEP
export S=/tmp/src
export R=/
1  README
View
@@ -17,7 +17,6 @@ DO NOT RUN SCRIPTS YOU HAVE NOT READ.
% cp KEEP/config.stage0 config
% vi config
- $A architecture (x86_64 or i386)
$K directory with patches
$S where sources are compiled (stage0: ~700MB, stage1: ~2.1GB)
$R root file system
1  build-stage0
View
@@ -2,6 +2,7 @@
set -e -x
export H=$(pwd)
+export A=$($H/utils/platform)
. $H/config
. $H/utils/utils
1  mkfile
View
@@ -12,6 +12,7 @@ help:QV:
echo " list show all packages"
PATH=utils:$PATH
+A=`utils/platform`
<|sed 's/export//' config
<deps
<|recipes
9 utils/platform
View
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cpp -P <<EOF | grep -v "^$"
+#ifdef __i386__
+i386
+#elif __amd64__
+x86_64
+#endif
+EOF

4 comments on commit 203d077

keks
$ ./utils/platform  
1

on

$ cpp --version
cpp (GCC) 4.6.0 20110513 (prerelease)
Christian Neukirchen
keks
% uname -a
Linux keks-netbook 2.6.38-ARCH #1 SMP PREEMPT Fri May 13 07:54:18 UTC 2011 i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GenuineIntel GNU/Linux
keks

inserting

#elif __i686__
i686

doesn't help.

Please sign in to comment.
Something went wrong with that request. Please try again.