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.master
parent
70f9e9c277
commit
c271ee696e
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue