diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-03-04 01:07:34 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-03-04 01:07:34 -0500 |
commit | 978a32cec48ee55ed3717d2de4d78184755edbdf (patch) | |
tree | e26a3fc3215ea76eb997cd9fe23a844b77f24584 /configure | |
parent | 4f5ce5854f478cfa38024b74d9c2849b794e979e (diff) |
fix mistakes
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -25,11 +25,17 @@ error() { exit 1 } -edit=(sed -E -e '') +topsrcdir=$(realpath -ms --relative-to=. -- "$srcdir") +if [ "$topsrcdir" = . ]; then + topsrcdir= +else + topsrcdir=/$topsrcdir +fi + +edit=(sed -E -e "s|^topsrcdir := .*|&$topsrcdir|") setvar() { edit+=(-e "s@^(\s*$1\s*:?=).*@\1 $2@") } -setvar topsrcdir "$srcdir" vars=($(<"$srcdir/config.mk.in" sed -n 's/^\([ a-z_-]*\)=.*/\1/p')) @@ -53,11 +59,11 @@ done "${edit[@]}" < "$srcdir/config.mk.in" > "$outdir/config.mk" -Makefiles=($(find "$srcdir/" -name 'Makefile') "$srcdir"/*.mk "$srcdir"/modules/module.mk "$srcdir"/modules/*/Makefile.inc.mk) +Makefiles=($(find "$srcdir/" -name 'Makefile') "$srcdir"/modules/module.mk "$srcdir"/modules/*/Makefile.inc.mk) for src in "${Makefiles[@]}"; do out="$outdir/${src#$srcdir/}" mkdir -p -- $(dirname -- "$out") if ! test "$src" -ef "$out"; then - cp -fTv -- "$src" "$out" + cp -fT -- "$src" "$out" fi done |