Simplify Makefile and remove debug.

This commit is contained in:
4lDO2
2024-09-12 11:43:52 +02:00
parent a9f05d3c3c
commit d0b02a3fb7
+2 -9
View File
@@ -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 \