From 3c50e6cf145ef8e9d661a80d40e85bceefca7dfa Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 24 Apr 2024 23:38:14 -0400 Subject: build: Export some sys/*.h headers Signed-off-by: Ian Moffett --- tools/sysexport | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 tools/sysexport (limited to 'tools') diff --git a/tools/sysexport b/tools/sysexport new file mode 100755 index 0000000..8426e8d --- /dev/null +++ b/tools/sysexport @@ -0,0 +1,32 @@ +#!/bin/bash +# +# To be ran during the build process to export +# system headers +# + +TARGET_DIR=lib/libc/include/sys +SYS_DIR=../../../../sys/include/sys + +if [ -f $TARGET_DIR/.sys_export ] +then + exit 0 +fi + +. builddeps/sysexports + +echo "Exporting sys headers..." +cd $TARGET_DIR + +for i in $sys_headers +do + if [ -s "$i" ] + then + echo "HEADER CONFLICT ($TARGET_DIR/$i)" + continue + fi + + echo "sys/include/sys/$i -> lib/libc/include/sys/$i" + echo include/sys/$i >>.sys_export + echo "$i" >>.gitignore + ln -sf $SYS_DIR/$i . +done -- cgit v1.2.3