o Allow use of the ${MAKE_SHELL} variable to specify alternate
authorMax Okumoto <okumoto@dragonflybsd.org>
Fri, 10 Dec 2004 01:03:46 +0000 (01:03 +0000)
committerMax Okumoto <okumoto@dragonflybsd.org>
Fri, 10 Dec 2004 01:03:46 +0000 (01:03 +0000)
commit899365c29093cb763b8588133880d8bc91e2db0d
tree01ad9ddd50121bd5b0c57d89f324415a72c2421e
parentb51843915f464fc965034785999146576be46cf2
o Allow use of the ${MAKE_SHELL} variable to specify alternate
  shells for make(1) to use.  Setting it to "sh" and "ksh" are the
  only values which work right ATM; I wouldn't expect "csh" to get
  you far ;)

o Include -DDEFSHELL=1 in Makefile.dist so people boostrapping will
  have a sane default.  And add DragonFly tag

o Add ability to use csh(1) as the make(1) shell.

o Expand the scope of the .SHELL specification to also cover the
  compat mode of operation and the != operator.

  While here, fixed a bug in the .SHELL directive processing when
  only the name= attribute is specified and no built-in shell matches
  this name, causing null pointer dereference.

o Fix a very long-standing error in handling .SHELL targets: this
  target uses the brk_string function to parse the line. That
  function uses static storage for both the expanded string and the
  returned argv[] vector.   The JobParseShell function simply stored
  away pointers into this static storage. On the next use of something
  like ${FOO:O} this storage would get overwritten with fatal
  results.

  This also allows us to make the shells[] array const bringing us
  one step further in making make WARNS=4 ready.

o Constify the array of predefined shells. It turns out that we
  need two versions of the structure definition for this: one with
  const char pointers, because otherwise gcc won't let us initialize
  the fields with constant strings, and one without the const,
  because we need to work with the structure.

Note: This patch is really a hack for a coping with slow /bin/sh.
      We are importing it to reduce the differences between us and
      the FreeBSD version.
usr.bin/make/Makefile
usr.bin/make/Makefile.dist
usr.bin/make/compat.c
usr.bin/make/config.h
usr.bin/make/job.c
usr.bin/make/job.h
usr.bin/make/main.c