aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-05 07:04:50 +0900
committernsfisis <nsfisis@gmail.com>2025-05-05 07:21:09 +0900
commit31246525edffcc43c36d30127cabb995e4a6b989 (patch)
tree178f9b9b94ae98a363a40b195419808fcddaf717
parente946ee00708f271280fbd05d9c4fd2685363f1c6 (diff)
downloadP4Dcc-31246525edffcc43c36d30127cabb995e4a6b989.tar.gz
P4Dcc-31246525edffcc43c36d30127cabb995e4a6b989.tar.zst
P4Dcc-31246525edffcc43c36d30127cabb995e4a6b989.zip
fix justfile
-rw-r--r--.gitignore2
-rw-r--r--justfile20
2 files changed, 12 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 6ed4c85..a02831a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-/main.s
+/main*.s
/p4dcc*
/tests/tmp
diff --git a/justfile b/justfile
index 12eeb46..6e51901 100644
--- a/justfile
+++ b/justfile
@@ -2,16 +2,18 @@ CFLAGS := "-Wno-builtin-declaration-mismatch"
all: build
-build:
- gcc -g -O0 -o p4dcc main.c {{CFLAGS}}
-
-build2: build
- ./p4dcc < main.c > main.s
- gcc -Wl,-z,noexecstack -o p4dcc2 main.s
+build N="1":
+ #!/usr/bin/env bash
+ if [[ {{N}} = 1 ]]; then
+ gcc -g -O0 -o p4dcc main.c {{CFLAGS}}
+ else
+ ./p4dcc < main.c > main{{N}}.s
+ gcc -Wl,-z,noexecstack -o p4dcc{{N}} main{{N}}.s
+ fi
-build3: build2
- ./p4dcc2 < main.c > main.s
- gcc -Wl,-z,noexecstack -o p4cc3 main.s
+build N: build
+ ./p4dcc < main.c > main{{N}}.s
+ gcc -Wl,-z,noexecstack -o p4dcc{{N}} main{{N}}.s
test TESTCASE="all" $BIN="p4dcc": build
#!/usr/bin/env bash