diff options
author | Julian Andres Klode <jak@debian.org> | 2016-09-01 00:53:40 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-09-01 00:53:40 +0200 |
commit | 265c3312bd1b329dc9b54c754da46621d9019c11 (patch) | |
tree | e1c740747f84f793ee2b6ab4ffaffbc9f76cd575 /CMake/Translations.cmake | |
parent | 28f0867d99398a23296ead313112402c51d4e876 (diff) | |
parent | 317bb39f3cd6626c74f25d7bdf2907f1b235f553 (diff) |
Merge tag '1.3_rc3' into ubuntu/master
apt Debian release 1.3~rc3
Diffstat (limited to 'CMake/Translations.cmake')
-rw-r--r-- | CMake/Translations.cmake | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake index 509e4e378..79f2633a7 100644 --- a/CMake/Translations.cmake +++ b/CMake/Translations.cmake @@ -11,6 +11,7 @@ function(apt_add_translation_domain) set(abs_files "") set(scripts "") set(abs_scripts "") + set(mofiles) set(targets ${NLS_TARGETS}) set(domain ${NLS_DOMAIN}) set(xgettext_params @@ -67,16 +68,19 @@ function(apt_add_translation_domain) # build a ${domain.pot}-tmp as a byproduct. The msgfmt command than depend # on the byproduct while their target depends on the output, so that msgfmt # does not have to be rerun if nothing in the template changed. + # + # Make sure the .pot-tmp has no line numbers, to avoid useless rebuilding + # of .mo files. add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp - COMMAND msgcomm --more-than=0 --sort-by-file + COMMAND msgcomm --more-than=0 --omit-header --sort-by-file --add-location=file ${sh_pot} ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot - --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot - COMMAND msgcomm --more-than=0 --omit-header --sort-by-file + --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0 + COMMAND msgcomm --more-than=0 --sort-by-file ${sh_pot} ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot - --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0 + --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot COMMAND cmake -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0 ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp @@ -146,7 +150,7 @@ function(apt_add_update_po) continue() endif() add_custom_target(update-po-${langcode} - COMMAND msgmerge -q --update --backup=none ${translation} ${output} + COMMAND msgmerge -q --previous --update --backup=none ${translation} ${output} DEPENDS nls-${master_name} ) add_dependencies(update-po update-po-${langcode}) |