5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# 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 "installing binaries"
# *.testbin files should not be installed
install -Dm755 -t "$bindir" "$build/kgraft.attach"
# Includes
say "installing headers"
for inc in "$build"/k/*; do
install -Dm644 -t "$incdir/k" "$inc"
done
# Documentation
say "installing documentation"
for man in "$build"/doc/man/*; do
install -Dm644 -t "$sharedir/man" "$man"
done
for html in "$build"/doc/html/*; do
install -Dm644 -t "$sharedir/doc/libk/html" "$html"
done
for pdf in "$build"/doc/pdf/*; do
install -Dm644 -t "$sharedir/doc/libk/pdf" "$pdf"
done
say "install complete"
|
|
>
|
>
>
>
>
>
>
>
>
>
>
|
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# 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/k}"
sharedir="${sharedir:-$prefix/share}"
shebang="${shebang:-#!/usr/bin/env bash}"
say "commencing install"
say " - prefix: $prefix"
say " - destinations:"
say " - binaries → $bindir"
say " - libraries → $libdir"
say " - headers → $incdir"
................................................................................
say "installing binaries"
# *.testbin files should not be installed
install -Dm755 -t "$bindir" "$build/kgraft.attach"
# Includes
say "installing headers"
for inc in "$build"/k/*; do
install -Dm644 -t "$incdir" "$inc"
done
# Documentation
say "installing documentation"
for man in "$build"/doc/man/*; do
install -Dm644 -t "$sharedir/man" "$man"
done
for html in "$build"/doc/html/*; do
install -Dm644 -t "$sharedir/doc/libk/html" "$html"
done
for pdf in "$build"/doc/pdf/*; do
install -Dm644 -t "$sharedir/doc/libk/pdf" "$pdf"
done
say "building libk-config utility"
m4 >"$bindir/libk-config" \
-D"_libk_bindir_=$bindir" -D"_libk_libdir_=$libdir" \
-D"_libk_incdir_=$incdir" -D"_libk_sharedir_=$sharedir" \
-D"_libk_shebang_=$shebang" \
global/cc-invoke.m4
chmod +x "$bindir/libk-config"
say "install complete"
|