libk  Diff

Differences From Artifact [bca498cfb3]:

To Artifact [973646497d]:


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