remove remove foobar
C Tests / Build and Test (push) Successful in 11m4s

This commit is contained in:
2026-09-24 20:49:50 +02:00
parent ead04f9c08
commit 27c5c4a55b
+17 -40
View File
@@ -1,40 +1,5 @@
CC := "zig cc"
CFLAGS := "-pedantic -Wall -Wextra -Wno-override-init -O0 -g -fno-omit-frame-pointer -fno-inline"
LDFLAGS := if os() == "macos" {
"$(pkg-config --libs --cflags criterion)"
} else {
"-lcriterion"
}
TMP := "/tmp"
TESTBIN := TMP/"all_tests"
set shell := ["bash", "-cu"] set shell := ["bash", "-cu"]
FOOBAR := "foobar"
FOOBAR_SOURCE := FOOBAR+".c"
FOOBAR_BIN := TMP/FOOBAR
FOOBAR_EXPANDED := TMP/FOOBAR+"-expanded.c"
build_foobar2:
{{CC}} {{FOOBAR_SOURCE}} {{CFLAGS}} -o foobar2
run_foobar: build_foobar
{{FOOBAR_BIN}}
build_foobar: foobar_expanded
{{CC}} {{FOOBAR_EXPANDED}} {{CFLAGS}} -o {{FOOBAR_BIN}}
echo "{{FOOBAR_BIN}}"
foobar_expanded:
{{CC}} -P -E {{FOOBAR_SOURCE}} -o {{FOOBAR_EXPANDED}}
clang-format -i {{FOOBAR_EXPANDED}}
clean_foobar:
rm {{FOOBAR_BIN}}
[default] [default]
test: build test: build
{{TESTBIN}} {{TESTBIN}}
@@ -49,12 +14,24 @@ test_memcheck: build
build: build:
find . -type f -name 'test*.c' | xargs -r {{CC}} {{CFLAGS}} {{LDFLAGS}} _allocator_impl.c -o {{TESTBIN}} find . -type f -name 'test*.c' | xargs -r {{CC}} {{CFLAGS}} {{LDFLAGS}} _allocator_impl.c -o {{TESTBIN}}
tag:
@echo "Making tags from project and headers in {{DEPENDENCY_HEADERS}}"
ctags --languages=c --langmap=c:.c.h -R {{DEPENDENCY_HEADERS}} .
CC := "zig cc"
CFLAGS := "-pedantic -Wall -Wextra -Wno-override-init -O0 -g -fno-omit-frame-pointer -fno-inline"
TMP := "/tmp"
TESTBIN := TMP/"all_tests"
LDFLAGS := if os() == "macos" {
"$(pkg-config --libs --cflags criterion)"
} else if os() == "linux" {
"-lcriterion"
} else {
"TODO: windows"
}
DEPENDENCY_HEADERS := if os() == "macos" { DEPENDENCY_HEADERS := if os() == "macos" {
"$(pkg-config --cflags-only-I criterion | sed 's/-I//g')" "$(pkg-config --cflags-only-I criterion | sed 's/-I//g')"
} else { } else {
"TODO" "TODO: windows"
} }
tag:
echo "Making tags from project and headers in {{DEPENDENCY_HEADERS}}"
ctags --languages=c --langmap=c:.c.h -R {{DEPENDENCY_HEADERS}} .