[Info-vax] Native compilers
Johnny Billquist
bqt at softjar.se
Thu Feb 24 11:09:16 EST 2022
On 2022-02-24 13:33, VAXman- at SendSpamHere.ORG wrote:
> In article <sv7on8$ljq$1 at news.misty.com>, Johnny Billquist <bqt at softjar.se> writes:
>> They have different uses, and are not interchangeable.
>> I certainly like the macro libraries, but they cannot be used for things
>> like some prefix file you want to add to the compilation. Which is why
>> ..include is also good. Of course, you can also do this on the command
>> line, which is what I believe John Reagan was hinting at.
>>
>> But I find it a bit annoying to have to remember to throw those things
>> in on the command line, so when possible, I use .include instead.
>>
>> Typical things are stuff like you have some configuration step that
>> based on your choices creates a prefix file with various symbols
>> defined. Which is then included in with the compilation, and the source
>> have various conditional parts that are included or not (or modified)
>> based on what's in the prefix file.
>
> VMS provides a file for multiple target (VAX, Alpha, Itanium and I would
> assume for the X86 too) that defines various conditional symbols for the
> different architectures.
Sounds like a perfect thing to have in a prefix file...
> In my DESCRIP.MMS file, I create a library (SYS$LIBRARY:ARCH.MLB) and I
> then sandwich the contents of SYS$LIBRARY:ARCH_DEFS.MAR inside of .MACRO
> and .ENDM directive and insert that in the ARCH.MLB. Then, my code can
> incorporate this with:
>
> .LIBRARY "SYS$LIBRARY:ARCH.MLB"
> .ARCH_DEFS
Right. This works. But do you think it looks better than just having the
prefix file kept simple (without defining things inside a macro),
managing the library file, and then invoking the macro in the code to
get things set, rather than just including the prefix file?
>> You could, of course, create a macro out of the whole thing, and put
>> that in a library, and then the source refers to that created library,
>> invokes the known macro that defines all the choices made, and then you
>> are good. But that seems like a very complicated way of doing things here...
>
> MMS makes this virtually effortless, IMNSHO. If you can edit your source
> to add a ".INCLUDE", you can edit it to callout a macro.
Yeah. And I can also do:
$ MAC PREFIX+FILE
But I just happen to think having to just type
$ MAC FILE
is nicer, and the file can (could) include the PREFIX.
It's not that there aren't multiple ways of solving the problem (well,
actually it is, since Macro-32 do not have one of the ways for some reason).
>> (There is so much conditional code in RSX it's almost ridiculous.
>> Without such prefix files selecting which way to build things, it would
>> become horrible. Hello LB:[11,10]RSXMC.MAC)
>
> comp.os.vms
> --------^^^
Yes. I should have kept quiet. Sorry.
Johnny
More information about the Info-vax
mailing list