Craig A. Berry wrote:
On Fri, Nov 14, 2008 at 8:39 AM, John E. Malmberg <[EMAIL PROTECTED]> wrote:

Now about MM_VMS, based on previous e-mail discussions, these routines exist
because VMS PERL by default does not map the %ENV hash to DCL shell symbols.

They exist because WriteMakefile and its children split and recombine
path components all over the place and some of those components are
macros.  That generally works on Unix because there is no special
directory syntax: if $(FOO) expands to 'bar', copying your files to
/usr/local/$(FOO) works just fine.  But on VMS, you can't pass a macro
to catdir and get reasonable results unless catdir expands the macro
first.  Otherwise, you'd be doing things like copying your files to
perl_root:[000000.$(FOO)] which would expand to
perl_root:[000000.[.bar]] and give you a syntax error.

That makes sense.

If those specific $ENV values put in the makefile where exported using the
DCLsym module in the format MMK/MMS could use, then MM_VMS would not need to
be eliminating the macros.

As far as I know, MMK and MMS map logical names, not DCL symbols, to macros.

Nope, DCL symbols, not logical names.

This test was done on Eisner::

$ type test.mms

sys$login:bar$(test).tmp : sys$login:foo.tmp
   $ write sys$output "process target bar$(test).tmp"
   $ open/write xx  bar$(test).tmp
   $ close xx

sys$login:foo.tmp :
   $ write sys$output "process target foo.tmp"
   $ open/write xx foo.tmp
   $ close xx

$ show sym test
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
$ test = "_override"
$ mmk/descrip = test.mms/log/verify
%MMK-I-OPENDESC, reading description file EISNER$DRA3:[DECUSERVE_MODERATOR.MALMB
ERG]TEST.MMS;10
%MMK-I-CHECKUPD, checking need to update target SYS$LOGIN:BAR_OVERRIDE.TMP
%MMK-I-TRGLKUF, lookup for target SYS$LOGIN:BAR_OVERRIDE.TMP failed - update required
-RMS-E-FNF, file not found
%MMK-I-CHECKUPD, checking need to update target SYS$LOGIN:FOO.TMP
%MMK-I-TRGRDT, target SYS$LOGIN:FOO.TMP revision date is 14-NOV-2008 11:59:55.40 %MMK-I-TRGNUPD, target SYS$LOGIN:BAR_OVERRIDE.TMP is out of date - update requir
ed
%MMK-I-PERFUPD, performing actions to update SYS$LOGIN:BAR_OVERRIDE.TMP
$ write sys$output "process target bar_override.tmp"
process target bar_override.tmp
$ open/write xx  bar_override.tmp
$ close xx
$ del/sym test
$ define test logical
$ mmk/descrip = test.mms/log/verify
%MMK-I-OPENDESC, reading description file EISNER$DRA3:[DECUSERVE_MODERATOR.MALMB
ERG]TEST.MMS;10
%MMK-I-CHECKUPD, checking need to update target SYS$LOGIN:BAR.TMP
%MMK-I-TRGRDT, target SYS$LOGIN:BAR.TMP revision date is 14-NOV-2008 11:59:55.41
%MMK-I-CHECKUPD, checking need to update target SYS$LOGIN:FOO.TMP
%MMK-I-TRGRDT, target SYS$LOGIN:FOO.TMP revision date is 14-NOV-2008 11:59:55.40 %MMK-I-SRCRDT, source SYS$LOGIN:FOO.TMP revision date is 14-NOV-2008 11:59:55.40
%MMK-S-NOUPDATE, target SYS$LOGIN:BAR.TMP is up-to-date
$

Now with the macros elimninated on VMS, the resulting makefile can be run
outside of the script that generated it, and it will still work.

But if it were changed to have the environment variables set by perl, then
the resulting makefile would probably only be runnable by the script that
generated it, because that is also what set the environment variables.  But
that should also be the case with UNIX.

Or am I missing something here?

I'm not quite following what you are proposing.  I think I did
something for macro propagation in Module::Build's compatibility mode,
which might be worth a look.

Also, MMK/MMS should be able to use UNIX filename syntax, as long as every
file reference is in UNIX format.  That should be able to simplify  the work
in getting mm_vms to support the extended character set mode.

Er, assuming major rewrites of MMK and/or MMS to handle Unix syntax
filenames, which they currently don't handle at all.

My mistake. I thought I had tested MMK and MMS with UNIX format names. I just tried again, and got syntax errors for my trouble.

-John
[EMAIL PROTECTED]
Personal Opinion Only

Reply via email to