[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] maint: Avoid syntax-check failure for empty gnulib submodule.
From: |
Simon Josefsson |
Subject: |
[PATCH] maint: Avoid syntax-check failure for empty gnulib submodule. |
Date: |
Mon, 20 Sep 2021 09:46:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi,
Some syntax-check rules have a really poor failure mode (it prints all
source code files to stdout) when the 'gnulib_dir' points to an empty
git submodule checkout, see for example:
https://storage.googleapis.com/gitlab-gprd-artifacts/08/35/08352f7ac0f5a870c92a7777a01ca17d0b44be10aff8451893987ed8dbf48231/2021_09_19/1602830917/1729528459/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&GoogleAccessId=gitlab-object-storage-prd@gitlab-production.iam.gserviceaccount.com&Signature=fGIerRoWfE1woQD7hzvDst%2FPa67Kg9u9PjJxMB8vLpFD4DZIPDZNRBcqHQZV%0ARtRNSa2k2Er1W59wYe%2F%2FKY9C95YkIhMCftS5zBXfqsEPkRbU8CwcoG5clQoL%0A4Mpqy6OY1Kx7JUB86qBpYWFKlHLPosw0sscOolAGxcel2oZP1soxHLzxcgo%2B%0A66whawET8QK%2Bkj8FOElVzwVz93T8Qp0uZgvfoT7UVF2O9JGlEofYw7%2BrQm%2Ff%0AXOutkumck4OR17dGXSNaoWPO48Z7tDJLeAjWjnSUm%2F9ZPkYd%2B8IfxaEzACg%2B%0Av%2FS%2ByQpyp6eS1kdiliBmJFmL0Y7JJu7HgZiU21kkyw%3D%3D&Expires=1632123408
The patch below is not ideal -- consider if you did ./bootstrap --no-git
with the goal of using GNULIB_SRCDIR but for some reason ALSO did 'git
submodule update --init', then the syntax-check rules will use the
submodule checkout instead of the GNULIB_SRCDIR content -- but I believe
things are better with the patch than without it.
/Simon
* top/maint.mk (gnulib_dir): Fall back to GNULIB_SRCDIR if
submodule is not checked out.
---
ChangeLog | 6 ++++++
top/maint.mk | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index ddc28ddc2..6d5ba0854 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-09-20 Simon Josefsson <simon@josefsson.org>
+
+ maint: Avoid syntax-check failure for empty gnulib submodule.
+ * top/maint.mk (gnulib_dir): Fall back to GNULIB_SRCDIR if
+ submodule is not checked out.
+
2021-09-19 Bruno Haible <bruno@clisp.org>
Relicense qemu.h under LGPLv2+.
diff --git a/top/maint.mk b/top/maint.mk
index 0aa63773c..a03bc2e21 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -64,7 +64,7 @@ VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
# You can override this variable in cfg.mk if your gnulib submodule lives
# in a different location.
-gnulib_dir ?= $(shell if test -d $(srcdir)/gnulib; then \
+gnulib_dir ?= $(shell if test -f $(srcdir)/gnulib/gnulib-tool; then \
echo $(srcdir)/gnulib; \
else \
echo ${GNULIB_SRCDIR}; \
--
2.30.2
signature.asc
Description: PGP signature
- [PATCH] maint: Avoid syntax-check failure for empty gnulib submodule.,
Simon Josefsson <=