Re: If interest with ! Three documents on MMK (816 Views)
Reply
Valued Contributor
Ph Vouters
Posts: 198
Registered: ‎10-29-2010
Message 1 of 14 (973 Views)

If interest with ! Three documents on MMK

1/ Designing MMS/MMK portable Makefile

http://vouters.dyndns.org/tima/OpenVMS-MMS-MMK-MMS_MMK_differences-Some_notes.html

 

2/ GNU Make/MMK/Visual Studio nmake Makefiles - A comparison

http://vouters.dyndns.org/tima/All-OS-GNU_make-MMK-nmake-Makefiles_comparison-Some_notes.html

 

3/ MMK - Rules and dependancies - Advanced MMK techniques

http://vouters.dyndns.org/tima/OpenVMS-MMK-Rules_and_dependencies.html

 

In the hope this will satisfy some of you, easing and simplifying your work on designing Makefiles

Philippe

Esteemed Contributor
H.Becker
Posts: 373
Registered: ‎04-09-2009
Message 2 of 14 (944 Views)

Re: If interest with ! Three documents on MMK

> 2/ GNU Make/MMK/Visual Studio nmake Makefiles - A comparison

 


GNU Make is available for VMS as well. For those who want to compare the pointed to Makefiles with one for VMS:

 

$ gmake -v
GNU Make 3.82.90
Built for VMS
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$

 

$ type makefile.vms
# GNU make Makefile for VMS to build telnet.exe
CFLAGS += /reentrancy=(multithread)
LDFLAGS += /thread=(multiple,upcalls)

VERSION = f$$edit(f$$getsyi("version"),"collapse")
PLATFORM = f$$getsyi("arch_name")
ECHO = write sys$$output
OBJS = telnet.obj dbgdmp.obj decode_64.obj

.PHONY: all os clean

all : os clean telnet.exe

telnet.exe : $(OBJS)

os :
        @ $(ECHO) "Building for HP OpenVMS/" + $(PLATFORM) + \
                " " + $(VERSION) + "..."

clean :
        if f$$search("*.obj") .nes. "" then delete/nolog/noconfirm *.obj;
        if f$$search("telnet.exe") .nes. "" then \
                delete/nolog/noconfirm telnet.exe;
$

 

Honored Contributor
Craig A Berry
Posts: 495
Registered: ‎05-06-2003
Message 3 of 14 (902 Views)

Re: If interest with ! Three documents on MMK

Note that MMK is open source and is under fairly active development:

 

https://github.com/endlesssoftware/mmk: https://github.com/endlesssoftware/mmk

 

So if you wanted to report a bug or implement a new feature you could do so there (bugs are called "Issues" on github).

Valued Contributor
Ph Vouters
Posts: 198
Registered: ‎10-29-2010
Message 4 of 14 (888 Views)

Re: If interest with ! Three documents on MMK

Hi Harmut,

 

Your telnet GNV Make sample is not highly GNU Make coloured. Here is one very GNU Make coloured which I wrote:

 

$ cat SSLMail/Makefile_smtp

# gmake Makefile for smtp
SHELL=/bin/sh
#IPv6FLAG=-D_USE_INET6
CC_OSF1=cc
CXX_OSF1=cxx
LDFLAGS_OSF1=
DFLAGS_OSF1=$(IPv6FLAG) -D__USE_STD_IOSTREAM
CC_HP-UX=cc
CXX_HP-UX=aCC
DFLAGS_HP-UX=$(IPv6FLAG) -D__unix__
LDFLAGS_HP-UX=-lssl -lcrypto
CC_OpenVMS=cc -Os
CXX_OpenVMS=cxx -Os
LDFLAGS_OpenVMS=-L/TCPIP\$$LIBRARY -ltcpip\$$lib \
-L/SYS\$$SHARE -lssl -lcrypto
DFLAGS_OpenVMS=$(IPv6FLAG)
CC_Linux=gcc -O2
CXX_Linux=g++ -O0 -g
LDFLAGS_Linux=-lresolv -lssl -lcrypto
DFLAGS_Linux=$(IPv6FLAG) -D_REENTRANT
CC_SunOS=/usr/local/bin/gcc -I/usr/include
CXX_SunOS=/usr/local/bin/g++ -I/usr/include
DFLAGS_SunOS=$(IPv6FLAG)
LDFLAGS_SunOS=-lsocket -lnsl -lssl -lcrypto
#
OS= $(shell uname -s)
CC=CC_$(OS)
CXX=CXX_$(OS)
LDFLAGS=LDFLAGS_$(OS)
DFLAGS=DFLAGS_$(OS)
BIN?=$(HOME)/bin
OBJS=   sockutil.o \
        ls.o \
        fileparse.o \
        uuencode_base64.o \
        encode.o \
        decode.o \
        digest_md5.o \
        gssapi.o
ifeq ($(OS),OpenVMS)
OBJS+=smtp_util.o
endif
ifneq ($(TRACE),)
EXTRA_OBJ=../LeakTrace/LeakTracer.o
endif
ifeq ($(DEBUG),true)
CFLAGS+=-DDEBUG
endif
CFLAGS+=$(shell if [ -f /usr/include/gssapi.h ]; then \
             echo "-DHAVE_HEIMDAL_KRB5"; \
        elif [ -f /usr/include/gssapi/gssapi_generic.h ]; then \
              echo "-DHAVE_MIT_KRB5"; \
        elif [ -f /usr/include/gssapi/gssapi_ext.h ]; then \
              echo "-DHAVE_SUN_KRB5"; \
        fi)
CFLAGS+=$(shell if [ -f /usr/include/et/com_err.h ]; then\
              echo "-DHAVE_ET_COM_ERR_H";fi)
ifneq ($(OS),OpenVMS)
LDFLAGS_$(OS)+=$(shell if [[ -d /usr/include && (( -f /usr/include/gssapi.h || \
                      -f /usr/include/gssapi/gssapi_generic.h || \
                      -f /usr/include/gssapi/gssapi_ext.h )) ]]; then \
                    echo "-lgssapi_krb5"; \
          fi)
endif
ifeq ($(CC),cc)
CC=$(CC_$(OS))
endif
ifeq ($(CXX),g++)
CXX=$(CXX_$(OS))
endif
ifeq ($(LDFLAGS),)
LDFLAGS=$(LDFLAGS_$(OS))
endif
ifeq ($(DFLAGS),)
DFLAGS=$(DFLAGS_$(OS))
endif

all: os clean smtp

smtp: smtp.cxx $(OBJS)
        $($(CXX)) $($(DFLAGS)) smtp.cxx -o smtp $(OBJS) $(EXTRA_OBJ) $($(LDFLAGS))

.c.o:
        $($(CC)) $($(DFLAGS)) $(CFLAGS) -c $<

sockutil.o: sockutil.cxx sockutil.hxx
        $($(CXX)) $($(DFLAGS)) -c sockutil.cxx
os:
        @echo "Building for $(OS)..."

clean:
        rm -f *.o
        rm -f $(BIN)/smtp
        rm -f core

 

Another pure GNV Make sample highly VMS coloured I could not get it to work

 

$ cd examples/Pascal
$ type GNU_a.mms
SHELL=/bin/dcl
PASCAL=PASCAL

all: P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ

.pas.OBJ:
        $(SHELL) $(PASCAL) $*.PAS

P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ: P2C_LTVT_MODUL.pas \
                                                P2C_LTVLEIPL_MODUL.pas

#P2C_LTVT_MODUL.OBJ: P2C_LTVT_MODUL.pas
#P2C_LTVLEIPL_MODUL.OBJ: P2C_LTVLEIPL_MODUL.pas
$ bash
bash$ make -f GNU_a.mms
make: Nothing to be done for `all'.
bash$ ls                     
GNU_a.mms               b.mms            foo.mms            ltcodes_modul.pas
P2C_LTVLEIPL_MODUL.pas  basis_modul.def  foo1_MODUL.pas
P2C_LTVT_MODUL.pas      basis_modul.pas  foo2_MODUL.pas
a.mms                   descrip.mms      ltcodes_modul.def
bash$ exit
exit

 

 

Valued Contributor
Ph Vouters
Posts: 198
Registered: ‎10-29-2010
Message 5 of 14 (887 Views)

Re: If interest with ! Three documents on MMK

Hi Craig,

 

If you know how to let the MMK maintainers aware of this simple fix to the

INCLUDE  =  text

issue that I document in the yellow coloured part of my today's updated document at http://vouters.dyndns.org/tima/OpenVMS-MMS-MMK-MMS_MMK_differences-Some_notes.html, you are more than welcomed.

 

Also, I would need an MMK maintainer point of view on what could be regarded as a bug or not. It all depends upon either MMS or GNU Make/nmake behaviour compatibility which is looked after.

 

It happens with such constructs:

 

foo1.obj foo2.obj : foo1.c foo2.c

 

if I only manually delete foo2.obj, then  both foo1.obj and foo2.obj are rebuilt when running MMS/MMK and only foo2.obj is rebuilt when running GNU Make/Microsoft nmake.

 

If you own some contacts within the MMK maintainers, please provide your contact the URL to this thread.

Thank you so much in advance.

Yours truly,

Philippe

 

Valued Contributor
Ph Vouters
Posts: 198
Registered: ‎10-29-2010
Message 6 of 14 (881 Views)

Re: If interest with ! Three documents on MMK

Hartmut,

 

The very strange thing with GNV Make and the small GNU_a.mms using VMS/PASCAL source files I could not succeed to make it work and I posted earlier, this very similar descrip.mms  works fully as expected with exactly the same behaviour on both Linux Fedora 18 (can't be more than up to date) and OpenVMS V8.3.

 

[philippe@victor ~]$ sftp remote-host

 Welcome to hp OpenVMS Industry Standard 64 Operating System, Version V8.3    
Enter passphrase for key '/home/philippe/.ssh/id_rsa':
Connected to remote-host.
sftp> mkdir examples/C
sftp> cd examples/C
sftp> put P2C_LTVLEIPL_MODUL.c
Uploading P2C_LTVLEIPL_MODUL.c to /DISK$USERS/pv/EXAMPLES/C/P2C_LTVLEIPL_MODUL.c
P2C_LTVLEIPL_MODUL.c                          100%   41     0.0KB/s   00:00    
sftp> put P2C_LTVT_MODUL.c
Uploading P2C_LTVT_MODUL.c to /DISK$USERS/pv/EXAMPLES/C/P2C_LTVT_MODUL.c
P2C_LTVT_MODUL.c                              100%   37     0.0KB/s   00:00    
sftp> !ls descrip.mms
descrip.mms
sftp> !cat descrip.mms
all: P2C_LTVT_MODUL.o P2C_LTVLEIPL_MODUL.o

P2C_LTVT_MODUL.o P2C_LTVLEIPL_MODUL.o: P2C_LTVT_MODUL.c \
                                        P2C_LTVLEIPL_MODUL.c
.c.o:
        $(CC) -c -o $@ $*.c
sftp> put descrip.mms
Uploading descrip.mms to /DISK$USERS/pv/EXAMPLES/C/descrip.mms
descrip.mms                                   100%  155     0.2KB/s   00:00    
sftp> bye
[philippe@victor ~]$ ssh remote-host

 Welcome to hp OpenVMS Industry Standard 64 Operating System, Version V8.3    
Enter passphrase for key '/home/philippe/.ssh/id_rsa':

    Last interactive login on Thursday, 14-FEB-2013 20:37:12.58
    Last non-interactive login on Thursday, 14-FEB-2013 23:57:14.83
%GNU_STARTUP-I-SETTING_UP,  setting up Autoconf for VMS version 1.105
%GNU_STARTUP-I-SETTING_UP,  setting up M4 version 1.4
%GNU_STARTUP-I-SETTING_UP,  setting up SSLMail version 1.0
$ cd examples/C
$ bash
bash$ make -f descrip.mms
cc -c -o P2C_LTVT_MODUL.o P2C_LTVT_MODUL.c
cc -c -o P2C_LTVLEIPL_MODUL.o P2C_LTVLEIPL_MODUL.c
bash$ rm P2C_LTVLEIPL_MODUL.o
bash$ make -f descrip.mms
cc -c -o P2C_LTVLEIPL_MODUL.o P2C_LTVLEIPL_MODUL.c
bash$ cat P2C_LTVT_MODUL.c
void P2C_LTVT_MODUL(void){
return;
}
bash$ cat P2C_LTVLEIPL_MODUL.c
void P2C_LTVLEIPL_MODUL(void){
return;
}
bash$ uname -s
OpenVMS
bash$ exit
exit
$ lo          
Connection to remote-host closed.013 00:01:13.69

Regards,

Philippe

Esteemed Contributor
H.Becker
Posts: 373
Registered: ‎04-09-2009
Message 7 of 14 (879 Views)

Re: If interest with ! Three documents on MMK

To me this looks like a lower-/UPPERCASE filename problem.

 
$ sh proc/parse/case
...
Parse Style: Extended
 
Case Lookup: Blind
$
mc gnv$gnu:[bin]diff -utb GNU_a.mms-orig GNU_a.mms
--- GNU_a.mms-orig      Thu Feb 14 17:39:14 2013
+++ GNU_a.mms   Thu Feb 14 17:38:59 2013
@@ -1,13 +1,13 @@
 SHELL=/bin/dcl
 PASCAL=PASCAL
 
-all: P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ
+all: p2c_ltvt_modul.obj p2c_ltvleipl_modul.obj
 
-.pas.OBJ:
+.pas.obj:
         $(SHELL) $(PASCAL) $*.PAS
 
-P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ: P2C_LTVT_MODUL.pas \
-                                                P2C_LTVLEIPL_MODUL.pas
+p2c_ltvt_modul.obj p2c_ltvleipl_modul.obj: p2c_ltvt_modul.pas \
+                                                p2c_ltvleipl_modul.pas
 
 #P2C_LTVT_MODUL.OBJ: P2C_LTVT_MODUL.pas
 #P2C_LTVLEIPL_MODUL.OBJ: P2C_LTVLEIPL_MODUL.pas
$ mc sys$login:make -v
GNU Make 3.82.90
Built for VMS
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ mc sys$login:make -nf GNU_a.mms
/bin/dcl PASCAL p2c_ltvt_modul.PAS
/bin/dcl PASCAL p2c_ltvleipl_modul.PAS
$ mc gnv$gnu:[bin]make -v           
GNU Make version 3.78.1, by Richard Stallman and Roland McGrath.
Built for VMS
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
 
Report bugs to <bug-make@gnu.org>.
 
$ mc gnv$gnu:[bin]make -nf GNU_a.mms
/bin/dcl PASCAL p2c_ltvt_modul.PAS
/bin/dcl PASCAL p2c_ltvleipl_modul.PAS
$
 
I also remember that I fixed some case problems for GNU make 3.80:
 
$ mc sys$login:gmake380 -v
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
$ mc sys$login:gmake380 -nf GNU_a.mms-orig
/bin/dcl PASCAL p2c_ltvt_modul.PAS
/bin/dcl PASCAL p2c_ltvleipl_modul.PAS
$ mc sys$login:gmake380 -nf GNU_a.mms     
/bin/dcl PASCAL p2c_ltvt_modul.PAS
/bin/dcl PASCAL p2c_ltvleipl_modul.PAS
$
 
But changes in 3.81 (or later in 3.82) broke that fix and I never spent the time to get it working again.
Valued Contributor
Ph Vouters
Posts: 198
Registered: ‎10-29-2010
Message 8 of 14 (878 Views)

Re: If interest with ! Three documents on MMK

Hartmut,

 

You can play with this hereafter. It invokes the HP C compiler, which you should have available, either directly (GNU_a.mms) through /bin/dcl or indirectly (DESCRIP.MMS) via the GNV cc wrapper. This GNU_a.mms is the VMS/PASCAL sources one fitted to VMS/C sources. This does strangely look as a GNV make bug or if you are delicate with HP OpenVMS business a strong limitation.

 

As a side note regarding my very GNU Make coloured Makefile posted earlier, it GNV builds fine using my cc wrapper version andf the following syntax:

 

LDFLAGS_OpenVMS=-L/TCPIP\$$LIBRARY -l:tcpip\$$lib.olb \
-L/SYS\$$SHARE -lssl -lcrypto

 

Notice the -l:tcpip\$$lib.olb syntax which matches the Linux and HP-UX ld mans (other Unix/Unix-like ????).

The previous post containing -L/TCPIP\$$LIBRARY -ltcpip\$$lib is not working under HP GNV as it only looks after TCPIP$LIBRARY:tcpip$lib.exe which does not exist. There was no GNV kit way to specify an archive (.OLB/.a). I do not know whether the latest GNV kit incorporates my changes to the cc wrapper.

 

Regards,

Philippe

 

$ cd examples/C
$ dir

Directory DISK$USERS:[pv.EXAMPLES.C]

DESCRIP.MMS;1       GNU_a.mms;8         P2C_LTVLEIPL_MODUL.C;1
P2C_LTVT_MODUL.C;1  

Total of 4 files.

$ type GNU_a.mms
SHELL=/bin/dcl
CC=cc

all: P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ

.c.OBJ:
        $(SHELL) $(CC) $*.C

P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ: P2C_LTVT_MODUL.C \
                                                P2C_LTVLEIPL_MODUL.C
$ bash
bash$ make -f GNU_a.mms
make: Nothing to be done for `all'.
bash$ cat descrip.mms
all: P2C_LTVT_MODUL.o P2C_LTVLEIPL_MODUL.o

P2C_LTVT_MODUL.o P2C_LTVLEIPL_MODUL.o: P2C_LTVT_MODUL.c \
                                        P2C_LTVLEIPL_MODUL.c
.c.o:
        $(CC) -c -o $@ $*.c
bash$ rm *.o
bash$ make -f DESCRIP.MMS
cc -c -o P2C_LTVT_MODUL.o P2C_LTVT_MODUL.c
cc -c -o P2C_LTVLEIPL_MODUL.o P2C_LTVLEIPL_MODUL.c
bash$ exit  
exit
$ delete *.o;
$ type P2C_LTVT_MODUL.c
void P2C_LTVT_MODUL(void){
return;
}
$ type P2C_LTVLEIPL_MODUL.c
void P2C_LTVLEIPL_MODUL(void){
return;
}

Valued Contributor
Ph Vouters
Posts: 198
Registered: ‎10-29-2010
Message 9 of 14 (877 Views)

Re: If interest with ! Three documents on MMK

Hartmut,

 

Our replies to this post crossed. To answer your supposition:

$ bash
bash$ make -f DESCRIP.MMS
cc -c -o P2C_LTVT_MODUL.o P2C_LTVT_MODUL.C
cc -c -o P2C_LTVLEIPL_MODUL.o P2C_LTVLEIPL_MODUL.C
bash$ rm *.o
bash$ cat DESCRIP.MMS
all: P2C_LTVT_MODUL.o P2C_LTVLEIPL_MODUL.o

P2C_LTVT_MODUL.o P2C_LTVLEIPL_MODUL.o: P2C_LTVT_MODUL.C \
                                        P2C_LTVLEIPL_MODUL.C
.C.o:
        $(CC) -c -o $@ $*.C
bash$ dcl sho proc/all

15-FEB-2013 01:52:15.57   User: PV               Process ID:   000089B1
                          Node: SG1              Process name: "PV_57598"

Terminal:           
User Identifier:    [USERS,PV]
Base priority:      4
Default file spec:  DISK$USERS:[pv.EXAMPLES.C]
Number of Kthreads: 1

Process Quotas:
 Account name: USERS   
 CPU limit:                      Infinite  Direct I/O limit:        16
 Buffered I/O byte count quota:    189440  Buffered I/O limit:      16
 Timer queue entry quota:               9  Open file quota:         97
 Paging file quota:                487104  Subprocess quota:         8
 Default page fault cluster:           64  AST quota:               99
 Enqueue quota:                      1997  Shared file limit:        0
 Max detached processes:                0  Max active jobs:          0

Accounting information:
 Buffered I/O count:        75  Peak working set size:       3552
 Direct I/O count:           0  Peak virtual size:         177344
 Page faults:              218  Mounted volumes:                0
 Images activated:           1
 Elapsed CPU time:          0 00:00:00.01
 Connect time:              0 00:00:00.06
 
Authorized privileges:
 NETMBX       TMPMBX
 
Process privileges:
 NETMBX               may create network device
 TMPMBX               may create temporary mailbox
 
Process rights:
 PV                                resource
 INTERACTIVE                       
 LOCAL                             
 
System rights:
 SYS$NODE_SG1                      
 
Auto-unshelve: on
 
Image Dump: off
 
Soft CPU Affinity: off
 
Parse Style: Extended
 
Case Lookup: Blind
 
Units: Blocks
 
Token Size: Traditional
 
Home RAD: 0
 
Scheduling class name: none

Process Dynamic Memory Area  
  Current Size (KB)               528.00   Current Size (Pagelets)      1056
  Free Space (KB)                 503.00   Space in Use (KB)           25.00
  Largest Var Block (KB)          496.00   Smallest Var Block (bytes)     48
  Number of Free Blocks                3   Free Blocks LEQU 64 bytes       1

There are 3 processes in this job:

  PV
    PV_42367
      PV_57598 (*)
bash$


So it does not seem to be a filename casing problem using my version of GNV make. Also can you run GNV make under a bash shell ? As you can notice it from the bash$ dcl show proc/all, I run with Parse Style: Extended. Also the above and the previous run makes me think since when something which pretends to be Unix compatible is filename case insensitive ?!!?

Esteemed Contributor
H.Becker
Posts: 373
Registered: ‎04-09-2009
Message 10 of 14 (861 Views)

Re: If interest with ! Three documents on MMK

I use EISNER and whatever version of GNV is installed on it (without privs I have no idea to find out what it really is).
 
>>>
bash$ make -f GNU_a.mms
make: Nothing to be done for all'.
<<< 
 
Try a 'make -dnf GNU_a.mms >x.x'
and look for 
grep -A5 "Considering target file \`P2C_LTVT_MODUL.OBJ'." x.x
You will see that the GNV make uses a stem `P2C_LTVT_MODUL.OBJ' and will
never be able to match your implicit rule with that stem.
 
Try a 'make -dnf DESCRIP.MMS >y.y'
and look for
grep -A5 "Considering target file \`P2C_LTVT_MODUL.o'." y.y
You will see that the GNV make uses a stem `P2C_LTVT_MODUL' and it will find a match for your implicit rule with the source `P2C_LTVT_MODUL.OBJ.c', which actually is P2C_LTVT_MODUL.C.
 
Are you surprised? And in the previous note you even had .c.o for the rule and .c source files (this confused me and I hope I comment on the right, last version).
 
Anyway, try this:
bash-4.2$ diff -ub GNU_a.mms a.mms
--- GNU_a.mms   Sat Feb 16 05:44:14 2013
+++ a.mms       Sat Feb 16 07:59:03 2013
@@ -1,6 +1,9 @@
 SHELL=/bin/dcl
 CC=cc
   
+.SUFFIXES:
+.SUFFIXES: .c .OBJ
+
 all: P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ
     
 .c.OBJ:
bash-4.2$ make -nf a.mms
/bin/dcl cc P2C_LTVT_MODUL.C
/bin/dcl cc P2C_LTVLEIPL_MODUL.C
bash-4.2$ 
      
Sure enough, a VMS version of GNU make should have .OBJ in the suffixes by default. However, in GNV GNU make only has the .o in the suffixes, see below.
 
>>>
So it does not seem to be a filename casing problem using my version of GNV make. Also can you run GNV make under a bash shell ? As you can notice it from the bash$ dcl show proc/all, I run with Parse Style: Extended. Also the above and the previous run makes me think since when something which pretends to be Unix compatible is filename case insensitive ?!!?
<<<
 
From the sources I know that GNU make for VMS does some UPPER- or lowercasing before hashing all the filenames read from a directory. So I would not bet that this would not cause problems.
 
I expect make's behavior to be the same, no matter whether it is invoked from the bash or from DCL. It's not obvious but that's the case:
 
$ mc gnv$gnu:[bin]bash -c "make -nf DESCRIP.MMS"
cc -c -o P2C_LTVT_MODUL.o P2C_LTVT_MODUL.c
cc -c -o P2C_LTVLEIPL_MODUL.o P2C_LTVLEIPL_MODUL.c
$
$ mc gnv$gnu:[bin]make. -nf DESCRIP.MMS
/EISNER$LDA1/VMS$COMMON/gnv/bin/make.: Nothing to be done for all'.
$
$ SHELL="bash
$ mc gnv$gnu:[bin]make. -nf DESCRIP.MMS
cc -c -o P2C_LTVT_MODUL.o P2C_LTVT_MODUL.C
cc -c -o P2C_LTVLEIPL_MODUL.o P2C_LTVLEIPL_MODUL.C
$ 
 
So SHELL="bash" triggers other default suffixes. Makes sense, or?
 
What is "Unix compatible"? GNV is not even Posix compliant. If I would need "Unix compatibility" I would run Tru64 or Linux on my Alpha.  :-)
 
With "Case Lookup: Blind" I would not expect case sensitivity. As far as I know, setting the lookup to be case sensitive is not recommended for GNV. As you probably know, VMS was not designed to be case sensitive and all the changes for it so far are not guaranteed to always work as expected.
Valued Contributor
Ph Vouters
Posts: 198
Registered: ‎10-29-2010
Message 11 of 14 (856 Views)

Re: If interest with ! Three documents on MMK

Hartmut,

 

The .SUFFIXES line to be added was THE point. With make -h, I found make -p very interesting regarding SUFFIXES. Thanks to you I learned.

 

However I now face another difficulty I have not yet the response for.

 

$ dire dcl.exe
%DIRECT-W-NOFILES, no files found
$ sho logical dcl$path
   "DCL$PATH" = "[]" (LNM$PROCESS_TABLE)
        = "DISK$USERS:[pv.gnv213.BIN]"
$ bash
bash$ make -f GNU_a.mms
dcl PASCAL P2C_LTVLEIPL_MODUL.pas
%DCL-W-NOCOMD, no command on line - reenter with alphabetic first character
%DCL-W-NOCOMD, no command on line - reenter with alphabetic first character
make: *** [P2C_LTVLEIPL_MODUL.OBJ] Error 176
bash$ dcl PASCAL P2C_LTVLEIPL_MODUL.pas
bash$ rm *.OBJ
bash$ cat GNU_a.mms
SHELL=dcl
PASCAL=PASCAL

.SUFFIXES: .pas .OBJ

all: P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ

.pas.OBJ:
        $(SHELL) $(PASCAL) $*.pas

P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ: P2C_LTVT_MODUL.pas \
                                                P2C_LTVLEIPL_MODUL.pas
bash$

So I have to dig more into.

 

Anyway, many thanks for your so far kind and knowledgeable support.

Philippe

 

Valued Contributor
Ph Vouters
Posts: 198
Registered: ‎10-29-2010
Message 12 of 14 (854 Views)

Re: If interest with ! Three documents on MMK

Hartmut,

 

Looks like the GNV make I run is buggy. I got the reason why my GNU_a.mms fails on the dcl command.

 

$ set verify
$ bash
bash$ make -f GNU_a.mms
dcl PASCAL /object=P2C_LTVT_MODUL.OBJ P2C_LTVT_MODUL.pas
$ define/nolog sys$error _MBA14121:
$ open/write sys$error _MBA14121:
$ define/nolog/user sys$input _MBA14122:
-c dcl PASCAL /object=P2C_LTVT_MODUL.OBJ P2C_LTVT_MODUL.pas
%DCL-W-NOCOMD, no command on line - reenter with alphabetic first character
%DCL-W-NOCOMD, no command on line - reenter with alphabetic first character
make: *** [P2C_LTVT_MODUL.OBJ] Error 176
bash$ sh -c 'dcl PASCAL /object=P2C_LTVT_MODUL.OBJ P2C_LTVT_MODUL.pas'
$ define/nolog sys$error _MBA14136:
$ open/write sys$error _MBA14136:
$ define/nolog/user sys$input _MBA14137:
PASCAL /object=P2C_LTVT_MODUL.OBJ P2C_LTVT_MODUL.pas
bash$

 

So as far it looks /bin/dcl.exe gets implicitely  executed and passed wrong arguments. This is reinforced with this test:

 

$ set verify

$ bash
bash$ make -f GNU_a.mms
PASCAL /object=P2C_LTVLEIPL_MODUL.OBJ P2C_LTVLEIPL_MODUL.pas
$ define/nolog sys$error _MBA14168:
$ open/write sys$error _MBA14168:
$ define/nolog/user sys$input _MBA14169:
-c PASCAL /object=P2C_LTVLEIPL_MODUL.OBJ P2C_LTVLEIPL_MODUL.pas
%DCL-W-NOCOMD, no command on line - reenter with alphabetic first character
%DCL-W-NOCOMD, no command on line - reenter with alphabetic first character
make: *** [P2C_LTVLEIPL_MODUL.OBJ] Error 176
bash$ cat GNU_a.mms
SHELL=dcl
PASCAL=PASCAL

.SUFFIXES: .pas .OBJ

all: P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ

.pas.OBJ:
        $(PASCAL) /object=$@ $*.pas

P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ: P2C_LTVT_MODUL.pas \
                                                P2C_LTVLEIPL_MODUL.pas
bash$

which I would rather have expected a PASCAL: no such file or directory error. This makes Unix sense:


bash$ sh -c 'PASCAL /object=P2C_LTVT_MODUL.OBJ P2C_LTVT_MODUL.pas'
sh: PASCAL: command not found
bash$

 

Yours truly,

Philippe

Esteemed Contributor
H.Becker
Posts: 373
Registered: ‎04-09-2009
Message 13 of 14 (851 Views)

Re: If interest with ! Three documents on MMK

Try to avoid the SHELL variable in make, try this:
 
$ mc gnv$gnu:[bin]diff -ub GNU_a.mms-orig GNU_a.mms
--- GNU_a.mms-orig      Sun Feb 17 09:40:32 2013
+++ GNU_a.mms   Sun Feb 17 09:43:36 2013
@@ -1,4 +1,4 @@
-SHELL=dcl
+DCL=dcl
 PASCAL=PASCAL
 
 .SUFFIXES: .pas .OBJ
@@ -6,7 +6,7 @@
 all: P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ
 
 .pas.OBJ:
-       $(SHELL) $(PASCAL) $*.pas
+       $(DCL) $(PASCAL) $*.pas
 
 P2C_LTVT_MODUL.OBJ P2C_LTVLEIPL_MODUL.OBJ: P2C_LTVT_MODUL.pas \
                                                 P2C_LTVLEIPL_MODUL.pas
 
It seems like having a SHELL variable triggers the action
$(SHELL) -c $(SHELL) $(PASCAL) $*.pas
which is expanded to
dcl -c dcl PASCAL P2C_LTVT_MODUL.pas
 
Your are mixing environments - probably because there is no pascal compiler wrapper - this almost always creates problems.
 
Occasional Advisor
Tim E. Sneddon
Posts: 9
Registered: ‎09-24-2008
Message 14 of 14 (816 Views)

Re: If interest with ! Three documents on MMK

Hi Philippe,

 

I am the MMK maintainer :-)  Thanks for your bug report regarding the INCLUDE directive.  I have since raised an issue, here:

 

https://github.com/endlesssoftware/mmk/issues/52

 

and I'll get on to it very soon; I am currently at the very end of punching out the much awaited V5.0 release.

 

As for your other question.  Are you able to give me a more complete example? I'm not really sure what you are getting at.

 

Lastly, I've noticed that you've written a few articles regarding MMK, which is fantastic!  If you have any enhancements, questions, etc. please direct them to the Github Issues page for MMK.  They have a much greater chance of being answered there.

 

Regards, Tim.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.