small configure correctness patch

2009-07-29 Thread Ralf Wildenhues

BTW, I noticed in my make tree this patch that has not made it into
upstream yet:
Maybe you could take a peek at it?

Other than that, here is a small patch to fix a configure glitch:
with AC_CACHE_VAL, the third argument should contain code that sets the
cache variable, but not have any other side-effects.  The reason for
this is that, with a './config.status --recheck' (that may be triggered
by make), the cached values from config.cache (if enabled) may cause
these commands to be by-passed.  The fix is to move side-effects after
the check, and key them off the cache variable, as below.
(Newer autoconfs warn about this issue.)

The move to put the AC_SUBSTs outside of any conditional code is not
needed for correctness, merely done for clarity: the substitution is
done in any case anyway.


2009-07-29  Ralf Wildenhues

* Move side-effects outside AC_CACHE_VAL arguments
that set make_cv_sys_gnu_glob, so they are also correctly set
when the cache has been populated before.

RCS file: /cvsroot/make/make/,v
retrieving revision 1.150
diff -u -r1.150
--- configure.in4 Jun 2009 06:30:27 -   1.150
+++ configure.in29 Jul 2009 18:01:13 -
@@ -364,9 +365,13 @@
  ], [AC_MSG_RESULT(yes)
 make_cv_sys_gnu_glob=yes], [AC_MSG_RESULT([no; using local copy])
-AC_SUBST(GLOBINC) GLOBINC='-I$(srcdir)/glob'
+if test $make_cv_sys_gnu_glob = no; then
+  GLOBINC='-I$(srcdir)/glob'
+  GLOBLIB=glob/libglob.a
 # Tell automake about this, so it can build the right .c files.
 AM_CONDITIONAL(USE_LOCAL_GLOB, test $make_cv_sys_gnu_glob = no)

Bug-make mailing list

ulimit and unset are unixy sh internals

2009-07-29 Thread Ralf Wildenhues
I just happened to debug a makefile by adding a 'ulimit -a' command to a
recipe, and was surprised to see it fail.  :-)

So I went through the list of builtins from other shells in job.c and
came up with this patch that I think you need for a bit more safety on
unixy shells.

Thanks for maintaining GNU make,

2009-07-29  Ralf Wildenhues

* job.c (construct_command_argv_internal): Add ulimit and
unset to the sh_cmds for Unixy shells.

Index: job.c
RCS file: /cvsroot/make/make/job.c,v
retrieving revision 1.193
diff -u -r1.193 job.c
--- job.c   9 Jun 2009 15:35:38 -   1.193
+++ job.c   29 Jul 2009 18:06:38 -
@@ -2327,7 +2327,7 @@
  eval, exec, exit, export, for, if,
  login, logout, read, readonly, set,
  shift, switch, test, times, trap,
- umask, wait, while, 0 };
+ ulimit, umask, unset, wait, while, 0 };
   /* This is required if the MSYS/Cygwin ports (which do not define
  WINDOWS32) are compiled with HAVE_DOS_PATHS defined, which uses

Bug-make mailing list

Re: ulimit and unset are unixy sh internals

2009-07-29 Thread Paul Smith
On Wed, 2009-07-29 at 20:09 +0200, Ralf Wildenhues wrote:
 Thanks for maintaining GNU make,

Thanks for these Ralf.  I'll get them in.

Bug-make mailing list