Minutes of the 15 December 2011 Teleconference Austin-544 Page 1 of 1 Submitted by Andrew Josey, The Open Group. December 17 , 2011 Attendees Andrew Josey, The Open Group Don Cragun, PASC OR Mark Brown, IBM, TOG OR Jim Pugsley, Oracle Geoff Clare, The Open Group Eric Blake, Red Hat Nick Stoughton, USENIX, ISO/IEC OR Joerg Schilling, Fraunhofer Society The TC1-2008 Draft 4 document merger into the Base Specs is still progressing (currently in XSH letter F) and is expected to complete in January. * Old Business Bug 000073 wmemcmp C conflict? OPEN http://austingroupbugs.net/view.php?id=73 Joseph Myers had reported in mail seq 16937 that some changes had been made in this area. Andrew added the note to the bug, and Nick agreed to take an action to propose revised wording. Bug 0000251: Forbid newline, or even bytes 1 through 31 (inclusive), in filenames OPEN http://austingroupbugs.net/view.php?id=251 Don reported that he was still working on a proposal to address this and related bugs. Bug 0000330: In make, add support for assignments ":=", "+=", and "?=". Accepted as Marked http://austingroupbugs.net/view.php?id=330 t line 95484 (SYNOPSIS), change "[macro=value...]" to "[macro[::]=value...]". At line 95554-95556 (OPERANDS), change: "macro=value Macro definitions, as defined in Macros (on page 2914). If the target_name and macro=value operands are intermixed on the make utility command line, the results are unspecified." to: "macro=value macro::=value Delayed and immediate expansion macro definitions, as defined in Macros (on page 2914). Delayed and immediate expansion macro definitions can be intermixed, and shall be processed in the order they appear. If any macro definition appears after a target_name operand on the make utility command line, the results are unspecified." At line 95781-95786 (EXTENDED DESCRIPTION, after "Macros"), replace: "Macro definitions are in the form: string1 = [string2] The macro named string1 is defined as having the value of string2, where string2 is defined as all characters, if any, after the , up to a comment character (’#’) or an unescaped . Any characters immediately before or after the shall be ignored." with: "A macro can be one of two flavors, "delayed-expansion" or "immediate-expansion". The following form defines a delayed-expansion macro (replacing any previous definition of the macro named by string1): string1 = [string2] The following form defines an immediate-expansion macro (replacing any previous definition of the macro named by string1): string1 ::= [string2] The following form defines a delayed-expansion macro, but only if the macro named by string1 is not already defined: string1 ?= [string2] The macro named by string1 is defined as having the value of string2, where string2 is defined as all characters, if any, after the , up to a comment character (’#’) or an unescaped . Any characters immediately after the , or immediately before the , , or respectively, shall be ignored. The following form (the "append" form) appends additional text to the value of a macro: string1 += [string2] When using the append form: * If the macro named by string1 does not exist, this form shall be equivalent to the delayed-expansion form "string1 = string2". * If the macro named by string1 exists and is an immediate-expansion macro, then a or character followed by the evaluation of string2 shall be appended to the value currently assigned to the macro named by string1. * If the macro named by string1 exists and is a delayed-expansion macro, then a or character followed by the unevaluated string2 shall be appended to the value currently assigned to the macro named by string1. In all cases the value of string2 is defined as all characters, if any, after the , up to a comment character (’#’) or an unescaped . Any characters immediately after the or immediately before the shall be ignored." Before line 95797, insert: "* Immediate-expansion macros shall be evaluated immediately when the macro assignment is made, and this value shall be used as the replacement until the immediate-expansion macro is redefined." At line 95797, change "Macros after..." to "Delayed-expansion macros...". At line 95809-95811, change: "Macro expansions in string2 of macro definition lines shall be performed when the macro identified by string1 is expanded in a rule or command." to "Macro expansions in string2 of macro definition lines shall be performed according to the form used to define the macro. Immediate-expansion forms (including appending to an existing immediate-expansion macro) shall be expanded in the macro definition line, and shall not be re-expanded when used in a rule or command. Delayed-expansion forms (including appending to an existing delayed-expansion macro, and conditional assignment to a macro not previously existing) shall be expanded when the macro identified by string1 is expanded in a rule or command, and the result of the expansion shall be scanned for further macros." On line 96103 (APPLICATION USAGE), change: "Macros used within other macros shall be evaluated when the new macro is used rather than when the new macro is defined. Therefore: MACRO = value1 NEW = $(MACRO) MACRO = value2 target: echo $(NEW) would produce value2 and not value1 since NEW was not expanded until it was needed in the echo command line." to: "Delayed-expansion macros shall be evaluated when they are used rather than when they are defined. Therefore: MACRO = value1 IMMED ::= $(MACRO) DELAY = $(MACRO) MACRO = value2 target: echo $(IMMED) $(DELAY) would produce "value1 value2", since IMMED was expanded while MACRO was value1, but DELAY was not expanded until it was needed in the echo command line when MACRO was value2." After line 96368 (RATIONALE), add: "The traditional semantics of delayed-expansion macros has often been the source of subtle bugs for makefile writers not aware of those semantics. Furthermore, in implementations that support an extension of assigning the output of an arbitrary command to a macro definition, the use of delayed-expansion macros could result in an undesirable growth in execution time, as each use of the macro would re-run the arbitrary command. Historically, several implementations independently developed a form of immediate expansion, usually via the operator ':=', so that execution of an arbitrary command happens once at the definition of the macro rather than each use of the macro; however, there are subtle differences in the expansion rules of those various implementations when the expanded value of string2 contained a '$'. Other implementations used operator ':=' for conditional expansion, altogether unrelated to immediate-expansion macro definition. The standard developers felt that immediate-expansion semantics were useful enough to standardize, but requiring the semantics of any one implementation of ':=' would cause confusion in Makefiles written for other implementation semantics, necessitating a reader to determine if '.POSIX:' had been specified at the beginning of the file (or worse, at the beginning of some other file that then includes the fragment in question) to know which semantics would be in use. Therefore, the standard developers opted to require a new operator '::=' with specific semantics; this operator has semantics closest to the GNU make implementation of ':=', where '$' occurring in the immediate expansion of string2 are not further expanded in subsequent use of the macro, and it was felt that other implementations could easily support the required semantics. Implementations that previously provided ':=' as an extension are encouraged to leave this extension intact, with no change in the implementation's particular semantics, to avoid breaking non-portable makefiles that had been targetting that particular implementation. A portable makefile, with '.POSIX:' specified at the beginning, should not use the ':=' operator." *New business Bug 0000525: portable makefile example Accepted http://austingroupbugs.net/view.php?id=525 This item is tagged for TC2. Bug 0000523: Add support for special target .PHONY in make Accepted as Marked http://austingroupbugs.net/view.php?id=523 This item is tagged for Issue 8 At line 95610 [ASYNCHRONOUS EVENTS], change "or the target is a prerequisite of the special target .PRECIOUS" to "or the target is a prerequisite of the special targets .PHONY or .PRECIOUS" in describing when targets are not removed on receipt of signals. Prior to line 95740 [EXTENDED DESCRIPTION Target Rules], add .PHONY Prerequisites of this special target are targets themselves; these targets (known as /phony targets/) shall be considered always out-of-date when the make utility begins executing. If a phony target's commands are executed, that phony target shall then be considered up-to-date until the execution of make completes. Subsequent occurrences of .PHONY shall also apply these rules to the additional targets. A .PHONY special target with no prerequisites shall be ignored. If the "-t" option is specified, phony targets shall not be touched. Phony targets shall not be removed if make receives one of the asynchronous events explicitly described in the ASYNCHRONOUS EVENTS section. At line 95774, add ".PHONY," prior to ".POSIX" in the list of special targets that shall be specified without commands. After line 96368 [RATIONALE], add a new paragraph: Traditionally, constructs such as DIR: FORCE (commands) FORCE: were used to allow 'make DIR' to always run (commands); however, this depended on the user never creating a file named 'FORCE'. The addition of the .PHONY special target provides a more efficient manner of providing a target whose commands are always run, and where the user cannot create a file that influences behavior in an unexpected manner. Bug 0000522: Says shmat() returns -1 on error; should be (void*)-1 Accepted http://austingroupbugs.net/view.php?id=522 This item is marked for TC2-2008 Bug 0000521: Behaviour of !(command) should not be specified Accepted http://austingroupbugs.net/view.php?id=521 This item is marked for TC2-2008 An interpretation is required. Interpretation response: The standard states that !(command) shall be a negated subshell, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale: Requiring a negated subshell conflicts with shells that provide an extension of negated pathname expansion. Notes to the Editor (not part of this interpretation): After: [!] command1 [ | command2 ...] add a new paragraph: If the pipeline begins with the reserved word ! and command1 is a subshell command, the application shall ensure that the ( operator at the beginning of command1 is separated from the ! by one or more characters. The behavior of the reserved word ! immediately followed by the ( operator is unspecified. Cross-volume change to XRAT... At page 3665 line 124711 section C.2.9.2 after: The reserved word ! allows more flexible testing using AND and OR lists. append this to the sentence: The behavior of !( is unspecified because in the Korn Shell this introduces a negated pathname expansion. Portable applications need to separate the ! and ( to ensure the command is treated as a negated subshell. Next Steps ---------- The next call is on January 5 and will continue processing defect reports. This call will be for the regular 90 minutes. http://austingroupbugs.net See the calendar for the list of dialup numbers. An IRC channel will be available for the meeting irc://irc.freenode.org/austingroupbugs ICAL: http://www.google.com/calendar/ical/nvctqtstkuni3fab9k3jqtrt4g@group.calendar.google.com/public/basic XML: http://www.google.com/calendar/feeds/nvctqtstkuni3fab9k3jqtrt4g@group.calendar.google.com/public/basic