From owner-freebsd-current@FreeBSD.ORG Thu Jul 26 22:10:35 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 632181065670 for ; Thu, 26 Jul 2012 22:10:35 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from p578be941.dip0.t-ipconnect.de (p578be941.dip0.t-ipconnect.de [87.139.233.65]) by mx1.freebsd.org (Postfix) with ESMTP id 1B9B18FC15 for ; Thu, 26 Jul 2012 22:10:35 +0000 (UTC) Received: from [192.168.0.100] (cde1100.uni.vrs [192.168.0.100]) (Authenticated sender: ohauer) by p578be941.dip0.t-ipconnect.de (Postfix) with ESMTPSA id 0DA4D2089A; Fri, 27 Jul 2012 00:10:24 +0200 (CEST) Message-ID: <5011C04E.2070507@FreeBSD.org> Date: Fri, 27 Jul 2012 00:10:22 +0200 From: Olli Hauer User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: In-Reply-To: X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jeremy Messenger Subject: Re: Is the :u behaves normal or not (a bug) in the make? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: FreeBSD Current List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2012 22:10:35 -0000 On 2012-07-26 22:11, Jeremy Messenger wrote: > Hello all, > > While I was working on add the :build/:run feature in the > bsd.gnome.mk. I got a bug where it will running some dependencies got > duplicate. Thanks to the make(1) that shows me the :u feature to get > rid of the duplicates. But it doesn't exactly help unless I use the :O > to get the words in order to make the :u works. I am not sure if it's > just limited on how it works (normal) or it's a bug. Here's an example > test: > > ----------------------------- > USE_TEST= foo bar bar foobar foo > USE_TEST1= foo bar bar foobar foo > > test: > @${ECHO_CMD} "USE_TEST: " ${USE_TEST:u} > @${ECHO_CMD} "USE_TEST1: " ${USE_TEST1:O:u} > ----------------------------- > > Here's result: > ----------------------------- > # make test > USE_TEST: foo bar foobar foo > USE_TEST1: bar foo foobar > ----------------------------- It's normal, from man(1) make u Remove adjacent duplicate words (like uniq(1)). from man(1) uniq Repeated lines in the input will not be detected if they are not adjacent, so it may be necessary to sort the files first. -- Regards, olli