summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/conf/Makefile.alpha8
-rw-r--r--sys/conf/Makefile.i3868
-rw-r--r--sys/conf/Makefile.ia648
-rw-r--r--sys/conf/Makefile.pc988
-rw-r--r--sys/conf/Makefile.powerpc8
-rw-r--r--usr.sbin/config/configvers.h2
-rw-r--r--usr.sbin/config/mkmakefile.c80
7 files changed, 39 insertions, 83 deletions
diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha
index 3a8b051d0576..5115e0b6012d 100644
--- a/sys/conf/Makefile.alpha
+++ b/sys/conf/Makefile.alpha
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500004
+%VERSREQ= 500005
# Can be overridden by makeoptions or /etc/make.conf
KERNEL_KO?= kernel
@@ -100,11 +100,11 @@ SYSTEM_DEP+= $S/conf/ldscript.$M
%OBJS
-%CFILES
+%FILES.c
-%SFILES
+%FILES.s
-%MFILES
+%FILES.m
%CLEAN
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386
index 512eaabe5221..cb0809c2824d 100644
--- a/sys/conf/Makefile.i386
+++ b/sys/conf/Makefile.i386
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500004
+%VERSREQ= 500005
# Can be overridden by makeoptions or /etc/make.conf
KERNEL_KO?= kernel
@@ -104,11 +104,11 @@ SYSTEM_DEP+= $S/conf/ldscript.$M
%OBJS
-%CFILES
+%FILES.c
-%SFILES
+%FILES.s
-%MFILES
+%FILES.m
%CLEAN
diff --git a/sys/conf/Makefile.ia64 b/sys/conf/Makefile.ia64
index f114cde635d2..0ce9d56f731c 100644
--- a/sys/conf/Makefile.ia64
+++ b/sys/conf/Makefile.ia64
@@ -27,7 +27,7 @@ OBJCOPY= ia64-unknown-linux-objcopy
MACHINE_ARCH= ia64
# Which version of config(8) is required.
-%VERSREQ= 500004
+%VERSREQ= 500005
# Can be overridden by makeoptions or /etc/make.conf
KERNEL_KO?= kernel
@@ -110,11 +110,11 @@ SYSTEM_DEP+= $S/conf/ldscript.$M
%OBJS
-%CFILES
+%FILES.c
-%SFILES
+%FILES.s
-%MFILES
+%FILES.m
%CLEAN
diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98
index f2bd1455f09a..37110a5e2377 100644
--- a/sys/conf/Makefile.pc98
+++ b/sys/conf/Makefile.pc98
@@ -19,7 +19,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500004
+%VERSREQ= 500005
# Can be overridden by makeoptions or /etc/make.conf
KERNEL_KO?= kernel
@@ -106,11 +106,11 @@ SYSTEM_DEP+= $S/conf/ldscript.$M
%OBJS
-%CFILES
+%FILES.c
-%SFILES
+%FILES.s
-%MFILES
+%FILES.m
%CLEAN
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc
index 512eaabe5221..cb0809c2824d 100644
--- a/sys/conf/Makefile.powerpc
+++ b/sys/conf/Makefile.powerpc
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500004
+%VERSREQ= 500005
# Can be overridden by makeoptions or /etc/make.conf
KERNEL_KO?= kernel
@@ -104,11 +104,11 @@ SYSTEM_DEP+= $S/conf/ldscript.$M
%OBJS
-%CFILES
+%FILES.c
-%SFILES
+%FILES.s
-%MFILES
+%FILES.m
%CLEAN
diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h
index 40226d7776f7..a9a6faceee30 100644
--- a/usr.sbin/config/configvers.h
+++ b/usr.sbin/config/configvers.h
@@ -8,4 +8,4 @@
*
* $FreeBSD$
*/
-#define CONFIGVERS 500004
+#define CONFIGVERS 500005
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index e52c78a747ce..bf0de8c9a6b2 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -74,9 +74,7 @@ static struct file_list *fcur;
static char *tail(char *);
static void do_clean(FILE *);
static void do_rules(FILE *);
-static void do_sfiles(FILE *);
-static void do_mfiles(FILE *);
-static void do_cfiles(FILE *);
+static void do_xxfiles(char *, FILE *);
static void do_objs(FILE *);
static void do_before_depend(FILE *);
static int opteq(char *, char *);
@@ -183,12 +181,8 @@ makefile(void)
do_before_depend(ofp);
else if (eq(line, "%OBJS\n"))
do_objs(ofp);
- else if (eq(line, "%MFILES\n"))
- do_mfiles(ofp);
- else if (eq(line, "%CFILES\n"))
- do_cfiles(ofp);
- else if (eq(line, "%SFILES\n"))
- do_sfiles(ofp);
+ else if (strncmp(line, "%FILES.", 7) == 0)
+ do_xxfiles(line, ofp);
else if (eq(line, "%RULES\n"))
do_rules(ofp);
else if (eq(line, "%CLEAN\n"))
@@ -644,17 +638,28 @@ do_objs(FILE *fp)
}
static void
-do_cfiles(FILE *fp)
+do_xxfiles(char *tag, FILE *fp)
{
struct file_list *tp;
- int lpos, len;
+ int lpos, len, slen;
+ char *suff, *SUFF;
+
+ if (tag[strlen(tag) - 1] == '\n')
+ tag[strlen(tag) - 1] = '\0';
+
+ suff = ns(tag + 7);
+ SUFF = ns(suff);
+ raisestr(SUFF);
+ slen = strlen(suff);
- fputs("CFILES=", fp);
+ fprintf(fp, "%sFILES=", SUFF);
lpos = 8;
for (tp = ftab; tp; tp = tp->f_next)
if (tp->f_type != INVISIBLE && tp->f_type != NODEPEND) {
len = strlen(tp->f_fn);
- if (tp->f_fn[len - 1] != 'c')
+ if (tp->f_fn[len - slen - 1] != '.')
+ continue;
+ if (strcasecmp(&tp->f_fn[len - slen], suff) != 0)
continue;
if ((len = 3 + len) + lpos > 72) {
lpos = 8;
@@ -664,55 +669,6 @@ do_cfiles(FILE *fp)
fprintf(fp, "$S/%s ", tp->f_fn);
else
fprintf(fp, "%s ", tp->f_fn);
-
- lpos += len + 1;
- }
- if (lpos != 8)
- putc('\n', fp);
-}
-
-static void
-do_mfiles(FILE *fp)
-{
- struct file_list *tp;
- int lpos, len;
-
- fputs("MFILES=", fp);
- lpos = 8;
- for (tp = ftab; tp; tp = tp->f_next)
- if (tp->f_type != INVISIBLE) {
- len = strlen(tp->f_fn);
- if (tp->f_fn[len - 1] != 'm' || tp->f_fn[len - 2] != '.')
- continue;
- if ((len = 3 + len) + lpos > 72) {
- lpos = 8;
- fputs("\\\n\t", fp);
- }
- fprintf(fp, "$S/%s ", tp->f_fn);
- lpos += len + 1;
- }
- if (lpos != 8)
- putc('\n', fp);
-}
-
-static void
-do_sfiles(FILE *fp)
-{
- struct file_list *tp;
- int lpos, len;
-
- fputs("SFILES=", fp);
- lpos = 8;
- for (tp = ftab; tp; tp = tp->f_next)
- if (tp->f_type != INVISIBLE) {
- len = strlen(tp->f_fn);
- if (tp->f_fn[len - 1] != 'S' && tp->f_fn[len - 1] != 's')
- continue;
- if ((len = 3 + len) + lpos > 72) {
- lpos = 8;
- fputs("\\\n\t", fp);
- }
- fprintf(fp, "$S/%s ", tp->f_fn);
lpos += len + 1;
}
if (lpos != 8)