aboutsummaryrefslogtreecommitdiffhomepage
path: root/GNUmakefile
diff options
context:
space:
mode:
authorarchie2x <[email protected]>2024-09-12 22:05:44 -0700
committerGitHub <[email protected]>2024-09-13 07:05:44 +0200
commit5abf1e998d2622f6aa0ed2f49e21c46bc23012e8 (patch)
tree987b576dd8ff1fffc7c7414ee003b0eb409ca08f /GNUmakefile
parentb5626e70cbe6e0cb6cba5a462f1f53f503d376fd (diff)
downloadtinygo-5abf1e998d2622f6aa0ed2f49e21c46bc23012e8.tar.gz
tinygo-5abf1e998d2622f6aa0ed2f49e21c46bc23012e8.zip
Fix #4421: Add `-C DIR` flag (#4422)
feature: Fix #4421: Add `-C DIR` flag Signed-off-by: Roger Standridge <[email protected]>
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 7333a6ebc..70a7c5f58 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -483,8 +483,17 @@ tinygo-baremetal:
# regression test for #2666: e.g. encoding/hex must pass on baremetal
$(TINYGO) test -target cortex-m-qemu encoding/hex
+.PHONY: testchdir
+testchdir:
+ # test 'build' command with{,out} -C argument
+ $(TINYGO) build -C tests/testing/chdir chdir.go && rm tests/testing/chdir/chdir
+ $(TINYGO) build ./tests/testing/chdir/chdir.go && rm chdir
+ # test 'run' command with{,out} -C argument
+ EXPECT_DIR=$(PWD)/tests/testing/chdir $(TINYGO) run -C tests/testing/chdir chdir.go
+ EXPECT_DIR=$(PWD) $(TINYGO) run ./tests/testing/chdir/chdir.go
+
.PHONY: smoketest
-smoketest:
+smoketest: testchdir
$(TINYGO) version
$(TINYGO) targets > /dev/null
# regression test for #2892