View Issue Details

IDProjectCategoryView StatusLast Update
00003331003.1(2008)/Issue 7Shell and Utilitiespublic2024-06-11 08:53
Reporterdwheeler Assigned Toajosey  
PrioritynormalSeverityObjectionTypeEnhancement Request
Status ClosedResolutionAccepted As Marked 
NameDavid A. Wheeler
Organization
User Reference
Sectionmake
Page Number2912
Line Number95668
Interp Status---
Final Accepted TextSee 0000333:0000593
Summary0000333: Add support for silent includes using "-include"
DescriptionThe current specification for make permits "include", but does not have a "silent include" that ignores errors files do not exist. This is a disaster for automatically generating dependencies; a makefile could say "include DEPEND", but if DEPEND does not exist, the include fails, and thus any run using the makefile fails. But if the makefile is supposed to create DEPEND, we are unable to create DEPEND in the first place. For examples where this is important, see:
http://www.xs4all.nl/~evbergen/nonrecursive-make.html

GNU make supports both "-include" and "sinclude" for this purpose (see http://www.gnu.org/software/automake/manual/make/Include.html).
According to this message:
 http://marc.info/?l=freebsd-standards&m=118891505208650
NetBSD has added it, and FreeBSD has a patch available to support it.

This proposal suggests adding just "-include", but supporting "sinclude" (as well) would be fine. This already exists in implementations, we just need to get it into the standard itself.
Desired ActionLine 95668:
After "If the word include"
append "(optionally prefixed with '-')"


Line 95686: At the end, append:
"If the file(s) do not exist, and the word include was prefixed with '-', the
include command is ignored.
"If the file(s) do not exist, and the word include was not prefixed with '-', the processing ends in failure."
Tagsissue8

Relationships

related to 0000518 Closedajosey Allow make's "include" to include multiple files 

Activities

nick

2010-10-28 16:43

manager   bugnote:0000593

Proposed new wording:

At line 95668, change:
  If the word include appears at the beginning of a line
to
  If the word include (optionally prefixed with a <hyphen> character) appears at the beginning of a line

At line 95863, add the following:

"If the file cannot be opened, and if the word include was prefixed with a <hyphen> character, the file shall be ignored. Otherwise, if the file cannot be opened an error occurs."

geoffclare

2020-02-07 10:40

manager   bugnote:0004773

While preparing to apply this bug I noticed a typo in 0000333:0000593. Line 95863 should be 95683.

Also, the parentheses should instead be commas so that the text is normative.

These are editorial matters that I thought worth mentioning here, but not worth reopening the bug for.

Issue History

Date Modified Username Field Change
2010-10-13 04:39 dwheeler New Issue
2010-10-13 04:39 dwheeler Status New => Under Review
2010-10-13 04:39 dwheeler Assigned To => ajosey
2010-10-13 04:39 dwheeler Name => David A. Wheeler
2010-10-13 04:39 dwheeler Section => make
2010-10-13 04:39 dwheeler Page Number => 2912
2010-10-13 04:39 dwheeler Line Number => 95668
2010-10-28 16:43 nick Note Added: 0000593
2010-12-16 17:14 Don Cragun Interp Status => ---
2010-12-16 17:14 Don Cragun Final Accepted Text => See 0000333:0000593
2010-12-16 17:14 Don Cragun Status Under Review => Resolved
2010-12-16 17:14 Don Cragun Resolution Open => Accepted As Marked
2010-12-16 17:14 Don Cragun Tag Attached: issue8
2020-02-07 10:40 geoffclare Note Added: 0004773
2020-02-10 12:28 geoffclare Status Resolved => Applied
2020-03-18 15:21 geoffclare Relationship added related to 0000518
2024-06-11 08:53 agadmin Status Applied => Closed