NetBSD Problem Report #46115

From cheusov@tut.by  Wed Feb 29 18:28:42 2012
Return-Path: <cheusov@tut.by>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id C3E9D63B952
	for <gnats-bugs@gnats.netbsd.org>; Wed, 29 Feb 2012 18:28:42 +0000 (UTC)
Message-Id: <87k435lcrm.fsf@asrock.chizhovka.net>
Date: Wed, 29 Feb 2012 21:23:25 +0300
From: cheusov@tut.by
To: gnats-bugs@gnats.NetBSD.org
Subject: make: bug in :M (dash inside [])
X-Send-Pr-Version: 3.95

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

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.