Peter Prymmer wrote:
Michael G Schwern <[EMAIL PROTECTED]> wrote on 09/19/2005 08:15:51 PM:
On Sun, Sep 18, 2005 at 11:52:20PM -0400, John E. Malmberg wrote:
As there is no "false" command on VMS, this is causing rerunning a make
to fail.
I see a number of uses of "false" in MM_Unix. Rather than throw in more
VMS exceptions (blech) I'll make a $(FALSE) which can be something safe
like
perl -e 'exit 1'
On VMS the construct shown is true since exit 1 is the way to say exit 0.
I note the following behavior from the shell on Solaris 10:
/home/user/pprymmer> false
/home/user/pprymmer> echo $?
255
Hence you may want to use something like 44 on VMS (noting that a message
will be generated):
$ perl -e "exit 44"
%SYSTEM-F-ABORT, abort
the non portability of exit values is discussed in perlport.pod.
A VMS exit 44 will also cause MMS/MMK by default to abort the makefile
with MMS/MMK also exiting with an error.
If you want a VMS exit code that UNIX programs should interpret as an
EXIT 1, then the following (mostly undocumented) hack will work.
VMS status code = %x35a000 + (UNIX status * 8), and if this is a success
status, add 1, otherwise VMS will interpret it as a warning.
EAGLE> exit %x35A000 + (1 * 8) + 1
EAGLE> x = %x35A000 + (1 * 8) + 1
EAGLE> show sym x
X = 3514377 Hex = 0035A009 Octal = 00015320011
As of blead-perl, Perl is now automatically translating this code to the
expected internal UNIXish status correctly.
I think I will have to look at perlport.pod to make sure it is current.
I suspect it is not.
-John
[EMAIL PROTECTED]
Personal Opinion Only