Operating System - OpenVMS
1753937 Members
9629 Online
108811 Solutions
New Discussion юеВ

MMS script to OLB creation

 
SOLVED
Go to solution
Arch_Muthiah
Honored Contributor

MMS script to OLB creation

All,

I have used madgoat make utility for Alpha Build. Now I use MMS script for IA64 build.

As per the MMS manaual, I will have to create the OLBs in the following way...

UTIL(MOD1) : MOD1.OBJ
LIBR UTIL.OLB MOD1.OBJ
UTIL(MOD2) : MOD2.OBJ
LIBR UTIL.OLB MOD2.OBJ
UTIL(MOD3) : MOD3.OBJ
LIBR UTIL.OLB MOD3.OBJ

Or using ::
UTIL.OLB :: MOD1.OBJ
LIBR UTIL.OLB MOD1.OBJ

This way to create around 20 OLBs and many EXEs(using C, C++, macro 32 sources), I will have write hundrads and thousands of lines code and also I will have to use different CC qualifiers (not default CFLAGS).

Many of you using MMS scripts, Is there any way to shorten the OLB creation scripts. There should be way in MMS, because in madgoat make utility, we do this with single line for each object file to be added to OLB using (built-in rule and action line).

Thaks in advance
Archie
Regards
Archie
9 REPLIES 9
Steven Schweda
Honored Contributor

Re: MMS script to OLB creation

> [...] I will have to [...]

Instead of what? (I don't think so.)

What, exactly, do you do with MMK which does
not work with MMS?

You might try visiting:

http://antinode.org/dec/index.html#Software

and then spending a little time looking at
almost any of the projects you'll find there.
I don't claim that they're ideal. but the
builders do seem to work pretty well.

Most of them use object libraries (mostly to
simplify LINK commands), and, so far as I
know, anything there which works with MMK
will also work with MMS. (You do need to use
MMS to do the automatic dependency
generation, but after that, either one should
do the job.) And, as I recall, they
generally use pretty simple lists of object
files / module names, not long lists of messy
rules.
Arch_Muthiah
Honored Contributor

Re: MMS script to OLB creation

Thanks Stewen.

>> so far as I know, anything there which
>> works with MMK will also work with MMS.
Certainly MMS will do.

Let me go through the link you mentioned and automatic dependency generation ?

Archie
Regards
Archie
Hoff
Honored Contributor

Re: MMS script to OLB creation

MMK for OpenVMS I64:

http://mvb.saic.com/freeware/freewarev80/make-mmk/

Do also consider why you're using and maintaining a makefile, too, as opposed to either using something newer (ant), or using something easier to maintain (brute-force build).

I've probably spent as much time dealing with makefile errors and with chasing stale bits erroneously included into builds as I've saved with incremental builds. And the spaces and the tabs.

Not a fan of classic make. In any guise.

Stephen Hoffman
HoffmanLabs LLC
Martin Vorlaender
Honored Contributor
Solution

Re: MMS script to OLB creation

Archunan,

I think I've never written dependancies for libraries like that (neither for MMK nor for MMS). Instead:

OBJS = MOD1.OBJ,MOD2.OBJ,MOD3.OBJ

UTIL.OLB : UTIL.OLB($(OBJS))

even without an action line did The Right Thing(TM).

cu,
Martin
Arch_Muthiah
Honored Contributor

Re: MMS script to OLB creation

Hoff and Martin,
Thank you very much sharing your experiences.

Hoff: We got MMS software recently, so are using it on IA64, we will use MMS on Alpha too shortly. I am scary about our IA64 porting work after reading your issues caused by extra chars due to backup/reastore. You are (great expereienced VMS guru) with us only, hope we can get your suggestions on any problems.

Martin:
Good idea, I will try this.
OBJS = MOD1.OBJ,MOD2.OBJ,MOD3.OBJ
UTIL.OLB : UTIL.OLB($(OBJS))

Yesterday I wrote my own RULES file and seems that also works well, but I like your idea is clear understanding for any other looking the scripts in the future.

I have coded like below

.c.olb :
libr $(libflags) $(mms$target) $(mms$source_list)

only I will have list all the source files names in the compilation rules.

Thanks Martin, Stewen and Hoff, I will come back again if I have problems.

Archie
Regards
Archie
Arch_Muthiah
Honored Contributor

Re: MMS script to OLB creation

I got the idea and solutions with the help of Martin, Stewen and Hoff.

Their suggestion was very usefull to come to the solution.

Thanks
Archie
Regards
Archie
Steven Schweda
Honored Contributor

Re: MMS script to OLB creation

> .c.olb :
> libr $(libflags) $(mms$target) $(mms$source_list)

".c.olb"???

I like the default rule (as shown in
SYS$COMMON:[SYSHLP.EXAMPLES.MMS]MMS$DEFAULT_RULES.MMS)
better:

.OBJ.OLB :
If "''F$Search("$(MMS$TARGET)")'" .EQS. "" Then $(LIBR)/Create $(MMS$TARGET)
$(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)

As you can see, it creates the library as
needed.

You should also be more careful with the case
of your macros (like "libflags" or
"LIBRFLAGS"), or you may get into trouble
with the latest, more case-sensitive MMS.
Arch_Muthiah
Honored Contributor

Re: MMS script to OLB creation

Steven,

I have mispelled your name as "stewen" for long time, today only I observed, I am sorry.

I have created the dependency rules as you have mentioned only, but here I typed wrongly as ".c.olb :".

Anyway thanks for your time remainding me.

Archie
Regards
Archie
Steven Schweda
Honored Contributor

Re: MMS script to OLB creation

> I have created the dependency rules [...]

The default .OBJ.OLB rule is normally what
you want. What you need you add to make it
work is that extra dependency of the library
on its elements, as shown by MV:

UTIL.OLB : UTIL.OLB($(OBJS))