libk  Diff

Differences From Artifact [e3ee508d22]:

To Artifact [bca498cfb3]:


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
32
33
34
35
#!/usr/bin/env bash
source global/common.sh

# TODO: provide "modular" install option to avoid the traditional
# linux directory hierarchy on systems where this doesn't make sense.

check "prefix" "a directory to install to"
build="${build:-out}"

bindir="${bindir:-$prefix/bin}"
libdir="${libdir:-$prefix/lib}"

if test "$prefix" = "/" -o "$fakeroot" = yes; then
	say "installing docs and headers into usr instad of /"
	sharedir="${sharedir:-$prefix/usr/share}"
	incdir="${incdir:-$prefix/usr/include}"
else
	incdir="${incdir:-$prefix/include}"
	sharedir="${sharedir:-$prefix/share}"
fi

say "commencing install"
say " - prefix: $prefix"
say " - destinations:"
say "   * binaries: $bindir"
say "   * libraries: $libdir"
say "   * headers: $incdir"
say "   * shared files: $sharedir"

mkdir -p "$bindir" "$libdir" "$incdir" "$sharedir"

# Libraries
# These may or may not exist, depending on what library build is done, so check
say "installing libraries"
test -e "$build/libk.a"  && install -Dm644 -t "$libdir" "$build/libk.a"






|




<
<
<
<
<
<
|
|
<




|
|
|
|







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
#!/usr/bin/env bash
source global/common.sh

# TODO: provide "modular" install option to avoid the traditional
# linux directory hierarchy on systems where this doesn't make sense.

check prefix 'a directory to install to'
build="${build:-out}"

bindir="${bindir:-$prefix/bin}"
libdir="${libdir:-$prefix/lib}"






incdir="${incdir:-$prefix/include}"
sharedir="${sharedir:-$prefix/share}"


say "commencing install"
say " - prefix: $prefix"
say " - destinations:"
say "   - binaries $bindir"
say "   - libraries $libdir"
say "   - headers $incdir"
say "   - shared files $sharedir"

mkdir -p "$bindir" "$libdir" "$incdir" "$sharedir"

# Libraries
# These may or may not exist, depending on what library build is done, so check
say "installing libraries"
test -e "$build/libk.a"  && install -Dm644 -t "$libdir" "$build/libk.a"