summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@gmail.com>2011-05-03 14:18:37 -0700
committerAvery Pennarun <apenwarr@gmail.com>2011-05-03 14:18:37 -0700
commitc13be0b817ae39df268f24350a7b26b15fe388ac (patch)
tree6595d1e85db16312c832dd8df6a5c4b35d003d02
parentda2c6273f6c1a657794a626b2fa9df9b03432ff7 (diff)
ui-macos/bits/runpython.do: auto-determine arches to build for.
Some people don't have all of them installed, so auto-detect them by looking at the available arches in /usr/libexec.
-rw-r--r--ui-macos/bits/runpython.do6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui-macos/bits/runpython.do b/ui-macos/bits/runpython.do
index 3db6bee..ced2b65 100644
--- a/ui-macos/bits/runpython.do
+++ b/ui-macos/bits/runpython.do
@@ -1,6 +1,10 @@
exec >&2
redo-ifchange runpython.c
-gcc -arch ppc -arch i386 -arch x86_64 \
+ARCHES=""
+for d in /usr/libexec/gcc/darwin/*; do
+ ARCHES="$ARCHES -arch $(basename $d)"
+done
+gcc $ARCHES \
-Wall -o $3 runpython.c \
-I/usr/include/python2.5 \
-lpython2.5