[bug #56875] subst failure for "$" character

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #56875] subst failure for "$" character

Makoto Kato
URL:
  <https://savannah.gnu.org/bugs/?56875>

                 Summary: subst failure for "$" character
                 Project: make
            Submitted by: None
            Submitted on: Mon 09 Sep 2019 02:13:17 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: None
        Operating System: Any
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

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 ---





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 09 Sep 2019 02:13:17 PM UTC  Name: Makefile  Size: 231B   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=47470>
-------------------------------------------------------
Date: Mon 09 Sep 2019 02:13:17 PM UTC  Name: Makefile.patch  Size: 232B   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=47471>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56875>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #56875] subst failure for "$" character

Makoto Kato
Follow-up Comment #1, bug #56875 (project make):

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

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


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56875>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #56875] subst failure for "$" character

Makoto Kato
Update of bug #56875 (project make):

                  Status:                    None => Not A Bug              
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #2:

Thanks Andreas.  Closing this.

Anonymous, lease feel free to discuss on either [hidden email] or
[hidden email] mailing lists if more info is needed.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56875>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make