Minutes of the 5th November 2020 Teleconference Austin-1078 Page 1 of 1 Submitted by Andrew Josey, The Open Group. 7th November 2020 Attendees: Nick Stoughton, USENIX, ISO/IEC JTC 1/SC 22 OR Don Cragun, IEEE PASC OR Geoff Clare, The Open Group Richard Hansen Eric Blake, Red Hat, The Open Group OR Joerg Schilling, FOKUS Fraunhofer Andrew Josey, The Open Group (late) Paul Smith Apologies: Tom Thompson, IEEE Eric Ackermann, HPI, University of Potsdam * General news Andrew noted that the New APIs draft has been prepared and circulated for informal comments to The Open Group Base Working Group. * Outstanding actions (Please note that this section has been flushed to shorten the minutes - to locate the previous set of outstanding actions, look to the minutes from 13th June 2019 and earlier) Bug 1254: "asynchronous list" description uses "command" instead of "AND-OR list" OPEN https://austingroupbugs.net/view.php?id=1254 Action: Joerg to investigate how his shell behaves. Bug 700 - Nick to raise this issue with the C committee Bug 713 - Nick to raise with the C committee. Bug 739 - Nick to raise with the C committee. * Current Business Bug 1325: Allow make to remake an included file Accepted as Marked https://austingroupbugs.net/view.php?id=1325 This item is tagged for Issue 8. Page and line numbers are for Issue 8 draft 1. On page 2888 line 96923 (make -n option), change: However, lines with a ('+') prefix shall be executed. to: However, lines with a ('+') prefix and lines being processed in order to create an include file or to bring it up-to-date (see Include Lines in the EXTENDED DESCRIPTION section) shall be executed. On page 2889 lines 96929-96931 (make -q option), after: However, a makefile command line (associated with the targets) with a ('+') prefix shall be executed add: and it is unspecified whether command lines that do not have a prefix and are being processed in order to create an include file or to bring it up-to-date (see Include Lines in the EXTENDED DESCRIPTION section) are executed On page 2889 lines 96943-96944 (make -t option), after: However, a command line with a ('+') prefix shall be executed. add: and it is unspecified whether command lines that do not have a prefix and are being processed in order to create an include file or to bring it up-to-date (see Include Lines in the EXTENDED DESCRIPTION section) are executed On page 2891 lines 97033-97035 (make extended description), after: A target shall be considered up-to-date if it exists and is newer than all of its dependencies, or if it has already been made up-to-date by the current invocation of make (regardless of the target's existence or age) add: , except that targets that are made up-to-date in order for them to be processed as include line pathnames (see Include Lines below) need not be considered up-to-date during later processing On page 2892 lines 97097-97102 (make extended description), change: Each pathname that does not begin with a '/' shall be treated as relative to the current working directory of the process, not relative to the directory containing the makefile. If the file does not exist in this location, it is unspecified whether additional directories are searched. If the file cannot be opened, and if the word include was prefixed with a character, the file shall be ignored. Otherwise, if the file cannot be opened an error shall occur. to: If the pathname does not begin with a '/', it shall be treated as relative to the current working directory of the process, not relative to the directory containing the makefile. The make utility shall use one of the following two methods to attempt to create the file or bring it up-to-date: The ``immediate remaking'' method If make uses this method, any target rules or inference rules for the pathname that were parsed before the include line was parsed shall be used to attempt to create the file or to bring it up-to-date before opening the file. The ``delayed remaking'' method If make uses this method, no attempt shall be made to create the file or bring it up-to-date until after the makefile(s) have been read. During processing of the include line, make shall read the current contents of the file, if it exists, or treat it as an empty file if it does not exist. Once the makefile(s) have been read, make shall use any applicable target rule or inference rule for the pathname, regardless of whether it is parsed before or after the include line, when creating the file or bringing it up-to-date. Additionally in this case, the new contents of the file, if it is successfully created or updated, shall be used when processing rules for the following targets after the makefile(s) have been read: The target_name operands, if any. The first target make encounters that is not a special target or an inference rule, if no target_name operands are specified. All targets that are prerequisites, directly or recursively, of the above targets. If the pathname is relative, the file does not exist, and an attempt to create it using a rule has not been made and will not be made, it is unspecified whether additional directories are searched for an existing file of the same relative pathname. If, after proceeding as described above, the file still cannot be opened: If the word include was prefixed with a character, the file shall be ignored. Otherwise, an error shall occur. On page 2904 after line 97617 (make application usage), insert the following new paragraphs: The requirements relating to dynamic include files (ones that have rules to create or update them) allow two different methods of implementing them, as explained in RATIONALE below. In order to write a set of makefiles and include files (both dynamic and static) that work with both methods, applications need to ensure the following: Rules containing commands for creating dynamic include files (and any prerequisites) precede the include line that will cause the file to be read. Include lines and rules for creating dynamic include files do not depend on the contents of any earlier dynamic include file. For example, defining a macro in a dynamic include file and using that macro in a later include line should be avoided (unless the later include line is itself inside the dynamic include file). One of the rules used in creating a dynamic include file, or a dynamic prerequisite of an include file, contains commands to create its target and does not ignore creation failure. Note that although the first point above appears at first sight to preclude a dynamic include file that defines its own prerequisites, this can be achieved by having two include lines that name the same file (provided the rules in the file do not contain command lines), as shown in EXAMPLES. On page 2905 after line 97644 (make examples), insert a new example 4 and renumber the later examples: The following is an extended version of the previous example that generates make include files containing the prerequisites for each object file. The include file also defines its own prerequisites, and the makefile arranges that these are used by including the file twice. With implementations of make that create include files during parsing, the first time make is run the file does not exist but the use of the prefix on the first include line means it is ignored and is then generated by the rule preceding the second include line. On subsequent runs, if any of the source or header files previously identified has changed, the include file will be updated. There are other ways of updating the include file when headers change, but they involve recursive execution of make. .POSIX: .SUFFIXES: .c .d OFILES = a.o b.o pgm: $(OFILES) c99 $(OFILES) -o pgm a.o: c99 -c a.c b.o: c99 -c b.c -include $(OFILES:.o=.d) .c.d: +{ \ set -o pipefail; cfile=$<; ofile=$${cfile%.c}.o; \ printf '%s %s: %s ' "$$ofile" $@ $<; \ c99 -E $< | LC_ALL=C sed -n \ '/^#[[:blank:]]*[[:digit:]]/s/.*"\([^"]*\.h\)".*/\1/p' | \ LC_ALL=C sort -u | tr '\n' ' '; \ echo; \ } > $@ include $(OFILES:.o=.d) This example does not cope with a header file being removed (make will complain that it does not know how to make it), necessitating that *.d be removed and the make run again. Alternatively, this can be handled by updating the commands which generate the .d file so that they add an empty target rule for each of its prerequisites. On page 2911 after line 97926 (make rationale), insert the following new paragraphs: This standard allows two different methods of creating include files or bringing them up-to-date, reflecting established practice in SunPro make and GNU make. The former performs this action during parsing, before the include file is opened. The latter delays performing the action until after all makefiles have been read. Implementors who opt for the ``delayed remaking'' method should be aware of the following potential issues: Diagnostic messages about missing include files must be deferred until the final exit status is known. Note that this is a conformance issue, not just a quality of implementation issue. If the way make handles using updated include file contents is to start over after include files have been made up-to-date, it is possible for a poorly written makefile to cause make to enter a sequence of restarts where nothing changes each time, resulting in the sequence continuing indefinitely unless the situation is detected. Implementors are encouraged to include a mechanism for detecting and reporting this, rather than allowing make to consume an arbitrary amount of system resource until it is forcibly terminated. If make uses this start-over method, makefile contents read from a pipe on standard input or from a FIFO must be copied to a temporary file, and when make starts over it must use this file instead. If make starts over by executing itself using the exec family of functions, the need to replace '-' or the pathnames of FIFOs with the pathnames of temporary files can lead to the exec call failing with an [E2BIG] error if the original execution was close to the {ARG_MAX} limit. Although this is a quality of implementation issue, not a conformance issue (since the general rules for utility errors allow utilities to fail when they encounter a variety of internal errors - see [xref to 1.4 Utility Description Defaults]), implementors are encouraged to explore ways to prevent it, such as passing information via a temporary file instead of on the command line when an [E2BIG] error has occurred. Another solution might be to jump (e.g. using siglongjmp()) back to the start of main() as the way to start over. Making a recursive call to main() is not recommended, as that would run into the stack limit if sufficiently many restarts are needed. This standard specifies that a non-existent include file is first created if possible, and only if not possible can other directories be searched. Historical versions of GNU make first searched the include directories, then attempted to create the include file. This behavior was not considered suitable for standardization as it means writers of portable applications have to use absolute pathnames for all include files that need to be created via a rule (because they can never be sure what relative pathnames are safe to use, since a file with the same relative pathname might happen to exist in one of the searched directories when installing the application on a new system). Note, however, that this only applies to directories searched by default. If an application uses an extension to specify that one or more directories are searched, this standard does not place any constraints on when the specified directories are searched. On page 2456 line 80506-80508 (c99 STDOUT), after: If the -E option is specified, the standard output shall be a text file that represents the results of the preprocessing stage of the language; it may contain extra information appropriate for subsequent compilation passes add: and shall contain at least one line with the format: "# %d \"%s\"\n", , for each file processed as a result of a #include directive, unless no other output generated from that file is present in the output, where is a line number and is the pathname used to open the file On page 2463 after line 80819 (c99 rationale), add a new paragraph: This standard requires that, when -E is used, lines beginning with '#' are output identifying the files processed as a result of #include directives in order that c99 -E can be used to generate makefile dependencies. See [xref to make]. Usually such lines are output each time the origin of the subsequent lines in the output changes, and the line number after the '#' is the line number in the named file of the line from which the next line in the output was derived. Bug 1329: Problem in resolution of 0000793: "Regular Expressions: add REG_MINIMAL and a minimum repitition modifier" OPEN https://austingroupbugs.net/view.php?id=1329 We discussed this item, and will continue it on a future call, after bug 1325. Gettext draft. We will return to this on a future call. The gettext draft in the etherpad is at https://posix.rhansen.org/p/gettext_draft https://posix.rhansen.org/p/gettext_split Next Steps ---------- The next calls are on: November 9th 2020 (Monday) This call will be for 60 minutes. November 12th 2020 (Thursday) This call will be for 90 minutes. Calls are anchored on US time. (8am Pacific) Apologies in advance: Tom Thompson, 2020-11-09, 2020-11-12 Please check the calendar invites for dial in details. Bugs are at: https://austingroupbugs.net An etherpad is usually up for the meeting, with a URL using the date format as below: https://posix.rhansen.org/p/20xx-mm-dd (For write access this uses The Open Group single sign on, for those individuals with gitlab.opengroup.org accounts. Please contact Andrew if you need to be setup)