bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64402] error parsing functions in braces inside ifeq, ifneq


From: anonymous
Subject: [bug #64402] error parsing functions in braces inside ifeq, ifneq
Date: Mon, 10 Jul 2023 07:40:57 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64402>

                 Summary: error parsing functions in braces inside ifeq, ifneq
                   Group: make
               Submitter: None
               Submitted: Mon 10 Jul 2023 11:40:55 AM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.4
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 10 Jul 2023 11:40:55 AM UTC By: Anonymous
Per the GNU make manual, function call syntax is either
  $(function arguments)  # parenthesis
or
  ${function arguments}  # braces

Using braces in most cases works, however, using braces inside an `ifeq` or
`ifneq` condition sometimes fails with:

*** unterminated call to function 'join': missing '}'.  Stop.

It fails if the function is the 1st argument of the `ifeq`, and the function
has multiple arguments (e.g., findstring). It works if the function is the 2nd
argument of `ifeq`, or the function has only one argument (e.g., sort).
Illustrative examples (more in attached Makefile):

```
#-------------------------------------------------------------------------------
ifeq ($(and a),)
endif

# ok
ifeq (${and a},)
endif

# ok
ifneq (,${and a})
endif

# ok
ifneq (${and a},)
endif

# ok
ifneq (,${and a})
endif

#-------------------------------------------------------------------------------
ifeq ($(and a, b),)
endif

# Makefile:469: *** unterminated call to function 'and': missing '}'.  Stop.
## ifeq (${and a, b},)
## endif

# ok
ifneq (,${and a, b})
endif

# Makefile:477: *** unterminated call to function 'and': missing '}'.  Stop.
## ifneq (${and a, b},)
## endif

# ok
ifneq (,${and a, b})
endif
```







    _______________________________________________________
File Attachments:


-------------------------------------------------------
Date: Mon 10 Jul 2023 11:40:55 AM UTC  Name: Makefile  Size: 9KiB   By: None

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

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]