|
|
214acd |
From f315ca6a601e77220323bff4ac7782b54c862a0c Mon Sep 17 00:00:00 2001
|
|
|
214acd |
From: Milan Crha <mcrha@redhat.com>
|
|
|
214acd |
Date: Tue, 30 Oct 2018 15:50:58 +0100
|
|
|
214acd |
Subject: [PATCH] Make sure intltool-merge cache is created only once
|
|
|
214acd |
|
|
|
214acd |
Similar to https://gitlab.gnome.org/GNOME/evolution/issues/196
|
|
|
214acd |
when intltool-merge is called in parallel, it could either rewrite
|
|
|
214acd |
the ongoing attempt to build it or use an incomplete data, which
|
|
|
214acd |
results in broken output files (.desktop, .metainfo and so on).
|
|
|
214acd |
This change ensures the intltool-merge cache is created only once
|
|
|
214acd |
and any other requests which would use it will wait until it's created.
|
|
|
214acd |
---
|
|
|
214acd |
cmake/modules/FindIntltool.cmake | 11 ++++++++++-
|
|
|
214acd |
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
214acd |
|
|
|
214acd |
diff --git a/cmake/modules/FindIntltool.cmake b/cmake/modules/FindIntltool.cmake
|
|
|
214acd |
index 2cda2549eb..8e223e9d7f 100644
|
|
|
214acd |
--- a/cmake/modules/FindIntltool.cmake
|
|
|
214acd |
+++ b/cmake/modules/FindIntltool.cmake
|
|
|
214acd |
@@ -176,9 +176,18 @@ macro(intltool_merge _in_filename _out_filename)
|
|
|
214acd |
DEPENDS ${_in}
|
|
|
214acd |
)
|
|
|
214acd |
else(_has_no_translations)
|
|
|
214acd |
+ if(NOT TARGET intltool-merge-cache)
|
|
|
214acd |
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache
|
|
|
214acd |
+ COMMAND ${INTLTOOL_MERGE} ${_args} --quiet --cache="${CMAKE_BINARY_DIR}/po/.intltool-merge-cache" "${GETTEXT_PO_DIR}" "${_in}" "${_out}"
|
|
|
214acd |
+ DEPENDS ${_in}
|
|
|
214acd |
+ )
|
|
|
214acd |
+ add_custom_target(intltool-merge-cache ALL
|
|
|
214acd |
+ DEPENDS ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache)
|
|
|
214acd |
+ endif(NOT TARGET intltool-merge-cache)
|
|
|
214acd |
+
|
|
|
214acd |
add_custom_command(OUTPUT ${_out}
|
|
|
214acd |
COMMAND ${INTLTOOL_MERGE} ${_args} --quiet --cache="${CMAKE_BINARY_DIR}/po/.intltool-merge-cache" "${GETTEXT_PO_DIR}" "${_in}" "${_out}"
|
|
|
214acd |
- DEPENDS ${_in}
|
|
|
214acd |
+ DEPENDS ${_in} intltool-merge-cache
|
|
|
214acd |
)
|
|
|
214acd |
endif(_has_no_translations)
|
|
|
214acd |
endmacro(intltool_merge)
|
|
|
214acd |
--
|
|
|
214acd |
2.18.1
|
|
|
214acd |
|