Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

If interest with ! Three documents on MMK

 
Highlighted
Ph Vouters
Valued Contributor

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

 

Ph Vouters
Valued Contributor

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

H.Becker
Honored Contributor

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.
 
Tim E. Sneddon
Occasional Advisor

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.