diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-08-06 15:53:53 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-08-06 15:53:53 +0100 |
commit | 01438f00d44adf33f59da729b347eca60cb461a8 (patch) | |
tree | 474701f6f8cc830247080f87cdb50c38f017a9c9 | |
parent | 12309732c08ba06733b05d5d2ecfdb0018c89e17 (diff) | |
download | pack-01438f00d44adf33f59da729b347eca60cb461a8.tar.gz pack-01438f00d44adf33f59da729b347eca60cb461a8.tar.xz pack-01438f00d44adf33f59da729b347eca60cb461a8.zip |
implement do-link to simplify linking .do files
-rwxr-xr-x | do-link | 8 | ||||
-rwxr-xr-x | libpack.do | 6 | ||||
-rwxr-xr-x | test.do | 6 | ||||
-rwxr-xr-x | test_gen.do | 6 |
4 files changed, 11 insertions, 15 deletions
@@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -e +type=$1 +. "$2" # .do file which we are "interpreting" +redo-ifchange "$0" "link-$type.tool" "${objects[@]}" +shift 2 +. "./link-$type.tool" +"${cmd[@]}" @@ -1,6 +1,2 @@ -#!/usr/bin/env bash -set -e +#!./do-link library objects=(common.o pack.o trace.o unpack.o ieee754b.o) -redo-ifchange link-library.tool "${objects[@]}" -. ./link-library.tool -"${cmd[@]}" @@ -1,6 +1,2 @@ -#!/usr/bin/env bash -set -e +#!./do-link executable objects=(common.o pack.o test.o trace.o unpack.o ieee754b.o) -redo-ifchange link-executable.tool "${objects[@]}" -. ./link-executable.tool -"${cmd[@]}" diff --git a/test_gen.do b/test_gen.do index e879f8f..cffe9df 100755 --- a/test_gen.do +++ b/test_gen.do @@ -1,6 +1,2 @@ -#!/usr/bin/env bash -set -e +#!./do-link executable-host objects=(test_gen.o) -redo-ifchange link-executable-host.tool "${objects[@]}" -. ./link-executable-host.tool -"${cmd[@]}" |