Implement AUTOMAKE=recursive

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep
2018-03-03 13:48:20 -08:00
parent 02ed6f26a9
commit e08e239c00
3 changed files with 28 additions and 10 deletions

View File

@ -290,6 +290,9 @@ get_config() {
;;
[1-9][0-9])
;;
[Rr]ecursive)
AUTOMAKE=recursive
;;
*)
if [ -n "$AUTOMAKE" ]; then
fatal_error "Invalid AUTOMAKE setting ($AUTOMAKE)"
@ -402,7 +405,15 @@ uptodate() {
#
# Busybox 'find' doesn't support -quit.
#
if [ -n "$(${find} ${dir} -maxdepth $AUTOMAKE -type f -newer $1 -print)" ]; then
if [ $AUTOMAKE = recursive ]; then
if [ -n "$(${find} ${dir} -newer $1 -print)" ]; then
return 1;
fi
elif [ -n "$(${find} ${dir} -maxdepth $AUTOMAKE -type f -newer $1 -print)" ]; then
return 1;
fi
elif [ $AUTOMAKE = recursive ]; then
if [ -n "$(${find} ${dir} -newer $1 -print -quit)" ]; then
return 1;
fi
elif [ -n "$(${find} ${dir} -maxdepth $AUTOMAKE -type f -newer $1 -print -quit)" ]; then