From d0b02a3fb79569c01a6ad10b11ab6f3a67adf169 Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Thu, 12 Sep 2024 11:43:52 +0200 Subject: [PATCH] Simplify Makefile and remove debug. --- Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 228389a196..9af3f42af4 100644 --- a/Makefile +++ b/Makefile @@ -61,21 +61,14 @@ BUILTINS_VERSION=0.1.70 all: | headers libs +# TODO: can sed be removed now that cbindgen iirc supports varargs? headers: $(HEADERS_DEPS) - globdefs="$$(cat cbindgen.globdefs.toml)"; \ for header in $(HEADERS_UNPARSED); do \ echo "Header $$header"; \ if test -f "src/header/$$header/cbindgen.toml"; then \ out=`echo "$$header" | sed 's/_/\//g'`; \ out="$(TARGET_HEADERS)/$$out.h"; \ - header_path="src/header/$$header/cbindgen.toml"; \ - if ( grep -F '[defines]' "$$header_path" >/dev/null ); then \ - config=$$(cat "$$header_path" | sed "s/\[defines\]/$$globdefs/"); \ - else \ - config=$$(cat "$$header_path" cbindgen.globdefs.toml); \ - fi; \ - echo "$$config" \ - | tee "/tmp/a$$header.log" \ + cat "src/header/$$header/cbindgen.toml" cbindgen.globdefs.toml \ | cbindgen "src/header/$$header/mod.rs" --config=/dev/stdin --output "$$out"; \ sed -i "s/va_list __valist/.../g" "$$out"; \ fi \