Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001626 [Issue 8 drafts] Shell and Utilities Editorial Clarification Requested 2023-01-04 22:25 2024-06-11 09:12
Reporter illiliti View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Closed   Product Version Draft 2.1
Name Mark Lundblad
Organization
User Reference
Section make
Page Number 2945
Line Number 98797
Final Accepted Text Note: 0006130
Summary 0001626: Reconsider CURDIR macro
Description 0000338 rejected CURDIR macro due to lack of consensus. However, since current standard has no simple and reliable way to replicate it, I propose to reconsider this decision.

I've checked some implementations and found no serious incompatibilities that would prevent CURDIR from standardizing. The GNU make and smake(from schilytools) provide this macro as extension and both compatible with each other, whereas *BSD make requires leading dot(.CURDIR) and has special handling for PWD environment variable, but despite that it is semantically compatible with GNU make and smake because its CURDIR will always point to the current working directory and that's all we need. So BSD make can simply alias CURDIR to .CURDIR and be compatible with the rest implementations.

As of related -C option, I decided to omit it in this proposal because it requires more work regarding how -f option should work with it, how MAKE macro should be affected, etc... It is simply more than one addition and thus I believe it should be discussed in a separate proposal.
Desired Action On page 2945 line 98797, add a new paragraph:


The CURDIR macro shall be treated specially. It shall be provided by make and set
to the pathname of the directory where make was executed. The CURDIR environment variable shall not affect the value of the CURDIR macro. If CURDIR is defined in the makefile or is specified on the command line, it shall replace the original value of the CURDIR macro, but shall not cause make to change its current working directory.
Tags issue8
Attached Files

- Relationships

-  Notes
(0006130)
geoffclare (manager)
2023-01-23 17:22

On page 2944 line 98775 section make, change:
Other implementation-defined options and macros may also be added to the MAKEFLAGS macro.
to:
Other implementation-defined options and macros, with the exception of the CURDIR macro, may also be added to the MAKEFLAGS macro.

After page 2945 line 98797 section make, add a new paragraph:
The CURDIR macro shall be treated specially. It shall be provided by make and set to an absolute pathname of the current working directory when make is executed. The value shall be the same as the pathname that would be output by the pwd utility with either the -L or -P option; if they differ, it is unspecified which value is used. The CURDIR environment variable shall not affect the value of the CURDIR macro unless the -e option is specified. If the -e option is not specified, there is a CURDIR environment variable set, and its value is different from the CURDIR macro value, the environment variable value shall be set to the macro value. If CURDIR is defined in the makefile, present in the MAKEFLAGS environment variable, or specified on the command line, it shall replace the original value of the CURDIR macro in accordance with the logical order described above, but shall not cause make to change its current working directory.

- Issue History
Date Modified Username Field Change
2023-01-04 22:25 illiliti New Issue
2023-01-04 22:25 illiliti Name => Mark Lundblad
2023-01-04 22:25 illiliti Section => make
2023-01-04 22:25 illiliti Page Number => 2945
2023-01-04 22:25 illiliti Line Number => 98797
2023-01-23 17:22 geoffclare Note Added: 0006130
2023-01-23 17:23 geoffclare Final Accepted Text => Note: 0006130
2023-01-23 17:23 geoffclare Status New => Resolved
2023-01-23 17:23 geoffclare Resolution Open => Accepted As Marked
2023-01-23 17:24 geoffclare Tag Attached: issue8
2023-03-10 10:51 geoffclare Status Resolved => Applied
2024-06-11 09:12 agadmin Status Applied => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker