Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-05-04 11:41:53 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-05-04 11:41:54 -0400
commitc271ee696e5c934082f39bc684c2bbda78177aca (patch)
tree94f2cf60341e9f086c22c64658af1db42713fdcc
parent70f9e9c277bd0d3d0db9e4eebfd31a02ae8c6fd1 (diff)
downloadtame-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.
-rwxr-xr-xbuild-aux/gen-make4
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
}