public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Shannon Sterz" <s.sterz@proxmox.com>
To: "Maximiliano Sandoval" <m.sandoval@proxmox.com>,
	<pve-devel@lists.proxmox.com>
Subject: Re: [PATCH proxmox-i18n v2 09/11] make: add linguas checks
Date: Fri, 24 Jul 2026 15:06:35 +0200	[thread overview]
Message-ID: <DK6TOAUNCRXT.1IGXW2JB4D87B@proxmox.com> (raw)
In-Reply-To: <20260724111257.325867-10-m.sandoval@proxmox.com>

On Fri Jul 24, 2026 at 1:12 PM CEST, Maximiliano Sandoval wrote:
> Cross-references the list of languages in LINGUAS and the *.po files.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
>
> Notes:
>     This should be equivalent to the less-verbose:
>
>         test "$(ls *.po | sed 's/.po//')" = "$(cat LINGUAS)"
>
>     but easier to understand why it fails on failure.
>
>  Makefile | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index ceac4eab..3dd30401 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -202,5 +202,19 @@ upload: upload-pve upload-pmg upload-pbs upload-pdm
>  check-%: %.po
>  	msgfmt --check $*.po
>
> +.PHONY: check-linguas
> +check-linguas:
> +	sort --check --uniq LINGUAS
> +	set -e; for lang in $(LINGUAS); do \
> +	    echo "checking if $$lang.po exists"; \
> +	    test -f $$lang.po; \
> +	done

isn't this check covered by the specific `check-${langcode}` checks?
make will just fail if a prerequisite isn't present and there is no
target to produce it. so here removing a .po file will make the
accompanying check-${langcode} fail as there is no target to make it.

> +	set -e; for lang in $(shell ls *.po | sed 's/\.po//'); do \
> +	    echo "checking if $$lang is in LINGUAS"; \
> +	    grep --quiet --line-regexp $$lang LINGUAS; \
> +	done
> +
>  .PHONY: check
> -check: $(addprefix check-, $(LINGUAS))
> +check:
> +	$(MAKE) $(addprefix check-, $(LINGUAS))
> +	$(MAKE) check-linguas

any reason you do a second invocation of make here instead of sticking
to make's prerequisite mechanism? iirc the latter has the upside of
being more nicely parallelizable with `-j`





  reply	other threads:[~2026-07-24 13:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 11:12 [PATCH proxmox-i18n v2 00/11] Makefile simplifications and improvements Maximiliano Sandoval
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 01/11] make: catalog-%.mo: explicitly set template file Maximiliano Sandoval
2026-07-24 13:06   ` Shannon Sterz
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 02/11] make: simplify msgmerge commands Maximiliano Sandoval
2026-07-24 13:06   ` Shannon Sterz
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 03/11] make: clean: remove *.mo files Maximiliano Sandoval
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 04/11] make: use long options for msgmerge and msginit Maximiliano Sandoval
2026-07-24 13:06   ` Shannon Sterz
2026-07-24 13:12     ` Shannon Sterz
2026-07-24 13:25       ` Maximiliano Sandoval
2026-07-24 13:31         ` Shannon Sterz
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 05/11] make: do_update: add --update for msgmerge Maximiliano Sandoval
2026-07-24 13:06   ` Shannon Sterz
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 06/11] make: do_update: add --previous flag to msgmerge Maximiliano Sandoval
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 07/11] gitignore: remove proxmox-datacenter-manager.pot Maximiliano Sandoval
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 08/11] make: move linguas to a file Maximiliano Sandoval
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 09/11] make: add linguas checks Maximiliano Sandoval
2026-07-24 13:06   ` Shannon Sterz [this message]
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 10/11] make: init-%.po: add language to linguas Maximiliano Sandoval
2026-07-24 11:12 ` [PATCH proxmox-i18n v2 11/11] make: add targets to update specific PO files Maximiliano Sandoval
2026-07-24 13:08 ` [PATCH proxmox-i18n v2 00/11] Makefile simplifications and improvements Shannon Sterz

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

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

  git send-email \
    --in-reply-to=DK6TOAUNCRXT.1IGXW2JB4D87B@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=m.sandoval@proxmox.com \
    --cc=pve-devel@lists.proxmox.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal