summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/config/configvers.h2
-rw-r--r--usr.sbin/config/mkmakefile.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h
index 5ecac09..7ff7581 100644
--- a/usr.sbin/config/configvers.h
+++ b/usr.sbin/config/configvers.h
@@ -49,5 +49,5 @@
*
* $FreeBSD$
*/
-#define CONFIGVERS 600004
+#define CONFIGVERS 600005
#define MAJOR_VERS(x) ((x) / 100000)
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 0bf5620..47a1db0 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -305,6 +305,7 @@ makeenv(void)
static void
read_file(char *fname)
{
+ char ifname[MAXPATHLEN];
FILE *fp;
struct file_list *tp;
struct device *dp;
@@ -318,6 +319,7 @@ read_file(char *fname)
err(1, "%s", fname);
next:
/*
+ * include "filename"
* filename [ standard | mandatory | optional ]
* [ dev* [ | dev* ... ] | profiling-routine ] [ no-obj ]
* [ compile-with "compile rule" [no-implicit-rule] ]
@@ -337,6 +339,18 @@ next:
;
goto next;
}
+ if (eq(wd, "include")) {
+ next_quoted_word(fp, wd);
+ if (wd == 0) {
+ printf("%s: missing include filename.\n", fname);
+ exit(1);
+ }
+ (void) snprintf(ifname, sizeof(ifname), "../../%s", wd);
+ read_file(ifname);
+ while (((wd = get_word(fp)) != (char *)EOF) && wd)
+ ;
+ goto next;
+ }
this = ns(wd);
next_word(fp, wd);
if (wd == 0) {
OpenPOWER on IntegriCloud