From bac790ae3b40fd66920c9b63b67f02bbc13f5e68 Mon Sep 17 00:00:00 2001 From: dom96 Date: Wed, 11 Apr 2012 20:45:27 +0100 Subject: [PATCH] The build.sh file generated by niminst now supports a --extraBuildArgs param. --- tools/niminst/buildsh.tmpl | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tools/niminst/buildsh.tmpl b/tools/niminst/buildsh.tmpl index 1f15901cc6..936378de23 100755 --- a/tools/niminst/buildsh.tmpl +++ b/tools/niminst/buildsh.tmpl @@ -3,9 +3,30 @@ # result = "#! /bin/sh\n# Generated from niminst\n" & # "# Template is in tools/buildsh.tmpl\n" & # "# To regenerate run ``niminst csource`` or ``koch csource``\n" +while : +do + case "$1" in + --extraBuildArgs) + extraBuildArgs=" $2" + shift 2 + ;; + --) # End of all options + shift + break; + ;; + -*) + echo "Error: Unknown option: $1" >&2 + exit 1 + ;; + *) # No more options + break + ;; + esac +done + CC="gcc" LINKER="gcc" -COMP_FLAGS="?{c.ccompiler.flags}" +COMP_FLAGS="?{c.ccompiler.flags}$extraBuildArgs" LINK_FLAGS="?{c.linker.flags}" # add(result, "# platform detection\n") ucpu=`uname -m`