Subject: Re: How make(1) reacts on failing commands
To: Roland Illig <>
From: Todd Vierling <>
List: tech-pkg
Date: 11/17/2005 18:05:51
On Thu, 17 Nov 2005, Roland Illig wrote:

> The consequence of this change is that the _complete_ pkgsrc code must be
> audited for behavior that has changed with this change. The most prominent
> example is code like this:
>         @cd ${WRKDIR}; ${MAKE_PROGRAM} build
> This code has worked fine with the old make(1), even if the WRKDIR did not
> exist. Now it could fail, executing ${MAKE_PROGRAM} in the current directory
> instead of ${WRKDIR}.
> There are (at least) two ways to fix this:
> 1.  Replace the semicolons with &&.
>         @cd ${WRKDIR} && ${MAKE_PROGRAM} build

This is the (IMNSHO) correct one.  "set" should be avoided in user-written
makefile fragments, except for the use of "set -- ..." for the purposes of

-- Todd Vierling <> <> <>