diff options
author | Mike Gerwitz <mike.gerwitz@rtspecialty.com> | 2018-05-04 11:41:53 -0400 |
---|---|---|
committer | Mike Gerwitz <mike.gerwitz@rtspecialty.com> | 2018-05-04 11:41:54 -0400 |
commit | c271ee696e5c934082f39bc684c2bbda78177aca (patch) | |
tree | 94f2cf60341e9f086c22c64658af1db42713fdcc /build-aux | |
parent | 70f9e9c277bd0d3d0db9e4eebfd31a02ae8c6fd1 (diff) | |
download | tame-c271ee696e5c934082f39bc684c2bbda78177aca.tar.gz tame-c271ee696e5c934082f39bc684c2bbda78177aca.tar.bz2 tame-c271ee696e5c934082f39bc684c2bbda78177aca.zip |
build-aux/gen-make: Recurse without dir change
Before this change, it was impossible for the initial paths provided to the
script to be more than one level deep (relative to the cwd).
* build-aux/gen-make: Handle multi-level children.
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/gen-make | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/build-aux/gen-make b/build-aux/gen-make index e004e6b..b7d0652 100755 --- a/build-aux/gen-make +++ b/build-aux/gen-make @@ -73,7 +73,7 @@ until [ $# -eq 0 ]; do ( path="${1%%/}" echo "[gen-make] scanning $path" >&2 - cd "$( basename $path )/" || exit $? + cd "$path" || exit $? deps=$( find -maxdepth 1 -iname '*.dep' ) for dpath in $deps; do @@ -103,7 +103,7 @@ until [ $# -eq 0 ]; do ( # recurse on every subdirectory for p in */; do [ "$p" == ./ -o "$p" == ../ ] && continue - [ ! -d "$p" ] || "$GEN_MAKE" "$path/$p" || { + [ ! -d "$p" ] || ( cd "$OLDPWD" && "$GEN_MAKE" "$path/$p" ) || { echo "fatal: failed to recurse on $( pwd )/$path/$p" >&2 exit 1 } |