Bug 116081 - make does not work with the directive sinclude
Summary: make does not work with the directive sinclude
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-04 15:10 UTC by Roy Marples
Modified: 2018-02-18 07:33 UTC (History)
3 users (show)

See Also:


Attachments
file.txt (1.63 KB, text/plain)
2007-09-04 15:10 UTC, Roy Marples
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Marples 2007-09-04 15:10:01 UTC
Makefiles commonly need to include files. Sometimes they need to optionally include a file. There is currently no standard way of including an optional file in FreeBSD make that also works with other make systems.

NetBSD have updated their make so that either sinclude or -include directives work in Makefiles.

Fix: Attached is a patch that mirrors the fix found in NetBSD make.

Patch attached with submission follows:
Comment 1 Garrett Cooper 2011-01-31 04:49:13 UTC
    Apart from the fact that the patch isn't style(9) conformant, I
think this is a worthy enhancement to have in make(1). Why hasn't it
been integrated yet (and FWIW why is it under standards/ anyhow)?
Thanks!
-Garrett
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2014-06-15 07:38:51 UTC
This feature is available in later versions of fmake and in bmake (which is now the default make in 11-CURRENT). Please mark this bug resolved fixed.
Comment 3 David Chisnall freebsd_committer freebsd_triage 2014-06-15 10:28:10 UTC
POSIX does not describe *any* mechanism for includes in Makefiles, so reassigning this from standards.
Comment 4 Enji Cooper freebsd_committer freebsd_triage 2014-06-15 11:37:44 UTC
Indeed. It was discussed a couple years ago but never made it into an official standard: http://article.gmane.org/gmane.comp.standards.posix.austin.general/3225/match=sinclude
Comment 5 Alex Kozlov freebsd_committer freebsd_triage 2018-02-18 07:33:04 UTC
Fixed in all supported versions of FreeBSD after bmake import.