projects
/
coreboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add getopt implementation to abuild
[coreboot.git]
/
util
/
abuild
/
abuild
diff --git
a/util/abuild/abuild
b/util/abuild/abuild
index 74d2908e69f23870101a72b4cd88bae0bf91e4ea..5b8d73d2a63be57977a5cde1a50395fcddf81cb9 100755
(executable)
--- a/
util/abuild/abuild
+++ b/
util/abuild/abuild
@@
-563,6
+563,10
@@
test -f util/sconfig/sconfig.l && ROOT=$( pwd )
test -f ../util/sconfig/sconfig.l && ROOT=$( cd ..; pwd )
test "$ROOT" = "" && ROOT=$( cd ../..; pwd )
test -f ../util/sconfig/sconfig.l && ROOT=$( cd ..; pwd )
test "$ROOT" = "" && ROOT=$( cd ../..; pwd )
+# Look if we have getopt. If not, build it.
+export PATH=$PATH:util/abuild
+getopt - > /dev/null 2>/dev/null || gcc -o util/abuild/getopt util/abuild/getopt.c
+
# parse parameters.. try to find out whether we're running GNU getopt
getoptbrand="`getopt -V`"
if [ "${getoptbrand:0:6}" == "getopt" ]; then
# parse parameters.. try to find out whether we're running GNU getopt
getoptbrand="`getopt -V`"
if [ "${getoptbrand:0:6}" == "getopt" ]; then