Re: [PATCH] Makefile: dedup git-ls-files output to prevent duplicate targets
- From
Jiang Xin <worldhello.net@gmail.com>
- Date
- May 26, 2022, 11:06 UTC
- Message-ID
- <CANYiYbEAdZ4g2ce9aGpRh7Hv_RHxSXHQnx4bW53f75O9j8p2Qg@mail.gmail.com>
- In-Reply-To
- <220526.86tu9c625s.gmgdl@evledraar.gmail.com>
On Thu, May 26, 2022 at 6:04 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 9 quoted lines
> > If we apply the above patch, sorting LOCALIZED_C is not necessary. > > Per earlier feedback in > https://lore.kernel.org/git/220519.86tu9l6fw4.gmgdl@evledraar.gmail.com/ > this all seesm a bit too complex, especially now. > > I pointed out then that with --sort-by-file added we: > > * Don't group the translations by C/SH/Perl anymore
I missed this point in the previous discussion. Will take this into account in next reroll.
Show 10 quoted lines
> * Change the sort order within files, to be line/sorted instead of > line/order (i.e. first occurring translations first) > > I suggested then to just use $(sort) on the respective lists. > > So why not just: > > 1. Switch to the $(FOUND_C_SOURCES) (good) > 2. Filter that by C/Perl/SH as before (just a simple $(filter) > 3. $(sort) that (which as noted, also de-dupes it)
Will try this direction.
> Then we don't have any of the behavior change of --sort-by-file, and we > don't have to carefully curate the ls-files/find commands to not include > duplicates (although as seen here that seems to have been a useful > canary in the "find" case).