If a ${KERNEL}.hints file exists, and no hints are specified explicitly,

then include the hints with a marker indicating that it is a fallback.
The kernel side of this is to come shortly.
This commit is contained in:
Peter Wemm 2000-08-25 19:30:03 +00:00
parent 6c243dd175
commit 596feda554
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65091
8 changed files with 18 additions and 6 deletions

View File

@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500002
%VERSREQ= 500003
# Can be overridden by makeoptions or /etc/make.conf
KERNEL?= kernel

View File

@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500002
%VERSREQ= 500003
# Can be overridden by makeoptions or /etc/make.conf
KERNEL?= kernel

View File

@ -19,7 +19,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500002
%VERSREQ= 500003
# Can be overridden by makeoptions or /etc/make.conf
KERNEL?= kernel

View File

@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
%VERSREQ= 500002
%VERSREQ= 500003
# Can be overridden by makeoptions or /etc/make.conf
KERNEL?= kernel

View File

@ -131,6 +131,7 @@ struct opt_list {
extern char *ident;
extern char *hints;
extern int do_trace;
extern int hintmode;
char *get_word(FILE *);
char *get_quoted_word(FILE *);

View File

@ -75,6 +75,7 @@ static struct device *curp = 0;
struct device *dtab;
char *ident;
char *hints;
int hintmode;
int yyline;
struct file_list *ftab;
char errbuf[80];
@ -142,7 +143,10 @@ Config_spec:
MAXUSERS NUMBER
= { maxusers = $2; } |
HINTS ID
= { hints = $2; };
= {
hints = $2;
hintmode = 1;
};
System_spec:
CONFIG System_id System_parameter_list

View File

@ -8,4 +8,4 @@
*
* $FreeBSD$
*/
#define CONFIGVERS 500002
#define CONFIGVERS 500003

View File

@ -225,6 +225,13 @@ makefile(void)
ofp = fopen(path("hints.c.new"), "w");
if (ofp == NULL)
err(1, "%s", path("hints.c.new"));
if (hintmode == 0) {
snprintf(line, sizeof(line), "%s.hints", PREFIX);
ifp = fopen(line, "r");
if (ifp)
hintmode = 2;
}
fprintf(ofp, "int hintmode = %d;\n", hintmode);
fprintf(ofp, "char static_hints[] = {\n");
if (ifp) {
while (fgets(line, BUFSIZ, ifp) != 0) {