diff options
author | Thomas Haller <thaller@redhat.com> | 2022-10-03 17:52:19 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-10-03 17:52:19 +0200 |
commit | 5713a533f52f597226f81117f8ebfe3121f8f952 (patch) | |
tree | 8ee450d9ec78052925f8d198755d4cb0e018c5c1 | |
parent | 6cbad147210d0d1f742f9028687592145b967048 (diff) | |
parent | 7ee0da3eaffd337b92b898e535e94769eccfa60a (diff) | |
download | NetworkManager-5713a533f52f597226f81117f8ebfe3121f8f952.tar.gz |
build: merge branch 'th/build-gettext-update-po'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1405
-rwxr-xr-x | .gitlab-ci/run-test.sh | 5 | ||||
-rw-r--r-- | Makefile.am | 16 | ||||
-rw-r--r-- | po/Makevars | 2 |
3 files changed, 18 insertions, 5 deletions
diff --git a/.gitlab-ci/run-test.sh b/.gitlab-ci/run-test.sh index a91b8b7360..1fdb214b85 100755 --- a/.gitlab-ci/run-test.sh +++ b/.gitlab-ci/run-test.sh @@ -20,12 +20,9 @@ fi do_clean() { git clean -fdx - # "make -C update-po", run on "make dist" has a silly habit of - # modifying files in-tree. Lets undo that. - git checkout -- po/ git status - git diff + git diff --exit-code } ARTIFACT_DIR=/tmp/nm-artifact diff --git a/Makefile.am b/Makefile.am index 58c99be085..6b9b82876b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -168,6 +168,22 @@ if !BUILD_DOCS dist_configure_check += dist-configure-check endif +# Gettext's Makefile has a race with parallel builds during dist. +# Hack around that. +# See also: +# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1094#note_1435313 +# https://lists.gnu.org/archive/html/bug-gettext/2022-06/msg00022.html +# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1405 +po/.Makefile.patched: + sed -i \ + 's#^dist2: \$$(srcdir)/stamp-po \$$(DISTFILES)#dist2: \$$(srcdir)/stamp-po\n\t\$$(MAKE) \$$(DISTFILES)#' \ + "$(builddir)/po/Makefile" && \ + touch "$(builddir)/po/.Makefile.patched" + +DISTCLEANFILES += po/.Makefile.patched + +dist: po/.Makefile.patched + dist: $(dist_configure_check) $(dist_dependencies) ############################################################################### diff --git a/po/Makevars b/po/Makevars index ebd690f6bd..b858b6db7d 100644 --- a/po/Makevars +++ b/po/Makevars @@ -75,4 +75,4 @@ PO_DEPENDS_ON_POT = no # regenerate PO files on "make dist". Possible values are "yes" and # "no". Set this to no if the POT file and PO files are maintained # externally. -DIST_DEPENDS_ON_UPDATE_PO = yes +DIST_DEPENDS_ON_UPDATE_PO = no |