ar.h
Files ar.h and ../../make/ar.h are identical
defs.h
4c4
<  * Copyright 1994 - J B Systems, Morrison, CO
---
>  * Copyright 1995 - J B Systems, Morrison, CO
19c19
< #ident  "@(#)make:defs.h        1.0"
---
> #ident  "$Id: defs.h,v 1.2 1995/03/04 00:39:34 jbev Exp $"
50d49
< 
57d55
< 
104d101
< 
161,166c158,160
< int done:
<   3; /* flag used to tell when finished */
< int septype:
<   3; /* distinguishes between single and double : */
< int rundep:
<   1; /* flag indicating runtime translation done */
---
>   unsigned int done: 3;    /* flag used to tell when finished */
>   unsigned int septype: 3; /* distinguishes between single and double : */
>   unsigned int rundep: 1;  /* flag indicating runtime translation done */
170d163
< 
174,175c167
< struct lineblock
<   {
---
> struct lineblock {
183,184c175
< struct depblock
<   {
---
> struct depblock {
189,190c180
< struct shblock
<   {
---
> struct shblock {
195,196c185
< struct varblock
<   {
---
> struct varblock {
200,207c189,192
< int noreset:
<   1;
< int used:
<   1;
< int envflg:
<   1;
< int v_aflg:
<   1;
---
>   unsigned int noreset: 1;
>   unsigned int used: 1;
>   unsigned int envflg: 1;
>   unsigned int v_aflg: 1;
doname.c
4c4
<  * Copyright 1994 - J B Systems, Morrison, CO
---
>  * Copyright 1995 - J B Systems, Morrison, CO
19c19
< #ident  "@(#)make:doname.c      1.0"
---
> #ident  "$Id: doname.c,v 1.2 1995/03/04 00:40:11 jbev Exp $"
36d35
< 
110,111d108
< 
< 
207d203
< 
284d279
< 
307d301
< 
350,351c344
<       else if (IS_OFF (GET) ||
<         !get (p->namep, NOCD, 0))
---
>       else if (IS_OFF (GET) || !get (p->namep, NOCD, 0))
369c362
<     exit (ndocoms>0 ? -1 : 0);
---
>     exitm (ndocoms>0 ? -1 : 0);
417a411
> printf("calling docom1 [%s]\n", s);
425,426d418
< 
< 
dosys.c
4c4
<  * Copyright 1994 - J B Systems, Morrison, CO
---
>  * Copyright 1995 - J B Systems, Morrison, CO
19c19
< #ident  "@(#)make:dosys.c       1.0"
---
> #ident  "$Id: dosys.c,v 1.2 1995/03/04 00:40:11 jbev Exp $"
38c38
<     *p == NULL) p++;
---
>     *p == CNULL) p++;
51,52d50
< 
< 
57c55
< #ifdef mpx
---
> #ifdef mpx_4shell_temp_fix
84c82
<     shell = varptr ("SHELL") ->varval;
---
>     shell = varptr ("SHELL")->varval;
97a96
> #ifdef DEBUG
98a98
> #endif
99a100
> #ifdef DEBUG
101c102,104
<   if (status)fatal ("Couldn't load Shell");
---
> #endif
>   if (status < 0)fatal ("Couldn't load Shell");
>   if (status > 0)fatal ("Shell aborted");
107,108d109
< 
< 
117c118
<   while ((pid = wait (&status)) != waitpid)
---
>   while ((pid = wait (&status)) != waitpid) {
119a121
>   }
125d126
< 
129a131
> #ifdef mpx
131c133
<     if (od->dirfc != NULL)
---
>     if (od->dirfc != NULL) {
132a135,139
>       firstod = od->nextopendir;        /* set new entry */
>       free (od->dirn);          /* free directory name */
>       free (od);                /* free the node */
>     }
> #endif
135,136c142,151
< 
< 
---
> char *
> lastfield(s)
> register char *s;
> {
>     register char *t;
>     for (t = s; *s ; ++s)
>         if (*s == '/' || *s == ')')
>             t = s+1;
>     return(t);
> }
163a179,188
>   /* see if command is a cd command, and if so, do it locally */
>   t = lastfield(str);           /* get the command name */
>   if (!strcmp(t,"cd")) {
>     /* we found a cd command */
>     if(docd(2, argv)) {
>       fatal1 ("Cannot cd to directory %s", *argv);
>     }
>     return(0);
>   }
> 
170c195
<     execvp (str, argv);
---
>     Execvp (str, argv);
179c204,205
<   if (status)fatal1 ("Cannot load %s", str);
---
>   if (status < 0)fatal1 ("Cannot load %s", str);
>   if (status > 0)fatal1 ("%s aborted", str);
dyndep.c
Files dyndep.c and ../../make/dyndep.c are identical
files.c
Files files.c and ../../make/files.c are identical
gram.y
371a372
> printf("gram(NL): p[%x] yytext[%x] p[-1] = %c(%x)\n", p, yytext, p[-1], p[-1]);
406a408
> printf("gram2: p[%x] yytext[%x] p[-1] = %c(%x)\n", p, yytext, p[-1], p[-1]);
main.c
4c4
<  * Copyright 1994 - J B Systems, Morrison, CO
---
>  * Copyright 1995 - J B Systems, Morrison, CO
19,20c19
< #ident  "@(#)make:main.c        1.0"
< 
---
> #ident  "$Id: main.c,v 1.4 1995/03/04 00:37:22 jbev Exp $"
54d52
< 
63a62
> #ifdef NEWWAY
64a64,66
> #else
> CHARSTAR prompt="===> "; /* other systems -- pick what you want */
> #endif
85a88,89
> setbuf(stdout, 0);      /* DEBUG */
> 
104a109,110
>   /* set get flag as default */
>   if (IS_OFF (GET)) TURNON (GET);
149c155,156
<     if (argv [i] && argv [i] [0] == MINUS && argv [i] [1] == 'f' && argv [i] [2] == CNULL)
---
>     if (argv [i] && argv [i] [0] == MINUS &&
>         argv [i] [1] == 'f' && argv [i] [2] == CNULL)
160d166
< 
176d181
< 
216c221
<   exit (0);
---
>   exitm (0);
219,220d223
< 
< 
236c239
<   exit (2);
---
>   exitm (2);
239,241d241
< 
< 
< 
258d257
< 
269d267
< 
271d268
< 
318,320d314
< 
< 
< 
413d406
< 
445d437
< 
558c550
< 
---
> char dfs[] = "ZZZZZZZZZZZZZZZZ";
566a559
> #ifdef OLDWAY
567a561,563
> #else
>   setvar (Makeflags, dfs);
> #endif
makefile
19c19
< #ident  "@(#)Make:make/Makefile 1.0"
---
> #ident  "$Id: makefile,v 1.4 1995/03/04 00:56:21 jbev Exp $"
37c37
< CFLAGS = -N -DMPX
---
> CFLAGS = -DMPX #-N 
46c46
< OBJECTS = main.o doname.o files.o rules.o dosys.o gram.o dyndep.o misc.o
---
> OBJECTS = main.o doname.o files.o rules.o dosys.o gram.o dyndep.o misc.o docd.o
50c50
< SRCS = main.c doname.c files.c rules.c dosys.c gram.y dyndep.c misc.c
---
> SRCS = main.c doname.c files.c rules.c dosys.c gram.y dyndep.c misc.c docd.c
60,61c60,63
<         $(CC) $(LDFLAGS) $(OBJECTS) -o $(MAIN)
<         $(BIN)/chmod 755 $(MAIN)
---
>         $(CC) $(LDFLAGS) \
>         $(OBJECTS) -o i\
>         $(MAIN)
>         $(BIN)/chmod 775 $(MAIN)
92a95,160
> # Source file 'main.c'
> main.o: main.c
> main.o: ./defs.h
> main.o: /system/nbinclude/stdio.h
> main.o: /system/nbinclude/sys/types.h
> main.o: /system/nbinclude/dirent.h
> main.o: /system/nbinclude/sys/signal.h
> # Source file 'doname.c'
> doname.o: doname.c
> doname.o: ./defs.h
> doname.o: /system/nbinclude/stdio.h
> doname.o: /system/nbinclude/sys/types.h
> doname.o: /system/nbinclude/dirent.h
> # Source file 'files.c'
> files.o: files.c
> files.o: ./defs.h
> files.o: /system/nbinclude/stdio.h
> files.o: /system/nbinclude/sys/types.h
> files.o: /system/nbinclude/dirent.h
> files.o: /system/nbinclude/sys/stat.h
> files.o: /system/nbinclude/types.h
> files.o: /system/nbinclude/sys/a.out.h
> # Source file 'rules.c'
> rules.o: rules.c
> rules.o: ./defs.h
> rules.o: /system/nbinclude/stdio.h
> rules.o: /system/nbinclude/sys/types.h
> rules.o: /system/nbinclude/dirent.h
> # Source file 'dosys.c'
> dosys.o: dosys.c
> dosys.o: ./defs.h
> dosys.o: /system/nbinclude/stdio.h
> dosys.o: /system/nbinclude/sys/types.h
> dosys.o: /system/nbinclude/dirent.h
> # Source file 'gram.y'
> gram.o: gram.y
> gram.o: ./defs.h
> gram.o: /system/nbinclude/stdio.h
> gram.o: /system/nbinclude/sys/types.h
> gram.o: /system/nbinclude/dirent.h
> gram.o: /system/nbinclude/ctype.h
> # Source file 'dyndep.c'
> dyndep.o: dyndep.c
> dyndep.o: ./defs.h
> dyndep.o: /system/nbinclude/stdio.h
> dyndep.o: /system/nbinclude/sys/types.h
> dyndep.o: /system/nbinclude/dirent.h
> # Source file 'misc.c'
> misc.o: misc.c
> misc.o: ./defs.h
> misc.o: /system/nbinclude/stdio.h
> misc.o: /system/nbinclude/sys/types.h
> misc.o: /system/nbinclude/dirent.h
> misc.o: /system/nbinclude/ctype.h
> misc.o: /system/nbinclude/sys/stat.h
> misc.o: /system/nbinclude/types.h
> misc.o: /system/nbinclude/errno.h
> # Source file 'docd.c'
> docd.o: docd.c
> docd.o: /system/nbinclude/stdio.h
> docd.o: /system/nbinclude/sys/types.h
> docd.o: /system/nbinclude/sys/stat.h
> docd.o: /system/nbinclude/types.h
> docd.o: /system/nbinclude/string.h
> docd.o: /system/nbinclude/ctype.h
> # End of dependencies
misc.c
4c4
<  * Copyright 1994 - J B Systems, Morrison, CO
---
>  * Copyright 1995 - J B Systems, Morrison, CO
19c19
< #ident  "@(#)make:misc.c        1.0"
---
> #ident  "$Id: misc.c,v 1.2 1995/03/04 00:40:11 jbev Exp $"
33d32
< 
59d57
< 
66,68d63
< 
< 
< 
98d92
< 
142d135
< 
182d174
< 
265d256
< 
318c309
<   if (ps1 != NULL && *ps1 != NULL)
---
>   if (ps1 != NULL && *ps1 != CNULL)
399d389
< 
437,438d426
< 
< 
457,458c445
<   if (p == 0)
<   {
---
>   if (p == 0) {
461,462c448
<   if (p->noreset == NO)
<   {
---
>   if (p->noreset == NO) {
470c456,457
<     if (IS_ON (DBUG)) printf ("setvar: %s = %s noreset = %d envflg = %d Mflags = 0%o\n",
---
>     if (IS_ON (DBUG))
>         printf ("setvar: %s = %s noreset = %d envflg = %d Mflags = 0%o\n",
479d465
< 
531,532d516
< 
< 
540d523
< #ifdef mpx
542,548d524
< #endif
< #ifdef unix
<   exit (1);
< #endif
< #ifdef gcos
<   exit (0);
< #endif
551,552d526
< 
< 
563,564d536
< 
< 
579,582d550
< 
< 
< 
< 
622d589
< 
658d624
< 
709d674
< 
721a687
> #ifdef OLDSCCS
739a706,713
> #else
>   /* str points to last file char + 1 */
>   if ((str[-1] == 'v' || str[-1] == 'V') && str[-2] == ',')
>     return (sstr);
>   str[0] = ',';
>   str[1] = 'v';
>   str[2] = CNULL;
> #endif
743d716
< 
748a722
> #ifdef OLDSCCS
754a729,736
> #else
>   p = filename;
>   for (; *filename; filename++)
>     ;
>   /* p points to last file char + 1 */
>   if ((filename[-1] == 'v' || filename[-1] == 'V') && filename[-2] == ',')
>     return (YES);
> #endif
787d768
< 
858d838
< 
882d861
< 
937d915
< 
1014a993
>       return (-1);
1017a997
>       return(status);
1019d998
<       return (-1);
1138a1118
> #ifdef OLDSCCS
1139a1120,1123
> #else
>     gf->gnamep = copys (sfile);         /* remove ,v from name */
>     gf->gnamep[strlen(gf->gnamep) - 2] = CNULL;
> #endif
1183d1166
< #ifdef mpx
1185,1187d1167
< #else
< exit (arg)
< #endif
rules.c
4c4
<  * Copyright 1994 - J B Systems, Morrison, CO
---
>  * Copyright 1995 - J B Systems, Morrison, CO
19c19
< #ident  "@(#)make:rules.c       1.0"
---
> #ident  "$Id: rules.c,v 1.3 1995/03/03 22:23:56 jbev Exp $"
23c23
< /* DEFAULT RULES FOR UNIX */
---
> /* DEFAULT RULES FOR MPX */
36c36,40
<   ".SUFFIXES: .o .c .c~ .y .y~ .l .l~ .s .s~ .sh .sh~ .h .h~",
---
> #ifdef mpx
>   ".SUFFIXES: .o .c .c~ .y .y~ .x .x~ .s .s~ .sh .sh~ .h .h~ .f .f~",
> #else
>   ".SUFFIXES: .o .c .c~ .y .y~ .l .l~ .s .s~ .sh .sh~ .h .h~ .f .f~",
> #endif
41,66c45,63
<     "YACC=nbyacc",
<     "YFLAGS=",
<     "LEX=nblex",
<     "LFLAGS=",
<     "LD=nbcat",
<     "LDFLAGS=",
< #else
<     "YACC=yacc",
<     "YFLAGS=",
<     "LEX=lex",
<     "LFLAGS=",
<     "LD=ld",
<     "LDFLAGS=",
< #endif
< #ifdef mpx
<     "CC=nbcc",
<     "CFLAGS=-C",
<     "AS=nbcas",
< #else
<     "CC=cc",
<     "CFLAGS=-O",
<     "AS=as",
< #endif
<     "ASFLAGS=",
<     "GET=get",
<     "GFLAGS=",
---
>     "YACC=nbyacc", "YFLAGS=",
>     "LEX=nblex", "LFLAGS=",
>     "LD=nbcat", "LDFLAGS=",
> #else
>     "YACC=yacc", "YFLAGS=",
>     "LEX=lex", "LFLAGS=",
>     "LD=ld", "LDFLAGS=",
> #endif
> #ifdef mpx
>     "CC=nbcc", "CFLAGS=-C",
>     "F77=nbcc", "FFLAGS=-C",
>     "AS=nbas", "ASFLAGS=-C", "PRE=/system/system/mpxpre",
>         "MAC=-M/system/system/m.mpxmac",
>     "GET=co", "GFLAGS=",
> #else
>     "CC=cc", "CFLAGS=-O",
>     "AS=as", "ASFLAGS=",
>     "GET=co", "GFLAGS=",
> #endif
72,73c69,70
<     "\t$(GET) $(GFLAGS) -p $< > $*.c",
<     "\t$(CC) -n -O $*.c -o $*",
---
>     "\t$(GET) $(GFLAGS) $< > $*.c",
>     "\t$(CC) $*.c -o $*",
74a72,77
>   ".f:",
>     "\t$(F77) $(FFLAGS) $(LDFLAGS) $< -o $@",
>     ".f~:",
>     "\t$(GET) $(GFLAGS) $< > $*.f",
>     "\t$(F77) $*.f -o $*",
>     "\t-rm -f $*.f",
78c81
<     "\t$(GET) $(GFLAGS) -p $< > $*.sh",
---
>     "\t$(GET) $(GFLAGS) $< > $*.sh",
86c89
<     "\t$(GET) $(GFLAGS) -p $< > $*.c",
---
>     "\t$(GET) $(GFLAGS) $< > $*.c",
90c93,101
<     "\t$(GET) $(GFLAGS) -p $< > $*.c",
---
>     "\t$(GET) $(GFLAGS) $< > $*.c",
>   ".f.o:",
>     "\t$(F77) $(FFLAGS) -c $<",
>     ".f~.o:",
>     "\t$(GET) $(GFLAGS) $< > $*.f",
>     "\t$(F77) $(FFLAGS) -c $*.f",
>     "\t-rm -f $*.f",
>     ".f~.f:",
>     "\t$(GET) $(GFLAGS) $< > $*.f",
92c103
<     "\t$(AS) $(ASFLAGS) -o $@ $<",
---
>     "\t$(AS) $(ASFLAGS) $(MAC) -O$@ $(PRE) $<",
94,95c105,106
<     "\t$(GET) $(GFLAGS) -p $< > $*.s",
<     "\t$(AS) $(ASFLAGS) -o $*.o $*.s",
---
>     "\t$(GET) $(GFLAGS) $< > $*.s",
>     "\t$(AS) $(ASFLAGS) $(MAC) -O$*.o $(PRE) $*.s",
103c114
<     "\t$(GET) $(GFLAGS) -p $< > $*.y",
---
>     "\t$(GET) $(GFLAGS) $< > $*.y",
107a119,121
> #ifdef mpx
>     ".x.o:",
> #else
108a123
> #endif
112a128,134
> #ifdef mpx
>     ".x~.o:",
>     "\t$(GET) $(GFLAGS) $< > $*.x",
>     "\t$(LEX) $(LFLAGS) $*.x",
>     "\t$(CC) $(CFLAGS) -c lex.yy.c",
>     "\trm -f lex.yy.c $*.x",
> #else
114c136
<     "\t$(GET) $(GFLAGS) -p $< > $*.l",
---
>     "\t$(GET) $(GFLAGS) $< > $*.l",
117a140
> #endif
123c146
<     "\t$(GET) $(GFLAGS) -p $< > $*.y",
---
>     "\t$(GET) $(GFLAGS) $< > $*.y",
126a150,152
> #ifdef mpx
>     ".x.c :",
> #else
127a154
> #endif
135c162
<     "\t$(GET) $(GFLAGS) -p $< > $*.c",
---
>     "\t$(GET) $(GFLAGS) $< > $*.c",
140c167
<     "\t$(GET) $(GFLAGS) -p $< > $*.s",
---
>     "\t$(GET) $(GFLAGS) $< > $*.s",
145c172
<     "\t$(GET) $(GFLAGS) -p $< > $*.h",
---
>     "\t$(GET) $(GFLAGS) $< > $*.h",
