make-alpha
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .ONESHELL enhancement?


From: David Boyce
Subject: Re: .ONESHELL enhancement?
Date: Wed, 23 Sep 2009 14:26:30 -0400

On Wed, Sep 23, 2009 at 1:57 PM, Paul Smith <address@hidden> wrote:
> It seems to me that we might be able to get close to this, with the
> following changes:
>
>     1. Add -e to the shell invocation by default if .POSIX is set.
>     2. Use the simple "pass the entire thing to the shell, unmodified"
>        version of the .ONESHELL implementation.
>
> After this, adding both .POSIX and .ONESHELL (could be easily done by
> setting a MAKEFILES environment variable to a file containing those
> targets, before invoking make) will get you very nearly what you are
> looking for, I think.

General agreement, I think, except for a few nits:

- How does this address the command-line issues? I.e. passing -e
automatically and setting SHELL to an arbitrary interpreter are
incompatible, given that -e has different meanings to different
interpreters. So it seems to me you will also need .SHELLFLAGS or
similar. Of course if you use a temp file you could prepend "set -e"
to it but that runs into the same problem.

- Can we assume that assigning to SHELL absolves us of the need to
follow POSIX? Because I think there's no way to guarantee (or even
define) "set -e" behavior with an arbitrary interpreter.

- The hack to remove address@hidden from interior recipe lines would have to be
contingent on SHELL not being reassigned. It could wreak havoc on a
Perl script, for instance.

- I thought I remembered that .POSIX disables certain useful
extensions, but I don't see any reference to that in the  manual for
3.81. Am I remembering wrong?

The number of permutations implied by .POSIX, .ONESHELL, SHELL, and
.SHELLFLAGS is worrisome. Perhaps certain combinations can be
disallowed or ignored?

DSB




reply via email to

[Prev in Thread] Current Thread [Next in Thread]