diff --git a/usr.bin/xlint/xlint/lint.1 b/usr.bin/xlint/xlint/lint.1 index 1a266d61f0d9..9feada1103ab 100644 --- a/usr.bin/xlint/xlint/lint.1 +++ b/usr.bin/xlint/xlint/lint.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: lint.1,v 1.27 2003/04/08 21:09:40 wiz Exp $ +.\" $NetBSD: lint.1,v 1.28 2004/01/26 21:51:11 dsl Exp $ .\" .\" Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. .\" Copyright (c) 1994, 1995 Jochen Pohl @@ -46,6 +46,9 @@ .Op Fl i | Fl nu .Ek .Bk -words +.Op Fl MD +.Ek +.Bk -words .Op Fl D Ar name Ns Op =def .Ek .Bk -words @@ -79,6 +82,9 @@ .Op Fl s | Fl t | Fl S .Ek .Bk -words +.Op Fl MD +.Ek +.Bk -words .Fl C Ar library .Ek .Bk -words @@ -389,6 +395,13 @@ If a complaint stems from an included file .Nm prints the name of the included file instead of the source file name followed by a question mark. +.It Fl MD +Pass +.Fl MD +to +.Xr cpp 1 +causing cpp to create files containing dependency information for +each source file. .It Fl o Ns Ar outputfile Name the output file .Ar outputfile . diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c index d99a2ec0263a..837dcc50fbbd 100644 --- a/usr.bin/xlint/xlint/xlint.c +++ b/usr.bin/xlint/xlint/xlint.c @@ -1,4 +1,4 @@ -/* $NetBSD: xlint.c,v 1.33 2003/10/27 00:12:44 lukem Exp $ */ +/* $NetBSD: xlint.c,v 1.34 2004/01/26 21:51:11 dsl Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -34,7 +34,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: xlint.c,v 1.33 2003/10/27 00:12:44 lukem Exp $"); +__RCSID("$NetBSD: xlint.c,v 1.34 2004/01/26 21:51:11 dsl Exp $"); #endif #include @@ -363,7 +363,7 @@ main(int argc, char *argv[]) (void)signal(SIGINT, terminate); (void)signal(SIGQUIT, terminate); (void)signal(SIGTERM, terminate); - while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:SU:VX:")) != -1) { + while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:M:SU:VX:")) != -1) { switch (c) { case 'a': @@ -473,6 +473,7 @@ main(int argc, char *argv[]) case 'D': case 'I': + case 'M': case 'U': (void)sprintf(flgbuf, "-%c", c); appstrg(&cflags, concat2(flgbuf, optarg));