libk  Check-in [6346f60bb6]

Overview
Comment:Make install.sh actually try to install. Just a first pass at the problem for now, but it seems to work fine finally with some quick testing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | install
Files: files | file ages | folders
SHA3-256: 6346f60bb62d68952a2b649c39fb39542479e2d108051330e29746c6af56f5a6
User & Date: glowpelt on 2020-01-23 07:10:00
Other Links: branch diff | manifest | tags
Context
2020-01-24
21:18
Remove the $to check entirely and have more output in install.sh Sourcing a file doesn't need it to be executable, so global/common.sh can have it's executable bit removed and the $to check in it entirely removed. Adds some `say`s to install.sh to let you know it did something and help in case of error. Closed-Leaf check-in: 50b709b0d3 user: glowpelt tags: install
2020-01-23
07:10
Make install.sh actually try to install. Just a first pass at the problem for now, but it seems to work fine finally with some quick testing. check-in: 6346f60bb6 user: glowpelt tags: install
2020-01-19
04:12
Partially fix shared library build by making sure that data_objects are linked in. This means that internal.ident.o is properly linked in, but internal.ident.o itself still references undefined symbols, so this is only a partial fix. check-in: 0d71b71cc8 user: glowpelt tags: trunk
Changes

Modified global/common.sh from [582c735deb] to [0a6c6a9052].

     4      4   check() {
     5      5   	var=$1
     6      6   	test "${!var}" == "" || return 0
     7      7   	say "we were not able to detect a default value for the configuration variable \$$var. please set this variable to $2 and try again."
     8      8   	exit 1
     9      9   }
    10     10   
    11         -test "$to" = "" && {
    12         -	say "\$to environment variable must be set to your build directory - are you running this script by hand? run ./build.sh in the root directory instead!"
    13         -	exit 2
    14         -}
           11  +#test "$to" = "" && {
           12  +#	say "\$to environment variable must be set to your build directory - are you running this script by hand? run ./build.sh in the root directory instead!"
           13  +#	exit 2
           14  +#}
    15     15   
    16     16   reqpack() {
    17     17   	if ! has "$1"; then
    18     18   		say "to $2 for libk, install the $1 package and try again"
    19     19   		exit 3
    20     20   	fi
    21     21   }

Modified install.sh from [b7dc8d033f] to [ca0001a46e].

     1      1   #!/usr/bin/env bash
     2      2   source global/common.sh
     3      3   
     4         -say "this component of the build system does not yet exist"
            4  +check "prefix" "a directory to install to"
            5  +build="${build:-out}"
            6  +
            7  +bindir="$prefix/bin"
            8  +libdir="$prefix/lib"
            9  +
           10  +if [ "$prefix" = "/" ]; then
           11  +	say "installing docs and headers into usr instad of /"
           12  +	sharedir="$prefix/usr/share"
           13  +	incdir="$prefix/usr/include"
           14  +else
           15  +	incdir="$prefix/include"
           16  +	sharedir="$prefix/share"
           17  +fi
           18  +
           19  +# Libraries
           20  +# These may or may not exist, depending on what library build is done, so check
           21  +[ -e "$build/libk.a" ] && install -Dm644 -t "$libdir" "$build/libk.a"
           22  +[ -e "$build/libk.so" ] && install -Dm644 -t "$libdir" "$build/libk.so"
           23  +[ -e "$build/boot.o" ] && install -Dm644 -t "$libdir/libk" "$build/boot.o"
           24  +
           25  +# Binaries
           26  +install -Dm755 -t "$bindir" "$build/kcore.testbin"
           27  +install -Dm755 -t "$bindir" "$build/kcli.testbin"
           28  +install -Dm755 -t "$bindir" "$build/kgraft.attach"
           29  +
           30  +# Includes
           31  +for inc in "$build"/k/*; do
           32  +	install -Dm644 -t "$incdir/k" "$inc"
           33  +done
           34  +
           35  +# Documentation
           36  +for man in "$build"/doc/man/*; do
           37  +	install -Dm644 -t "$sharedir/man" "$man"
           38  +done
           39  +for html in "$build"/doc/html/*; do
           40  +	install -Dm644 -t "$sharedir/doc/libk/html" "$html"
           41  +done
           42  +for pdf in "$build"/doc/pdf/*; do
           43  +	install -Dm644 -t "$sharedir/doc/libk/pdf" "$pdf"
           44  +done