Merge branch 'build-fix' into 'master'
Simplify Makefile and remove debug. See merge request redox-os/relibc!506
This commit is contained in:
@@ -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 \
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
sys_includes = ["stddef.h", "stdint.h", "sys/types.h"]
|
||||
include_guard = "_RELIBC_UNISTD_H"
|
||||
trailer = "#include <bits/fcntl.h>\\n#include <bits/unistd.h>"
|
||||
trailer = """
|
||||
#include <bits/fcntl.h>
|
||||
#include <bits/unistd.h>
|
||||
"""
|
||||
language = "C"
|
||||
style = "Tag"
|
||||
no_includes = true
|
||||
|
||||
Reference in New Issue
Block a user