forked from NuxiNL/cloudlibc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·31 lines (26 loc) · 1.04 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
set -e
: ${PREFIX:=/usr/local/x86_64-unknown-cloudabi}
echo "=> Installing headers"
(cd src/include; find . -type d \! -empty) | while read dir; do
mkdir -p "${DESTDIR}${PREFIX}/include/${dir}"
done
(cd src/include; find . -type f) | while read file; do
install -m 444 "src/include/${file}" "${DESTDIR}${PREFIX}/include/${file}"
done
install -m 444 contrib/argdata-0.5/src/argdata.h \
"${DESTDIR}${PREFIX}/include/"
mkdir -p "${DESTDIR}${PREFIX}/include/jemalloc"
install -m 444 contrib/jemalloc-4.5.0/include/jemalloc/jemalloc.h \
"${DESTDIR}${PREFIX}/include/jemalloc/jemalloc.h"
echo "=> Installing libraries"
mkdir -p "${DESTDIR}${PREFIX}/lib"
install -m 444 _obj/libargdata.a _obj/libc.a _obj/libm.a _obj/libpthread.a \
_obj/librt.a _obj/libuv.a _obj/libxnet.a \
_obj/crt0.o _obj/crt1.o _obj/crtbegin.o _obj/crtend.o \
"${DESTDIR}${PREFIX}/lib/"
if [ "$1" != "notests" ]; then
echo "=> Installing unit tests"
mkdir -p "${DESTDIR}${PREFIX}/bin"
install -m 555 _obj/cloudlibc-unittests "${DESTDIR}${PREFIX}/bin/"
fi