Sources + Header Build
Added Source pulling via curl.
This commit is contained in:
parent
6110995cfb
commit
bf93e7d6c5
7 changed files with 94 additions and 3 deletions
12
scripts/check.sh
Executable file
12
scripts/check.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#/bin/sh
|
||||
|
||||
while IFS= read -r url; do \
|
||||
[ -z "$url" ] && continue; \
|
||||
fname="$(printf '%s' "$url" | sed -E 's/[?#].*$//' | sed -E 's!.*/!!')"; \
|
||||
if [ -e "$(OUTDIR)/$fname" ]; then \
|
||||
printf "SKIP: %s (already exists)\n" "$fname"; \
|
||||
else \
|
||||
printf "GET: %s -> %s\n" "$url" "$fname"; \
|
||||
curl -o "./sources/$fname" "$url" || { printf "ERROR: failed to download %s\n" "$url"; exit 1; }; \
|
||||
fi; \
|
||||
done < ${SOURCES_FILE}; \
|
||||
27
scripts/headers.sh
Executable file
27
scripts/headers.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#/bin/sh
|
||||
|
||||
ARCH=$(uname -m)
|
||||
FROOT="${ARCH}-musllvm"
|
||||
LINUX_TAR=$(printf '%s' "$url" | sed -E 's/[?#].*$//' | sed -E 's!.*/!!' | grep -i linux)
|
||||
LINUX_SOURCE="${LINUX_TAR%%.tar*}"
|
||||
|
||||
if command -v "clang" >/dev/null 2>&1 && command -v "lld" >/dev/null 2>&1; then
|
||||
export LLVM=1
|
||||
export LLVM=IAS
|
||||
fi
|
||||
|
||||
tar -xpf ./sources/${LINUX_TAR} ./build
|
||||
|
||||
mkdir -pv ./build/${FROOT}/include
|
||||
|
||||
echo "Building Headers"
|
||||
pushd ./build/${LINUX_SOURCE}
|
||||
|
||||
make mrproper
|
||||
make headers
|
||||
find usr/include \( -name .install -o -name ..install.cmd \) -exec rm -vf {} \;
|
||||
cp -rv usr/include/* ../${FROOT}/include/
|
||||
rm -v ../${FROOT}/include/Makefile
|
||||
|
||||
popd
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue