Added some mkdep features and fixed a bug

This commit is contained in:
ceriel
1990-01-26 11:53:08 +00:00
parent f5b29d9ccc
commit b48f529177
4 changed files with 38 additions and 11 deletions

View File

@@ -10,6 +10,7 @@
#include "class.h"
#include "macro.h"
#include "idf.h"
#include "mkdep.h"
char options[128]; /* one for every char */
int inc_pos = 1; /* place where next -I goes */
@@ -25,13 +26,19 @@ do_option(text)
{
switch(*text++) {
case '-':
#ifdef MKDEP
case 'x':
#endif
options[*text] = 1;
break;
default:
#ifndef MKDEP
error("illegal option: %c", text[-1]);
#endif
break;
case 'C' : /* comment output */
options['C'] = 1;
case 'P' : /* run preprocessor stand-alone, without #'s */
options[*(text-1)] = 1;
break;
case 'D' : /* -Dname : predefine name */
{
@@ -98,9 +105,6 @@ do_option(text)
idfsize = 8;
}
break;
case 'P' : /* run preprocessor stand-alone, without #'s */
options['P'] = 1;
break;
case 'U' : /* -Uname : undefine predefined */
if (*text) {
register struct idf *idef = findidf(text);