bugmake - Bugs: bug #56875, subst failure for "$"...

 
 

bug #56875: subst failure for "$" character

Submitter:  None
Submitted:  Mon 09 Sep 2019 02:13:17 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  None Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 09 Sep 2019 04:36:44 PM UTC, comment #2: 

Thanks Andreas.  Closing this.

Anonymous, lease feel free to discuss on either -email is unavailable- or -email is unavailable- mailing lists if more info is needed.

Paul D. Smith <psmith>
Group administrator
Mon 09 Sep 2019 02:38:08 PM UTC, comment #1: 

If you want to quote $ use $$. \$ only matches \$, nothing else.

CVS_BASE_TAG_NAME = $(filter-out ame: ame $$,$(subst -,.,$Name: v1-1-1beta-1 $))

Andreas Schwab <schwab>
Mon 09 Sep 2019 02:13:17 PM UTC, original submission:  

The attached Makefile demonstrates a failure to filter the "$" character from a string using subst function. The attached Makefile.patch includes a workaround to this problem withthe insertion of a single space in the string to be filtered. This Makefile logic works as expected for GNU Make version 4.0 and older on various OSes and machine architectures (RHEL7, MacOSX, TOSS, x86_64, powerpc etc.):

--- BEGIN correct output ---
Makefile:2: CVS_BASE_TAG_NAME = v1.1.1beta.1
CVS_BASE_TAG_NAME = v1.1.1beta.1



make --version
GNU Make 4.0
Built for x86_64-unknown-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--- END correct output ---


Unfortunately, GNU Make version 4.2.1 fails to remove the trailing "$" character as follows. I cannot attest to version 4.1 or 4.2 of Make, since I don't have either of those versions installed.

--- BEGIN incorrect output ---
Makefile:2: CVS_BASE_TAG_NAME = v1.1.1beta.1 $
CVS_BASE_TAG_NAME = v1.1.1beta.1 $


make --version
GNU Make 4.2.1
Built for powerpc64le-unknown-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--- END incorrect output ---


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #47470:  Makefile added by None (231B - application/octet-stream)
file #47471:  Makefile.patch added by None (232B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-09 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed
    2019-09-09 None Attached File- Added Makefile, #47470
        Attached File- Added Makefile.patch, #47471

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code