diff --git a/lib/maker/src-subdir-mgt.sh b/lib/maker/src-subdir-mgt.sh index c6d6396a8a4..30d91290ce7 100644 --- a/lib/maker/src-subdir-mgt.sh +++ b/lib/maker/src-subdir-mgt.sh @@ -5,7 +5,9 @@ function adjustproglangsubdirs() { local d=$1 local pl=$2 - test -d "$d"/"$pl" && $CP -p "$d"/"$pl"/* "$d" + if test -d "$d"/"$pl"; then + (find "$d"/"$pl" -maxdepth 0 -empty|grep -q .) || $CP -p "$d"/"$pl"/* "$d" + fi if test "$pl" != pyret -a "$pl" != none; then local lang