Am Dienstag, 4. Februar 2014 um 14:27:58, schrieb Vincent van Ravesteijn <v...@lyx.org> > On Tue, Feb 4, 2014 at 2:09 PM, Kornel Benko <kor...@lyx.org> wrote: > > > Am Dienstag, 4. Februar 2014 um 14:04:00, schrieb Vincent van Ravesteijn > > <v...@lyx.org> > > > > > > This is always the output: > > > > > > > > > > > > ... > > > > > > > > > > > > > > > > What is the misbehaviour then ? It needs to do the check to find out > > > > > whether the gmo needs to be recreated or not. > > > > > > > > The normal way would be to for make to check if the po-file changed. And > > only then try to > > > > call git and python. > > > > > That would mean that we would need to run when the *.po (DEPENDS) file is > newer than the *.gmo.tobeupdated (OUTPUT) files. However we should also > depend on the *.gmo files in the build dir because these need to be > regenerated. However, the *.gmo files in the build dir are regenerated for > every build, and thus are very likely to be newer and trigger our script > almost always anyway.
Please *try* this to verify. > Vincent Kornel
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index a8e60a6..eb759e2 100755 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -171,15 +171,17 @@ foreach(_gmo_base ${INSTALLED_LANGUAGES}) set(_gmo ${_gmo_base}.gmo) list(APPEND LYX_UPDATED_GMO_FILES "${LYX_DEST_PO}/${_gmo}") if(LYX_GITVERSION) + set(_tobeupdated "${CMAKE_CURRENT_BINARY_DIR}/${_gmo}.tobeupdated") + list(APPEND LYX_UPDATED_GMO_FILES "${_tobeupdated}") add_custom_command( - OUTPUT "${LYX_DEST_PO}/${_gmo}" - COMMAND "${LYX_GITVERSION}" "status" "--porcelain" "${_gmo_base}.po" ">" "${CMAKE_CURRENT_BINARY_DIR}/${_gmo}.tobeupdated" + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_gmo}.tobeupdated" + COMMAND "${LYX_GITVERSION}" "status" "--porcelain" "${_gmo_base}.po" ">" "${_tobeupdated}" COMMAND ${LYX_PYTHON_EXECUTABLE} "${TOP_CMAKE_PATH}/po/update-gmo.py" - "${CMAKE_CURRENT_BINARY_DIR}/${_gmo}.tobeupdated" + "${_tobeupdated}" "${CMAKE_CURRENT_BINARY_DIR}/${_gmo}" "${LYX_DEST_PO}/${_gmo}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_gmo}" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_gmo}" "${LYX_DEST_PO}/${_gmo_base}.po" ) else() add_custom_command(
signature.asc
Description: This is a digitally signed message part.