From 0f65aaf5cbd2e1ebbc1f51f9c42a5790e1b182fc Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 7 Apr 2025 08:56:09 +0200 Subject: [PATCH] maintainer-makefile: Avoid submodule-checks fail without submodules. * top/maint.mk (no-submodule-changes): Condition on .gitmodules. (public-submodule-commit): Likewise. --- ChangeLog | 6 ++++++ top/maint.mk | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5bc468a6ac..c79a3ac7e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-04-07 Simon Josefsson + + maintainer-makefile: Avoid submodule-checks fail without submodules. + * top/maint.mk (no-submodule-changes): Condition on .gitmodules. + (public-submodule-commit): Likewise. + 2025-04-06 Collin Funk fseterr: Port to recent Haiku snapshots. diff --git a/top/maint.mk b/top/maint.mk index 1293e86e84..49fdb79d85 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -1603,6 +1603,7 @@ endef .PHONY: no-submodule-changes no-submodule-changes: $(AM_V_GEN)if test -d $(srcdir)/.git \ + && test -e $(srcdir)/.gitmodules \ && git --version >/dev/null 2>&1; then \ diff=$$(cd $(srcdir) && git submodule -q foreach \ git diff-index --name-only HEAD) \ @@ -1622,6 +1623,7 @@ submodule-checks ?= no-submodule-changes public-submodule-commit .PHONY: public-submodule-commit public-submodule-commit: $(AM_V_GEN)if test -d $(srcdir)/.git \ + && test -e $(srcdir)/.gitmodules \ && git --version >/dev/null 2>&1; then \ cd $(srcdir) && \ git submodule --quiet foreach \ -- 2.39.5