Date: Sat, 02 Dec 1995 12:42:52 EDT From: "Kaleb S. KEITHLEY" <kaleb@x.org> To: hackers@freefall.FreeBSD.org Subject: Minor change to make Message-ID: <199512021742.RAA14346@exalt.x.org>
next in thread | raw e-mail | index | archive | help
Who's Mr. /usr/bin/make?
I want make to silently ignore a failure to find a .include file. The
reason I want this is because in the next release of X imake will generate
Makefiles that can use include files for dependencies if the system's make
supports it.
N.B. ClearMake, SGI, and Digital, makes all have include directives that
silently ignore a failure to find the include file, so this isn't a new
idea. And if you think about it, it's really a necessity to ignore the
failure otherwise you have a chick-or-the-egg problem when you try to do
a `make depend` to generate the include file.
I've appended a trivial patch to the end that gives me what I want. If
this isn't acceptable for some reason I would consider an alternative
directive, e.g. `.sinclude' (documented of course, and I'd do the work)
that does what I want.
Comments?
--
Kaleb KEITHLEY
X Consortium
(note that this patch intentionally does not change the behavior in the
undocumented traditional SYSV include directive processing, although
maybe it should.)
diff -c usr.bin/make/parse.c.orig usr.bin/make/parse.c
*** usr.bin/make/parse.c.orig Sat Dec 2 07:35:46 1995
--- usr.bin/make/parse.c Sat Dec 2 08:08:34 1995
***************
*** 37,43 ****
*/
#ifndef lint
! static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#endif /* not lint */
/*-
--- 37,43 ----
*/
#ifndef lint
! static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94 frob";
#endif /* not lint */
/*-
***************
*** 1685,1691 ****
--- 1685,1693 ----
if (fullname == (char *) NULL) {
*cp = endc;
+ #if WANT_FATAL_INCLUDE_FAILURE
Parse_Error (PARSE_FATAL, "Could not find %s", file);
+ #endif
return;
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512021742.RAA14346>
