summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-02-28 02:53:32 +0000
committerpeter <peter@FreeBSD.org>2001-02-28 02:53:32 +0000
commitb31794bc17abbe5f5aec97c5172725ab3fbb9443 (patch)
tree77235c406a449d19ed405cb3c9d274efce827971 /usr.sbin/config
parent5e2296a1b5447c6c40e0011ae1fdc60467a8d60e (diff)
downloadFreeBSD-src-b31794bc17abbe5f5aec97c5172725ab3fbb9443.zip
FreeBSD-src-b31794bc17abbe5f5aec97c5172725ab3fbb9443.tar.gz
Some more tidying up. we dont use config-dependent anyware. Eliminate
some duplicate code (cut/paste bug?). tidy up some other minor stuff.
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/config.h12
-rw-r--r--usr.sbin/config/mkmakefile.c18
2 files changed, 8 insertions, 22 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h
index 2a2dfb4..b4efafb 100644
--- a/usr.sbin/config/config.h
+++ b/usr.sbin/config/config.h
@@ -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 */
};
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index bb61938..3d486d4 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -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 @@ openit:
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 @@ next:
depends = 0;
clean = 0;
warning = 0;
- configdep = 0;
needs = 0;
std = mandatory = 0;
imp_rule = 0;
@@ -356,10 +354,6 @@ nextparam:
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 @@ doneparam:
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;
OpenPOWER on IntegriCloud