Some more tidying up. we dont use config-dependent anyware. Eliminate

some duplicate code (cut/paste bug?). tidy up some other minor stuff.
This commit is contained in:
Peter Wemm 2001-02-28 02:53:32 +00:00
parent 9f8cda5dbe
commit f9f6bfe762
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73204
2 changed files with 8 additions and 22 deletions

View File

@ -67,18 +67,16 @@ struct file_list {
/*
* Attributes (flags).
*/
#define CONFIGDEP 1
#define NO_IMPLCT_RULE 2
#define NO_OBJ 4
#define BEFORE_DEPEND 8
#define NEED_COUNT 16
#define ISDUP 32
#define NO_IMPLCT_RULE 1
#define NO_OBJ 2
#define BEFORE_DEPEND 4
#define NEED_COUNT 8
#define ISDUP 16
struct device {
int d_done; /* processed */
char *d_name; /* name of device (e.g. rk11) */
int d_count; /* device count */
#define QUES -1 /* -1 means '?' */
#define UNKNOWN -2 /* -2 means not set yet */
struct device *d_next; /* Next one in list */
};

View File

@ -265,7 +265,7 @@ read_files(void)
struct opt *op;
char *wd, *this, *needs, *compilewith, *depends, *clean, *warning;
char fname[MAXPATHLEN];
int nreqs, first = 1, configdep, isdup, std, filetype,
int nreqs, first = 1, isdup, std, filetype,
imp_rule, no_obj, needcount, before_depend, mandatory;
ftab = 0;
@ -281,7 +281,6 @@ read_files(void)
next:
/*
* filename [ standard | mandatory | optional | count ]
* [ config-dependent ]
* [ dev* | profiling-routine ] [ no-obj ]
* [ compile-with "compile rule" [no-implicit-rule] ]
* [ dependency "dependency-list"] [ before-depend ]
@ -328,7 +327,6 @@ read_files(void)
depends = 0;
clean = 0;
warning = 0;
configdep = 0;
needs = 0;
std = mandatory = 0;
imp_rule = 0;
@ -356,10 +354,6 @@ read_files(void)
next_word(fp, wd);
if (wd == 0)
goto doneparam;
if (eq(wd, "config-dependent")) {
configdep++;
goto nextparam;
}
if (eq(wd, "no-obj")) {
no_obj++;
goto nextparam;
@ -494,18 +488,12 @@ read_files(void)
tp->f_fn = this;
tp->f_type = filetype;
tp->f_flags &= ~ISDUP;
if (configdep)
tp->f_flags |= CONFIGDEP;
if (imp_rule)
tp->f_flags |= NO_IMPLCT_RULE;
if (no_obj)
tp->f_flags |= NO_OBJ;
if (before_depend)
tp->f_flags |= BEFORE_DEPEND;
if (imp_rule)
tp->f_flags |= NO_IMPLCT_RULE;
if (no_obj)
tp->f_flags |= NO_OBJ;
if (needcount)
tp->f_flags |= NEED_COUNT;
tp->f_needs = needs;
@ -697,8 +685,8 @@ do_rules(FILE *f)
printf("config: don't know rules for %s\n", np);
break;
}
(void)snprintf(cmd, sizeof(cmd), "${%s_%c%s}", ftype, toupper(och),
ftp->f_flags & CONFIGDEP? "_C" : "");
snprintf(cmd, sizeof(cmd), "${%s_%c}", ftype,
toupper(och));
compilewith = cmd;
}
*cp = och;