change to config(8) to help with linting the kernel.

Mark Murray mark at grondar.org
Sat Jun 14 10:54:55 PDT 2003


Hiya

The enclosed diff (a not very pretty hack) causes config(8) to
emit targets to enable .ln files to be built for linting. It is
not very pretty because
1) it can't use a "lint/nolint" flag in the conf/files.* flag
   because that would take a hectic redesign of config.
2) it therefore emits *.ln-building rules for _all_ targets.
   this is overkill for .s files, but it does not break things,
   as these files are never linted.

Comments?

M
--
Mark Murray
iumop ap!sdn w,I idlaH
-------------- next part --------------
Index: mkmakefile.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/config/mkmakefile.c,v
retrieving revision 1.76
diff -u -d -r1.76 mkmakefile.c
--- mkmakefile.c	24 Apr 2003 00:52:58 -0000	1.76
+++ mkmakefile.c	30 Apr 2003 13:38:16 -0000
@@ -707,12 +707,20 @@
 					tail(np), np);
 				continue;
 			}
-			if (ftp->f_depends)
+			if (ftp->f_depends) {
+				fprintf(f, "%sln: $S/%s%c %s\n", tail(np),
+					np, och, ftp->f_depends);
+				fprintf(f, "\t${NORMAL_LINT}\n\n");
 				fprintf(f, "%so: $S/%s%c %s\n", tail(np),
 					np, och, ftp->f_depends);
-			else
+			}
+			else {
+				fprintf(f, "%sln: $S/%s%c\n", tail(np),
+					np, och);
+				fprintf(f, "\t${NORMAL_LINT}\n\n");
 				fprintf(f, "%so: $S/%s%c\n", tail(np),
 					np, och);
+			}
 		}
 		tp = tail(np);
 		compilewith = ftp->f_compilewith;


More information about the freebsd-arch mailing list