View Issue Details

IDProjectCategoryView StatusLast Update
00003731003.1(2008)/Issue 7Shell and Utilitiespublic2024-06-11 08:53
Reportereblake Assigned Toajosey  
PrioritynormalSeverityObjectionTypeOmission
Status ClosedResolutionAccepted 
NameEric Blake
OrganizationRed Hat
User Referenceebb.make
Sectionmake
Page Number2914
Line Number95787
Interp Status---
Final Accepted Text
Summary0000373: make should allow dash in macro names
DescriptionThe current standard specifically excludes - from portable make macro names;
however, existing implementation practice shows that pretty much all vendors
support this as an extension. Dash is the only character in the portable
filename character set that is missing from the list of valid macro names,
and adding this extension allows some additional flexibility in constructing
macro names based on file names.

See for example this survey:
http://lists.gnu.org/archive/html/bug-autoconf/2011-01/msg00036.html

> dashes in
> - GNU make,
> - dmake 4.12,
> - smake 1.2.1,
> - the vendor 'make' in
> - MacOS X,
> - FreeBSD 6.4,
> - OpenBSD 4.4,
> - NetBSD 5.0,
> - AIX 5.1,
> - HP-UX 10.20,
> - IRIX 6.5 (also pmake, smake),
> - OSF/1 5.1,
> - Solaris 2.6 (also dmake),
> and found that all support it. The test was this Makefile:
>
> ================== Makefile ===================
> FOO-BAR = yellow_dog
> FOO_BAR = green_cat
>
> all : $(FOO-BAR)
>
> $(FOO-BAR) : greet_dog
>
> $(FOO_BAR) : greet_cat
>
> greet_dog:
> echo hello my dog
>
> greet_cat:
> echo hello my cat
> ================================================
Desired ActionAt line 95787 [XCU make EXTENDED DESCRIPTION - Macros], change:

"solely of periods, underscores, digits, and alphabetics from the portable
character set"

to:

"solely of characters from the portable filename character set"
Tagsissue8

Relationships

related to 0000573 Closedajosey 1003.1(2008)/Issue 7 Please add '+' to the portable filename character set 
related to 0001417 Closedajosey Issue 8 drafts Need to make sure that makefiles with += and ?= are portable to all make implementations 

Activities

eblake

2011-02-03 16:25

manager   bugnote:0000663

Concerns were raised on the 3 Feb 2011 conference as to whether leading period, dash, or digits are portable; a further sentence may be needed to restrict macro names to start with a letter or underscore.

nick

2011-09-08 16:30

manager   bugnote:0000956

gmake and bsd make do support leading period, dash, and digit.

joerg

2011-11-17 10:54

reporter   bugnote:0001025

SunPro make, smake and gmake even support dashes as first char of a macro name, but this does not seem to be important.

More important would be to make macro names like "C++" valid in POSIX.

Issue History

Date Modified Username Field Change
2011-01-28 15:01 eblake New Issue
2011-01-28 15:01 eblake Status New => Under Review
2011-01-28 15:01 eblake Assigned To => ajosey
2011-01-28 15:01 eblake Name => Eric Blake
2011-01-28 15:01 eblake Organization => Red Hat
2011-01-28 15:01 eblake User Reference => ebb.make
2011-01-28 15:01 eblake Section => make
2011-01-28 15:01 eblake Page Number => 2914
2011-01-28 15:01 eblake Line Number => 95787
2011-01-28 15:01 eblake Interp Status => ---
2011-02-03 16:25 eblake Note Added: 0000663
2011-09-08 16:30 nick Note Added: 0000956
2011-11-17 10:54 joerg Note Added: 0001025
2012-05-31 16:21 Don Cragun Status Under Review => Resolved
2012-05-31 16:21 Don Cragun Resolution Open => Accepted
2012-05-31 16:21 Don Cragun Tag Attached: issue8
2012-06-14 15:20 eblake Relationship added related to 0000573
2020-02-14 15:41 geoffclare Status Resolved => Applied
2021-02-22 16:56 nick Relationship added related to 0001417
2024-06-11 08:53 agadmin Status Applied => Closed