Anonymous | Login | 2024-03-29 09:36 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000763 | [1003.1(2008)/Issue 7] Shell and Utilities | Editorial | Clarification Requested | 2013-10-10 02:18 | 2019-06-10 08:55 | ||
Reporter | dwheeler | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | David A. Wheeler | ||||||
Organization | |||||||
User Reference | |||||||
Section | make | ||||||
Page Number | 2911 | ||||||
Line Number | 95628-95636 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | See Note: 0001949. | ||||||
Summary | 0000763: If rule has no prerequisites or commands, and target is non-existent, imagine it's been updated | ||||||
Description |
Many people want to have "make" dependencies automatically generated. However, many tools and approaches (such as automake) that do this depend on a poorly-documented interpretation of make's specification. I'd like to see this interpretation clarified and clearly stated. As explained in "Advanced Auto-Dependency Generation" (http://mad-scientist.net/make/autodep.html), [^] it's common to create a "dependency" file for each source file that contains the dependency statement for the target. This normally works, but it creates a serious problem when done the obvious way: "if you remove or rename a prerequisite file (say a C .h file), make will stop with a fatal error, complaining that the target doesn't exist". Tom Tromey found a solution, which appears to be the approach used by automake. IF you mention the file as a target in the makefile with no commands and no prerequisites, then if the file doesn't exist, make is supposed to silently pretend it was recreated. The same approach is recommended here: http://scottmcpeak.com/autodepend/autodepend.html [^] (and probably many other places). This solution works in GNU make, and I suspect it works in many makes. However, this solution assumes a particular interpretation of the rules in make's "EXTENDED DESCRIPTION" that is not immediately obvious from the POSIX text (at best). I'd like to see this stated clearly, so that it can be relied on by systems that automatically generate dependencies. |
||||||
Desired Action |
After "If there are no commands listed for the target, the target shall be treated as up-to-date." append the following: "If a target has no prerequisites or commands, and the target of the rule is a nonexistent file, then `make' imagines this target to have been updated whenever its rule is run. This implies that all targets depending on this one will always have their commands run." (Note that this text is similar to the GNU make section 4.7 text: http://www.gnu.org/software/make/manual/html_node/Force-Targets.html). [^] |
||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
Relationships | |||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2013-10-10 02:18 | dwheeler | New Issue | |
2013-10-10 02:18 | dwheeler | Status | New => Under Review |
2013-10-10 02:18 | dwheeler | Assigned To | => ajosey |
2013-10-10 02:18 | dwheeler | Name | => David A. Wheeler |
2013-10-10 02:18 | dwheeler | Section | => make |
2013-10-10 02:18 | dwheeler | Page Number | => 2911 |
2013-10-10 02:18 | dwheeler | Line Number | => 95628-95636 |
2013-10-31 16:22 | Don Cragun | Interp Status | => --- |
2013-10-31 16:22 | Don Cragun | Note Added: 0001949 | |
2013-10-31 16:22 | Don Cragun | Status | Under Review => Resolved |
2013-10-31 16:22 | Don Cragun | Resolution | Open => Accepted As Marked |
2013-10-31 16:23 | Don Cragun | Note Edited: 0001949 | |
2013-10-31 16:23 | Don Cragun | Note Edited: 0001949 | |
2013-10-31 16:24 | Don Cragun | Final Accepted Text | => See Note: 0001949. |
2013-10-31 16:24 | Don Cragun | Tag Attached: tc2-2008 | |
2013-11-07 09:35 | geoffclare | Note Added: 0001964 | |
2013-11-07 09:35 | geoffclare | Status | Resolved => Under Review |
2013-11-07 09:35 | geoffclare | Resolution | Accepted As Marked => Reopened |
2013-11-07 11:45 | shware_systems | Note Added: 0001965 | |
2013-11-07 16:27 | Don Cragun | Note Edited: 0001949 | |
2013-11-07 16:29 | Don Cragun | Status | Under Review => Resolved |
2013-11-07 16:29 | Don Cragun | Resolution | Reopened => Accepted As Marked |
2014-08-08 12:22 | eblake | Relationship added | related to 0000857 |
2019-06-10 08:55 | agadmin | Status | Resolved => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |