source: mainline/install.sh@ 2fff3c4

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 2fff3c4 was 5fd05862, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 6 years ago

Convert uspace to meson

  • Property mode set to 100755
File size: 1.7 KB
Line 
1#!/bin/sh
2
3export CONFIG_DEVEL_FILES=$1
4
5(
6 # Install generated map files into the 'debug' subdirectory.
7
8 echo "######## Installing library map files ########"
9
10 # TODO: add configuration option to install debug files
11
12 if false; then
13 cd ${MESON_BUILD_ROOT}/uspace
14 find -name '*.map' -a -path './lib/*' | sed 's:^\./::' | xargs --verbose -I'@' install -C -D -m644 -T '@' "${MESON_INSTALL_DESTDIR_PREFIX}debug/"'@'
15 fi
16
17 # Install library headers that are mixed in with source files (no separate 'include' subdir).
18 # The properly separated headers are installed by the meson script.
19
20 # TODO We don't currently install them all due to image size issues
21 installed_libs="lib/c lib/gui lib/draw lib/softrend"
22
23 if $CONFIG_DEVEL_FILES; then
24 echo "######## Installing headers ########"
25 cd ${MESON_SOURCE_ROOT}/uspace
26
27 incdir="${MESON_INSTALL_DESTDIR_PREFIX}include"
28
29 for libdir in ${installed_libs}; do
30 if [ -d ${libdir} -a ! -d ${libdir}/include ]; then
31 find ${libdir} -maxdepth 1 -name '*.h' -a '!' -path ${libdir}'/doc/*' | sed 's:^lib/::' | xargs --verbose -I'@' install -C -D -m644 -T 'lib/@' ${incdir}'/lib@'
32 fi
33 done
34 fi
35
36 # Due to certain quirks of our build, executables need to be built with a different name than what they are installed with.
37 # Meson doesn't support renaming installed files (at least not as of mid-2019) so we do it here manually.
38
39 echo "######## Installing executables ########"
40
41 cd ${MESON_BUILD_ROOT}/uspace
42
43 find -name 'install@*' |
44 sed -e 'h; s:^.*/install@:@DESTDIR@:; s:\$:/:g; x; G; s:\s: :g' -e "s:@DESTDIR@:${MESON_INSTALL_DESTDIR_PREFIX}:g" |
45 xargs -L1 --verbose install -C -D -m755 -T
46
47) > ${MESON_BUILD_ROOT}/install_custom.log 2>&1
Note: See TracBrowser for help on using the repository browser.