Anonymous | Login | 2023-12-05 06:43 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 | ||
0001549 | [1003.1(2016/18)/Issue7+TC2] Shell and Utilities | Editorial | Clarification Requested | 2022-01-13 16:18 | 2022-05-19 08:39 | ||
Reporter | dmitry_goncharov | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Applied | ||||||
Name | Dmitry Goncharov | ||||||
Organization | |||||||
User Reference | |||||||
Section | Makefile Syntax | ||||||
Page Number | 2973 | ||||||
Line Number | 98627 | ||||||
Interp Status | Approved | ||||||
Final Accepted Text | Note: 0005754 | ||||||
Summary | 0001549: Escaped newline in macro expansion in command line. | ||||||
Description |
Section "Makefile Syntax" says "When an escaped <newline> is found in a command line in a makefile, the command line shall contain the <backslash>, the <newline>, and the next line..." Consider the following example .POSIX: M=word N=${M:word=a\ b} all:; echo ${N} ${M:word=a\ b} Does posix require that in this example N and M expand to different values? i tested gmake, bmake, sun make and aix make. gmake and bmake both replace the newline with a space and pass 'a b a b' to the shell. sun make fails to find the closing brace and exits with an error message. aix make removes the newline and passes 'a b ab' to the shell. in the following example all:; echo 'a\ b' gmake and sun make both pass 'a\ b' to the shell. bmake passes 'a b' to the shell. aix make passes 'ab' to the shell. i think gnu make's behavior is correct. Otherwise, variable expansion becomes context dependent and who needs that complication? Gnu make manual is quite explicit 5.1.2 says "Variable and function references in recipes have identical syntax and semantics to references elsewhere in the makefile." |
||||||
Desired Action |
Modify the text quoted above like this "After all macro expansion is complete, when an escaped <newline> is found in a command line in a makefile, the command line shall contain the <backslash>, the <newline>, and the next line, except that the first character of the next line shall not be included if it is a <tab>". |
||||||
Tags | tc3-2008 | ||||||
Attached Files | |||||||
|
![]() |
|||
Date Modified | Username | Field | Change |
2022-01-13 16:18 | dmitry_goncharov | New Issue | |
2022-01-13 16:18 | dmitry_goncharov | Name | => Dmitry Goncharov |
2022-01-13 16:18 | dmitry_goncharov | URL | => https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html [^] |
2022-01-13 16:18 | dmitry_goncharov | Section | => Makefile Syntax |
2022-01-14 09:46 | geoffclare | Project | Online Pubs => 1003.1(2016/18)/Issue7+TC2 |
2022-01-14 09:47 | geoffclare | Page Number | => 2973 |
2022-01-14 09:47 | geoffclare | Line Number | => 98627 |
2022-01-14 09:47 | geoffclare | Interp Status | => --- |
2022-01-14 09:47 | geoffclare | Note Added: 0005604 | |
2022-01-14 09:53 | geoffclare | Note Added: 0005605 | |
2022-01-14 14:14 | psmith | Note Added: 0005606 | |
2022-01-14 20:31 | dmitry_goncharov | Note Added: 0005609 | |
2022-03-17 16:14 | geoffclare | Note Added: 0005754 | |
2022-03-17 16:15 | geoffclare | Interp Status | --- => Pending |
2022-03-17 16:15 | geoffclare | Final Accepted Text | => Note: 0005754 |
2022-03-17 16:15 | geoffclare | Status | New => Interpretation Required |
2022-03-17 16:15 | geoffclare | Resolution | Open => Accepted As Marked |
2022-03-17 16:15 | geoffclare | Tag Attached: tc3-2008 | |
2022-03-25 17:08 | agadmin | Interp Status | Pending => Proposed |
2022-03-25 17:08 | agadmin | Note Added: 0005763 | |
2022-04-26 12:02 | agadmin | Interp Status | Proposed => Approved |
2022-04-26 12:02 | agadmin | Note Added: 0005822 | |
2022-05-19 08:39 | geoffclare | Status | Interpretation Required => Applied |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |