* lib/am/check.am (am__check_pre): Save some forks, by analyzing more
carefully the value of '$@' to decide how to extract its dirname part,
and whether that should be created as a directory.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
$(am__vpath_adj_setup) $(am__vpath_adj) \
$(am__tty_colors); \
srcdir=$(srcdir); export srcdir; \
-am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \
-test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
if test -f "./$$f"; then dir=./; \
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \