code expanders now support grind

This commit is contained in:
ceriel 1991-11-01 11:55:34 +00:00
parent 3da953fa85
commit 7cff0f9d8a
7 changed files with 54 additions and 5 deletions

View file

@ -21,6 +21,9 @@ afcc \- fast ACK compatible ANSI C compiler
.B \-w .B \-w
] ]
[ [
.B \-g
]
[
.B \-o .B \-o
.I outfile .I outfile
] ]
@ -112,6 +115,9 @@ Name the final output file
.br .br
Remove any initial definition of Remove any initial definition of
.I name. .I name.
.IP \fB\-g\fP
.br
Produce symbolic debugging information for grind(1).
.IP \fB\-v\fP .IP \fB\-v\fP
.br .br
Verbose. Print the commands as they are executed. Verbose. Print the commands as they are executed.
@ -132,5 +138,7 @@ can be freely mixed.
B.W. Kernighan, D. Ritchie, "\fIThe C programming Language\fP", Prentice-Hall Inc., 1978 B.W. Kernighan, D. Ritchie, "\fIThe C programming Language\fP", Prentice-Hall Inc., 1978
.IP [2] .IP [2]
ack(1) manual page. ack(1) manual page.
.IP [3]
grind(1) manual page.
.SH DIAGNOSTICS .SH DIAGNOSTICS
Diagnostics are intended to be self-explanatory. Diagnostics are intended to be self-explanatory.

View file

@ -43,6 +43,9 @@ afm2 \- fast ACK compatible Modula-2 compiler
.B \-_ .B \-_
] ]
[ [
.B \-g
]
[
.BI \-U name .BI \-U name
] ]
[ [
@ -162,6 +165,9 @@ Verbose, no execute. Only print the commands, do not execute them.
.IP \fB\-L\fR .IP \fB\-L\fR
do not generate code to keep track of do not generate code to keep track of
the current location in the source code. the current location in the source code.
.IP \fB\-g\fP
.br
Produce symbolic debugging information for grind(1).
.IP \fB\-w\fR\fIclasses\fR .IP \fB\-w\fR\fIclasses\fR
suppress warning messages whose class is a member of \fIclasses\fR. suppress warning messages whose class is a member of \fIclasses\fR.
Currently, there are three classes: \fBO\fR, indicating old-flashioned use, Currently, there are three classes: \fBO\fR, indicating old-flashioned use,
@ -197,5 +203,7 @@ N. Wirth, \fIProgramming in Modula-2\fP, 3rd edition, Springer Verlag.
C.J.H. Jacobs, \fIThe ACK Modula-2 Compiler\fP. C.J.H. Jacobs, \fIThe ACK Modula-2 Compiler\fP.
.IP [3] .IP [3]
ack(1) unix manual page. ack(1) unix manual page.
.IP [4]
grind(1) unix manual page.
.SH DIAGNOSTICS .SH DIAGNOSTICS
Diagnostics are intended to be self-explanatory. Diagnostics are intended to be self-explanatory.

View file

@ -21,6 +21,9 @@ afpc \- fast ACK compatible Pascal compiler
.B \-w .B \-w
] ]
[ [
.B \-g
]
[
.B \-L .B \-L
] ]
[ [
@ -165,6 +168,9 @@ Verbose, no execute. Only print the commands, do not execute them.
.br .br
do not generate code to keep track of do not generate code to keep track of
the current location in the source code. the current location in the source code.
.IP \fB\-g\fP
.br
Produce symbolic debugging information for grind(1).
.IP \fB\-w\fP .IP \fB\-w\fP
.br .br
suppress warning messages. suppress warning messages.
@ -215,5 +221,7 @@ use \fIcompiler\fR as Modula-2 compiler instead of the default.
J.W. Stevenson, H. v. Eck, \fIAmsterdam Compiler Kit-Pascal reference manual\fP. J.W. Stevenson, H. v. Eck, \fIAmsterdam Compiler Kit-Pascal reference manual\fP.
.IP [2] .IP [2]
ack(1) unix manual page. ack(1) unix manual page.
.IP [3]
grind(1) unix manual page.
.SH DIAGNOSTICS .SH DIAGNOSTICS
Diagnostics are intended to be self-explanatory. Diagnostics are intended to be self-explanatory.

View file

@ -49,7 +49,11 @@ int kids = -1;
int ecount = 0; int ecount = 0;
struct arglist CPP_FLAGS = { struct arglist CPP_FLAGS = {
#ifdef FCC
7, 7,
#else
13,
#endif
{ {
"-D__unix", "-D__unix",
"-D_EM_WSIZE=4", "-D_EM_WSIZE=4",
@ -58,6 +62,14 @@ struct arglist CPP_FLAGS = {
"-D_EM_LSIZE=4", "-D_EM_LSIZE=4",
"-D_EM_FSIZE=4", "-D_EM_FSIZE=4",
"-D_EM_DSIZE=8", "-D_EM_DSIZE=8",
#ifndef FCC
"-DEM_WSIZE=4",
"-DEM_PSIZE=4",
"-DEM_SSIZE=2",
"-DEM_LSIZE=4",
"-DEM_FSIZE=4",
"-DEM_DSIZE=8",
#endif
} }
}; };
@ -83,6 +95,7 @@ struct arglist CALL_VEC;
int o_flag = 0; int o_flag = 0;
int c_flag = 0; int c_flag = 0;
int g_flag = 0;
int v_flag = 0; int v_flag = 0;
int O_flag = 0; int O_flag = 0;
@ -132,6 +145,13 @@ lang_opt(str)
{ {
switch(str[1]) { switch(str[1]) {
case '-': /* debug options */ case '-': /* debug options */
append(&COMP_FLAGS, str);
return 1;
case 'a': /* ignore -ansi flag */
if (! strcmp(str, "-ansi")) {
return 1;
}
break;
case 'w': /* disable warnings */ case 'w': /* disable warnings */
if (str[2]) { if (str[2]) {
str[1] = '-'; str[1] = '-';
@ -235,7 +255,7 @@ main(argc, argv)
#endif FM2 #endif FM2
#ifdef FCC #ifdef FCC
strcat(INCLUDE, CCINCL); strcat(INCLUDE, CCINCL);
append(&COMPFLAGS, "-L"); append(&COMP_FLAGS, "-L");
#endif FCC #endif FCC
#ifdef FPC #ifdef FPC
INCLUDE[0] = '\0'; INCLUDE[0] = '\0';
@ -279,6 +299,10 @@ main(argc, argv)
case 'I': /* include directory */ case 'I': /* include directory */
append(&CPP_FLAGS, str); append(&CPP_FLAGS, str);
break; break;
case 'g': /* debugger support */
append(&COMP_FLAGS, str);
g_flag = 1;
break;
case 'o': /* target file */ case 'o': /* target file */
if (argc-- >= 0) { if (argc-- >= 0) {
o_flag = 1; o_flag = 1;
@ -370,7 +394,7 @@ main(argc, argv)
if (o_flag && c_flag) { if (o_flag && c_flag) {
f = o_FILE; f = o_FILE;
} }
else f = mkstr(ldfile, BASE, ".o", (char *)0); else f = mkstr(ldfile, BASE, ".", "o", (char *)0);
append(call, COMP); append(call, COMP);
#ifdef FCC #ifdef FCC
concat(call, &CPP_FLAGS); concat(call, &CPP_FLAGS);
@ -421,6 +445,7 @@ main(argc, argv)
#ifdef FPC #ifdef FPC
append(call, "-.p"); append(call, "-.p");
#endif #endif
if (g_flag) append(call, "-g");
concat(call, &LD_FLAGS); concat(call, &LD_FLAGS);
concat(call, &LDFILES); concat(call, &LDFILES);
if (runvec(call, (char *) 0) && GEN_LDFILES.al_argc == 1) if (runvec(call, (char *) 0) && GEN_LDFILES.al_argc == 1)

View file

@ -137,6 +137,6 @@
!File: dbsymtab.h !File: dbsymtab.h
#undef DBSYMTAB 1 /* ability to produce symbol table for debugger */ #define DBSYMTAB 1 /* ability to produce symbol table for debugger */

View file

@ -86,7 +86,7 @@
!File: dbsymtab.h !File: dbsymtab.h
#undef DBSYMTAB 1 /* ability to produce symbol table for debugger */ #define DBSYMTAB 1 /* ability to produce symbol table for debugger */
!File: use_insert.h !File: use_insert.h

View file

@ -58,4 +58,4 @@
!File: dbsymtab.h !File: dbsymtab.h
#undef DBSYMTAB 1 /* ability to produce symbol table for debugger */ #define DBSYMTAB 1 /* ability to produce symbol table for debugger */