[pmg-devel] [RFC pmg-yew-quarantine-gui 1/2] buildsys: initialize pwt-assets as submodule automatically

Dominik Csapak d.csapak at proxmox.com
Wed Oct 29 09:59:12 CET 2025


LGTM

Reviewed-by: Dominik Csapak <d.csapak at proxmox.com>

On 10/28/25 5:36 PM, Stoiko Ivanov wrote:
> The error-message for the missing submodule and prerequisite is clear,
> but due to parallel make - it gets printed, before the rustc output -
> and is thus not visible when the build fails.
> 
> inspired by our zfsonlinux git:
>   63bd3935c (ensure submodule gets initialized on fresh clone and build).
> 
> but instead of letting BUILDDIR depend on pwt-assets/README.md it
> depends on the PHONY target (as this will evaluated anyways - and
> short-circuit if the README.md exists)
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>   Makefile | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index fdf046c..72937c0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -66,8 +66,11 @@ install: $(COMPILED_OUTPUT) pmg-mobile-index.html.tt
>   	install -m0644 dist/mobile-yew-style.css $(DESTDIR)$(UIDIR)/css
>   	install -m0644 pmg-mobile-index.html.tt $(DESTDIR)$(UIDIR)
>   
> +.PHONY: submodule
> +submodule:
> +	test -f "pwt-assets/README.md" || git submodule update --init
>   
> -$(BUILDDIR):
> +$(BUILDDIR): submodule
>   	rm -rf $@ $@.tmp
>   	mkdir -p $@.tmp
>   	cp -a debian/ src/ pwt-assets/ images/ pmg-mobile-index.html.tt Makefile Cargo.toml $@.tmp





More information about the pmg-devel mailing list