If I check out gnulib at e190c6630d13363e72ec421e4734ae255c70fbc5 and run ...
./gnulib-tool --create-testdir --dir=/tmp/testdir456 sys_stat cd /tmp/testdir456 ./configure make I get this result :- $ make make all-recursive make[1]: Entering directory `/tmp/testdir456' Making all in gllib make[2]: Entering directory `/tmp/testdir456/gllib' rm -f arg-nonnull.h-t arg-nonnull.h && \ sed -n -e '/GL_ARG_NONNULL/,$p' \ < ../build-aux/arg-nonnull.h \ > arg-nonnull.h-t && \ mv arg-nonnull.h-t arg-nonnull.h rm -f warn-on-use.h-t warn-on-use.h && \ sed -n -e '/^.ifndef/,$p' \ < ../build-aux/warn-on-use.h \ > warn-on-use.h-t && \ mv warn-on-use.h-t warn-on-use.h sys make[2]: sys: Command not found make[2]: *** [sys/stat.h] Error 127 make[2]: Leaving directory `/tmp/testdir456/gllib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/testdir456' make: *** [all] Error 2 The problem is that $(MKDIR_P) is not set in the Makefile: $ find /tmp/testdir456 -name Makefile | xargs grep MKDIR_P /tmp/testdir456/gllib/Makefile: $(AM_V_at)$(MKDIR_P) sys Nevertheless, configure is setting it: $ grep -n MKDIR_P /tmp/testdir456/config.status 347:MKDIR_P='/bin/mkdir -p' 920: ac_MKDIR_P=$MKDIR_P 921: case $MKDIR_P in 923: */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; 972:s&@MKDIR_P@&$ac_MKDIR_P&;t t However, the $(MKDIR_P) macro is being used but not set in the Makefile: $ find /tmp/testdir456 \( -name Makefile -o -name Makefile.in -o -name Makefile.am \) -print0 | xargs -0r grep -n MKDIR_P /dev/null /tmp/testdir456/gllib/Makefile.in:742: $(AM_V_at)$(MKDIR_P) sys /tmp/testdir456/gllib/Makefile.am:92: $(AM_V_at)$(MKDIR_P) sys /tmp/testdir456/gllib/Makefile:742: $(AM_V_at)$(MKDIR_P) sys I can't immediately see a problem with gnulib's sys_stat module, but on the other hand I hesitate to allege a bug in autoconf-2.61. Reading /usr/share/autoconf/autoconf/programs.m4 though I cannot see a call to AC_SUBST for MKDIR_P. Has it simply been omitted? $ for p in automake autoconf ; do $p --version; done automake (GNU automake) 1.9.6 Written by Tom Tromey <tro...@redhat.com>. Copyright 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. Thanks, James.