diff options
author | comex | 2015-07-07 16:17:49 -0400 |
---|---|---|
committer | comex | 2015-07-07 16:17:49 -0400 |
commit | ca6dcad6bde14ae030814bf5ce1b22af8d805792 (patch) | |
tree | 7da5edd95014cbeca992eedd723495a1072a2ef9 /script/gen-inject-asm.sh | |
parent | progress (diff) | |
parent | warning fix (diff) | |
download | substitute-ca6dcad6bde14ae030814bf5ce1b22af8d805792.tar.gz |
Merge branch 'mconfig-work'
My pet build system project - not terribly useful for a relatively
simple thing like this, but I want to use it for other purposes, and it
does provide a nice ./configure...
Diffstat (limited to '')
-rwxr-xr-x | script/gen-inject-asm.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/script/gen-inject-asm.sh b/script/gen-inject-asm.sh index a4dfc5b..633a1a5 100755 --- a/script/gen-inject-asm.sh +++ b/script/gen-inject-asm.sh @@ -1,5 +1,7 @@ #!/bin/sh -cat <<END +outfile="$1" +shift +(cat <<END /* Generated by script/gen-inject-asm.sh. The relevant source is in-tree (make * out/darwin-inject-asm.S), but this file has been checked in too, in case * your C compiler doesn't support all of these architectures. @@ -13,10 +15,11 @@ cat <<END .globl _inject_page_start _inject_page_start: END -for i in x86_64 i386 arm arm64; do - echo ".align 2" - echo ".globl _inject_start_$i" - echo "_inject_start_$i:" - printf ".byte " - xxd -i < out/inject-asm-raw-$i.bin | xargs echo -done +while [ -n "$1" ]; do + echo ".align 2" + echo ".globl _inject_start_$1" + echo "_inject_start_$1:" + printf ".byte " + xxd -i < "$2" | xargs echo + shift 2 +done) > "$outfile" |