git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] Makefile: dedup list of files obtained from ls-files
Date: Mon, 22 Apr 2019 15:11:32 +0900	[thread overview]
Message-ID: <xmqq8sw28t7v.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAPig+cR5yMtdBA0HgLZ6k-j3NeMS+4UeEKgRiEpZ0YGrW_L0cg@mail.gmail.com> (Eric Sunshine's message of "Sun, 21 Apr 2019 23:23:54 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

> On Sun, Apr 21, 2019 at 9:19 AM Junio C Hamano <gitster@pobox.com> wrote:
>> diff --git a/Makefile b/Makefile
>> @@ -822,12 +822,12 @@ VCSSVN_LIB = vcs-svn/lib.a
>> -LIB_H := $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \
>> +LIB_H := $(shell (git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \
>>         $(FIND) . \
>>         -name .git -prune -o \
>>         -name t -prune -o \
>>         -name Documentation -prune -o \
>> -       -name '*.h' -print)
>> +       -name '*.h' -print) | sort -u)
>
> GNU make's "sort" function also de-dups, so an alternative is:
>
>     LIB_H := $(sort $(shell ...))

That is a much better solution.  Let me use that.

Thanks.

  reply	other threads:[~2019-04-22  6:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-21 13:19 [PATCH/RFC] Makefile: dedup list of files obtained from ls-files Junio C Hamano
2019-04-22  3:23 ` Eric Sunshine
2019-04-22  6:11   ` Junio C Hamano [this message]
2019-04-22 14:49 ` Jeff King
2019-04-22 17:15   ` Ramsay Jones
2019-04-23  1:18     ` Junio C Hamano
2019-04-23 20:21   ` SZEDER Gábor
2019-04-24  1:03     ` Junio C Hamano
2019-04-24 11:25       ` SZEDER Gábor
2019-04-24 17:19         ` Eric Sunshine
2019-04-25  0:59           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8sw28t7v.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).