NetBSD-Bugs archive

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

bin/46115: make: bug in :M (dash inside [])



>Number:         46115
>Category:       bin
>Synopsis:       make: bug in :M (dash inside [])
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 29 18:30:04 +0000 2012
>Originator:     Aleksey Cheusov
>Release:        NetBSD 6.0_BETA
>Organization:
>Environment:
System: NetBSD asrock.chizhovka.net 6.0_BETA NetBSD 6.0_BETA (GENERIC) #0: Sun 
Feb 19 21:21:58 FET 2012 
cheusov%asrock.chizhovka.net@localhost:/srv/obj/sys/arch/amd64/compile/GENERIC 
amd64
Architecture: x86_64
Machine: amd64
>Description:
From make(1)

     :Mpattern
          Select only those words that match pattern.  The standard shell
          wildcard characters (`*', `?', and `[]') may be used.  The wildcard
          characters may be escaped with a backslash (`\').

Actually dash inside [] works partially.

    0 cheusov>cat ~/tmp/1.mk
    foo = -

    all:
        @echo match=${foo:M[.-]}
        @echo match=${foo:M[-.]}
    0 cheusov>make -f ~/tmp/1.mk
    match=
    match=-
    0 cheusov>

That is, dash in the end of [] doesn't work as it works in shell.

    0 cheusov>touch -- -
    0 cheusov>echo [-.]
    -
    0 cheusov>echo [.-]
    -
    0 cheusov>

>How-To-Repeat:
See below

>Fix:

Unknown


Home | Main Index | Thread Index | Old Index