Add gettext support to cmake build.

The following targets are supported:

update-gmo[-domain] update-po[-domain] update-pot[-domain]
This commit is contained in:
Moritz Göbelbecker 2008-05-05 16:39:43 +00:00
parent b75e8cd0ed
commit 07f95b5ce7
50 changed files with 920 additions and 55 deletions

View file

@ -21,7 +21,7 @@ FIND_PACKAGE( PNG REQUIRED )
set(BINDIR "bin" CACHE STRING "Where to install binaries")
set(DATAROOTDIR "share" CACHE STRING "Sets the root of data directories to a non-default location")
set(DATADIR "${DATAROOTDIR}/wesnoth" CACHE STRING "Read-only architecture-independent game data")
set(LOCALEDIR "${DATADIR}/translations" CACHE STRING "sets the locale data directory to a non-default location")
set(LOCALEDIR "translations" CACHE STRING "sets the locale data directory to a non-default location")
set(PREFERENCES_DIR "" CACHE STRING "Use a non-default preferences directory (.wesnoth on unix)")
set(GUI "normal" CACHE STRING "Set for GUI reductions for resolutions down to 800x480 (eeePC, Nokia 8x0) or 320x240 (PDAs) (normal|small|tiny)")
@ -42,6 +42,9 @@ message("set -DLOCALEDIR='\"${LOCALEDIR}\"'")
if(NOT IS_ABSOLUTE ${LOCALEDIR})
add_definitions(-DHAS_RELATIVE_LOCALEDIR)
message("set -DHAS_RELATIVE_LOCALEDIR")
set(LOCALE_INSTALL ${DATADIR}/${LOCALEDIR})
else(NOT IS_ABSOLUTE ${LOCALEDIR})
set(LOCALE_INSTALL ${LOCALEDIR})
endif(NOT IS_ABSOLUTE ${LOCALEDIR})
if(PREFERENCES_DIR)
@ -74,7 +77,7 @@ endif(ENABLE_PYTHON AND PYTHON_LIBRARY)
#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# only one of the subdirs working so far...
#add_subdirectory(po)
add_subdirectory(po)
#add_subdirectory(m4)
add_subdirectory(src)
#add_subdirectory(doc)
@ -90,7 +93,7 @@ add_subdirectory(src)
#install(FILES copyright changelog players_changelog campaign_server.dsp editor.dev editor_gcc4.dev map_editor.dsp server.dev server.dsp unit_test.dev wesnothd.dev wesnoth.dev wesnothd_gcc4.dev wesnoth.dsp wesnoth.dsw wesnoth_gcc4.dev wesnoth.kdevelop DESTINATION )
#install(FILES DESTINATION /share/@DATADIR@)
install(DIRECTORY data fonts images sounds translations DESTINATION ${DATADIR} PATTERN ".svn" EXCLUDE )
install(DIRECTORY data fonts images sounds DESTINATION ${DATADIR} PATTERN ".svn" EXCLUDE )
#original Makefile.am contents follow:

182
cmake/FindGettext.cmake Normal file
View file

@ -0,0 +1,182 @@
# - Find Gettext run-time library and tools.
# This module finds the GNU gettext run-time library (LGPL), include paths and
# associated tools (GPL). This code sets the following variables:
# GETTEXT_INCLUDE_DIR = path(s) to gettext's include files
# GETTEXT_LIBRARIES = the libraries to link against to use gettext
# GETTEXT_INTL_LIBRARY = path to gettext's intl library
# GETTEXT_RUNTIME_FOUND = true if runtime libs were found (intl)
# GETTEXT_INFO_MSG = information string about gettext
# GETTEXT_XGETTEXT_EXECUTABLE = xgettext tool
# GETTEXT_MSGINIT_EXECUTABLE = msginit tool
# GETTEXT_MSGMERGE_EXECUTABLE = msgmerge tool
# GETTEXT_MSGCAT_EXECUTABLE = msgcat tool
# GETTEXT_MSGCONV_EXECUTABLE = msgconv tool
# GETTEXT_MSGFMT_EXECUTABLE = msgfmt tool
# GETTEXT_TOOLS_FOUND = true if all the tools were found
# GETTEXT_FOUND = true if both runtime and tools were found
# As a convenience, the following variables can be set before including
# this module to make its life easier:
# GETTEXT_SEARCH_PATH = list of path to search gettext components for
# --------------------------------------------------------------------------
# As a convenience, try to find everything as soon as we set any one of
# the cache variables.
macro(GETTEXT_FIND_POTENTIAL_DIRS)
set(potential_bin_dirs)
set(potential_lib_dirs)
set(potential_include_dirs)
foreach(filepath
"${GETTEXT_INTL_LIBRARY}"
"${GETTEXT_XGETTEXT_EXECUTABLE}"
"${GETTEXT_MSGINIT_EXECUTABLE}"
"${GETTEXT_MSGMERGE_EXECUTABLE}"
"${GETTEXT_MSGCAT_EXECUTABLE}"
"${GETTEXT_MSGCONV_EXECUTABLE}"
"${GETTEXT_MSGFMT_EXECUTABLE}"
)
get_filename_component(path "${filepath}" PATH)
set(potential_bin_dirs ${potential_bin_dirs} "${path}/../bin")
set(potential_lib_dirs ${potential_lib_dirs} "${path}/../lib")
set(potential_include_dirs ${potential_include_dirs} "${path}/../include")
endforeach(filepath)
foreach(path
"${GETTEXT_INCLUDE_DIR}"
"${GETTEXT_SEARCH_PATH}"
)
set(potential_bin_dirs ${potential_bin_dirs} "${path}/../bin")
set(potential_lib_dirs ${potential_lib_dirs} "${path}/../lib")
set(potential_include_dirs ${potential_include_dirs} "${path}/../include")
endforeach(path)
endmacro(GETTEXT_FIND_POTENTIAL_DIRS)
# --------------------------------------------------------------------------
# Find the runtime lib
macro(GETTEXT_FIND_RUNTIME_LIBRARY)
set(GETTEXT_RUNTIME_FOUND 1)
# The gettext intl include dir (libintl.h)
find_path(GETTEXT_INCLUDE_DIR
libintl.h
${potential_include_dirs}
DOC "Path to gettext include directory (where libintl.h can be found)")
mark_as_advanced(GETTEXT_INCLUDE_DIR)
if(NOT GETTEXT_INCLUDE_DIR)
set(GETTEXT_RUNTIME_FOUND 0)
endif(NOT GETTEXT_INCLUDE_DIR)
set(GETTEXT_LIBRARIES)
# The gettext intl library
# Some Unix system (like Linux) have gettext right into libc
if(WIN32)
set(HAVE_GETTEXT 0)
else(WIN32)
include(CheckFunctionExists)
check_function_exists(gettext HAVE_GETTEXT)
endif(WIN32)
if(HAVE_GETTEXT)
# Even if we have a system one, let the user provide another one
# eventually (i.e., more recent, or GNU).
set(GETTEXT_INTL_LIBRARY "" CACHE FILEPATH
"Path to gettext intl library (leave it empty to use the system one)")
else(HAVE_GETTEXT)
find_library(GETTEXT_INTL_LIBRARY
NAMES intl
PATHS ${potential_lib_dirs}
DOC "Path to gettext intl library")
if(NOT GETTEXT_INTL_LIBRARY)
set(GETTEXT_RUNTIME_FOUND 0)
endif(NOT GETTEXT_INTL_LIBRARY)
endif(HAVE_GETTEXT)
mark_as_advanced(GETTEXT_INTL_LIBRARY)
if(GETTEXT_INTL_LIBRARY)
set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARIES} ${GETTEXT_INTL_LIBRARY})
endif(GETTEXT_INTL_LIBRARY)
# The gettext asprintf library
# Actually not useful as it does not seem to exist on Unix
# IF(WIN32)
# FIND_LIBRARY(GETTEXT_ASPRINTF_LIBRARY
# NAMES asprintf
# PATHS ${potential_lib_dirs}
# DOC "Gettext asprintf library")
# MARK_AS_ADVANCED(GETTEXT_ASPRINTF_LIBRARY)
# IF(NOT GETTEXT_ASPRINTF_LIBRARY)
# SET(GETTEXT_RUNTIME_FOUND 0)
# ELSE(NOT GETTEXT_ASPRINTF_LIBRARY)
# SET(GETTEXT_LIBRARIES ${GETTEXT_LIBRARIES} ${GETTEXT_ASPRINTF_LIBRARY})
# ENDIF(NOT GETTEXT_ASPRINTF_LIBRARY)
# ENDIF(WIN32)
endmacro(GETTEXT_FIND_RUNTIME_LIBRARY)
# --------------------------------------------------------------------------
# Find the tools
macro(GETTEXT_FIND_TOOLS)
set(GETTEXT_TOOLS_FOUND 1)
foreach(tool
xgettext
msginit
msgmerge
msgcat
msgconv
msgfmt
)
string(TOUPPER ${tool} tool_upper)
find_program(GETTEXT_${tool_upper}_EXECUTABLE
NAMES ${tool}
PATHS ${potential_bin_dirs}
DOC "Path to gettext ${tool} tool")
mark_as_advanced(GETTEXT_${tool_upper}_EXECUTABLE)
if(NOT GETTEXT_${tool_upper}_EXECUTABLE)
set(GETTEXT_TOOLS_FOUND 0)
endif(NOT GETTEXT_${tool_upper}_EXECUTABLE)
endforeach(tool)
endmacro(GETTEXT_FIND_TOOLS)
# --------------------------------------------------------------------------
# Some convenient info about gettext, where to get it, etc.
set(GETTEXT_INFO_MSG "More information about gettext can be found at http://directory.fsf.org/gettext.html.")
if(WIN32)
set(GETTEXT_INFO_MSG "${GETTEXT_INFO_MSG} Windows users can download gettext-runtime-0.13.1.bin.woe32.zip (LGPL), gettext-tools-0.13.1.bin.woe32.zip (GPL) as well as libiconv-1.9.1.bin.woe32.zip (LGPL) from any GNU mirror (say, http://mirrors.kernel.org/gnu/gettext/ and http://mirrors.kernel.org/gnu/libiconv/), unpack the archives in the same directory, then set GETTEXT_INTL_LIBRARY to 'lib/intl.lib' in and GETTEXT_INCLUDE_DIR to 'include' in that directory.\n\nWarning: if you are using ActiveTcl, the ActiveState binary distribution for Tcl, make sure you overwrite the iconv.dll file found in both the Tcl bin/ and lib/ directories with the iconv.dll file found in your gettext bin/ directory.")
endif(WIN32)
# --------------------------------------------------------------------------
# Found ?
gettext_find_potential_dirs()
gettext_find_runtime_library()
gettext_find_tools()
# Try again with new potential dirs now that we may have found the runtime
# or the tools
gettext_find_potential_dirs()
if(NOT GETTEXT_RUNTIME_FOUND)
gettext_find_runtime_library()
endif(NOT GETTEXT_RUNTIME_FOUND)
if(NOT GETTEXT_TOOLS_FOUND)
gettext_find_tools()
endif(NOT GETTEXT_TOOLS_FOUND)
if(GETTEXT_RUNTIME_FOUND AND GETTEXT_TOOLS_FOUND)
set(GETTEXT_FOUND 1)
else(GETTEXT_RUNTIME_FOUND AND GETTEXT_TOOLS_FOUND)
set(GETTEXT_FOUND 0)
endif(GETTEXT_RUNTIME_FOUND AND GETTEXT_TOOLS_FOUND)
if(NOT GETTEXT_FOUND AND NOT Gettext_FIND_QUIETLY AND Gettext_FIND_REQUIRED)
message(FATAL_ERROR "Could not find gettext runtime library and tools for internationalization purposes.\n\n${GETTEXT_INFO_MSG}")
endif(NOT GETTEXT_FOUND AND NOT Gettext_FIND_QUIETLY AND Gettext_FIND_REQUIRED)

View file

@ -7,3 +7,7 @@ revision: 22
file: FindLibintl.cmake
url: http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/cmake/modules/FindLibintl.cmake
revision: 797757
file: FindGettext.cmake
url: http://kwwidgets.org/cgi-bin/viewcvs.cgi/CMake/FindGettext.cmake?root=KWWidgets&view=markup
revision: 1.2

View file

@ -0,0 +1,69 @@
MACRO (ADD_POT_TARGET DOMAIN)
add_custom_command(OUTPUT remove-potcdate.sed
COMMAND sed
ARGS -e "'/^#/d'" remove-potcdate.sin > remove-potcdate.sed
MAIN_DEPENDENCY remove-potcdate.sin )
set(POTFILE ${DOMAIN}.pot)
add_custom_target(update-pot-${DOMAIN}
COMMAND ${CMAKE_SOURCE_DIR}/po/pot-update.sh ${DOMAIN}
DEPENDS remove-potcdate.sed
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# add_custom_command(OUTPUT ${POTFILE}
# COMMAND ${CMAKE_SOURCE_DIR}/po/pot-update.sh ${DOMAIN}
# DEPENDS remove-potcdate.sed
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# add_custom_target(update-pot-${DOMAIN} DEPENDS ${POTFILE})
set_source_files_properties(${POTFILE} PROPERTIES GENERATED TRUE)
add_dependencies(update-pot update-pot-${DOMAIN})
ENDMACRO (ADD_POT_TARGET DOMAIN)
MACRO (ADD_PO_TARGETS DOMAIN)
set(LINGUAS ${ARGN})
set(POFILES)
foreach(LANG ${LINGUAS})
set(POFILE ${LANG}.po)
set(UPDFILE ${LANG}.upd)
add_custom_command(OUTPUT ${UPDFILE}
COMMAND ${CMAKE_SOURCE_DIR}/po/po-update.sh
ARGS ${DOMAIN} ${LANG} ${GETTEXT_MSGMERGE_EXECUTABLE} ${GETTEXT_MSGINIT_EXECUTABLE}
MAIN_DEPENDENCY ${DOMAIN}.pot )
set_source_files_properties(${POFILE} PROPERTIES GENERATED TRUE)
set(POFILES ${POFILES} ${UPDFILE})
endforeach(LANG ${LINGUAS})
add_custom_target(update-po-${DOMAIN} DEPENDS ${POFILES})
add_dependencies(update-po update-po-${DOMAIN})
ENDMACRO (ADD_PO_TARGETS DOMAIN)
MACRO (ADD_MO_TARGETS DOMAIN)
set(LINGUAS ${ARGN})
set(MOFILES)
foreach(LANG ${LINGUAS})
set(POFILE ${LANG}.po)
set(MOFILE ${LANG}.gmo)
add_custom_command(OUTPUT ${MOFILE}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
ARGS -c -o ${MOFILE} ${POFILE}
MAIN_DEPENDENCY ${POFILE} )
install(FILES ${MOFILE} DESTINATION ${LOCALE_INSTALL}/${LANG}/LC_MESSAGES/ RENAME ${DOMAIN}.mo)
set(MOFILES ${MOFILES} ${MOFILE})
endforeach(LANG ${LINGUAS})
add_custom_target(update-gmo-${DOMAIN} ALL DEPENDS ${MOFILES})
add_dependencies(update-gmo update-gmo-${DOMAIN})
ENDMACRO (ADD_MO_TARGETS DOMAIN)

23
po/.gitignore vendored Normal file
View file

@ -0,0 +1,23 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile.in
Makefile
ca
cs
da
de
el_GR
es
eu
fi
fr
hu
it
nl
no
pl
pt_BR
ru
sk
sv

14
po/CMakeLists.txt Normal file
View file

@ -0,0 +1,14 @@
INCLUDE(TranslationTargets)
set(XGETTEXT_OPTIONS "--from-code=UTF-8 --sort-by-file --keyword=sgettext --keyword=vgettext --keyword=_n:1,2 --keyword=sngettext:1,2 --keyword=vngettext:1,2")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/pot-update.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/pot-update.sh)
add_custom_target(update-pot)
add_custom_target(update-po)
add_custom_target(update-gmo)
set(TRANSLATION_DIRS wesnoth wesnoth-anl wesnoth-aoi wesnoth-did wesnoth-editor wesnoth-ei wesnoth-httt wesnoth-l wesnoth-lib wesnoth-multiplayer wesnoth-nr wesnoth-sof wesnoth-sotbe wesnoth-tb wesnoth-thot wesnoth-trow wesnoth-tsg wesnoth-tutorial wesnoth-units wesnoth-utbs)
foreach(DIR ${TRANSLATION_DIRS})
add_subdirectory(${DIR})
endforeach(DIR ${TRANSLATION_DIRS})

16
po/po-update.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
DOMAIN=$1
LANG=$2
GETTEXT_MSGMERGE_EXECUTABLE=$3
GETTEXT_MSGINIT_EXECUTABLE=$4
if test -f "$LANG.po"; then
echo "$GETTEXT_MSGMERGE_EXECUTABLE --update $LANG.po $DOMAIN.pot"
$GETTEXT_MSGMERGE_EXECUTABLE --update $LANG.po $DOMAIN.pot
touch $LANG.upd
else
echo "$GETTEXT_MSGINIT_EXECUTABLE --no-translator --input=$DOMAIN.pot --output-file=$LANG.po --locale=$LANG"
$GETTEXT_MSGINIT_EXECUTABLE --no-translator --input="$DOMAIN.pot" --output-file="$LANG.po" --locale="$LANG"
touch $LANG.upd
fi

55
po/pot-update.sh.in Executable file
View file

@ -0,0 +1,55 @@
#!/bin/sh
DOMAIN=$1
XGETTEXT=@GETTEXT_XGETTEXT_EXECUTABLE@
WMLXGETTEXT=@CMAKE_SOURCE_DIR@/utils/wmlxgettext
XGETTEXT_OPTIONS="@XGETTEXT_OPTIONS@"
TOP_SRCDIR=@CMAKE_SOURCE_DIR@
CURRENT_SRCDIR=$(pwd)
COPYRIGHT_HOLDER="Wesnoth development team"
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)';
else
msgid_bugs_address='$(PACKAGE_BUGREPORT)';
fi;
$XGETTEXT --default-domain=$DOMAIN --directory=$TOP_SRCDIR \
--add-comments=TRANSLATORS: $XGETTEXT_OPTIONS \
--files-from=$CURRENT_SRCDIR/POTFILES.in \
--copyright-holder='$COPYRIGHT_HOLDER' \
--msgid-bugs-address="$msgid_bugs_address" \
--keyword=_ --keyword=N_ \
--output=$DOMAIN.cpp.po
if test -f $DOMAIN.cpp.po ; then
sed s/charset=CHARSET/charset=UTF-8/ $DOMAIN.cpp.po > $DOMAIN.cpp1.po
fi
if test -r $FINDCFG ; then
$WMLXGETTEXT --directory=$TOP_SRCDIR --domain=$DOMAIN `cd $TOP_SRCDIR && sh $CURRENT_SRCDIR/FINDCFG` > $DOMAIN.wml.po;
fi
if test -f $DOMAIN.wml.po -a -f $DOMAIN.cpp1.po ; then
msgcat --sort-by-file $DOMAIN.cpp1.po $DOMAIN.wml.po -o $DOMAIN.po
elif test -f $DOMAIN.wml.po ; then
mv $DOMAIN.wml.po $DOMAIN.po
else
mv $DOMAIN.cpp1.po $DOMAIN.po
fi
rm -f $DOMAIN.cpp.po $DOMAIN.cpp1.po $DOMAIN.wml.po
test ! -f $DOMAIN.po || {
if test -f $DOMAIN.pot; then
sed -f remove-potcdate.sed < $DOMAIN.pot > $DOMAIN.1po &&
sed -f remove-potcdate.sed < $DOMAIN.po > $DOMAIN.2po &&
if cmp $DOMAIN.1po $DOMAIN.2po >/dev/null 2>&1; then
rm -f $DOMAIN.1po $DOMAIN.2po $DOMAIN.po;
else
rm -f $DOMAIN.1po $DOMAIN.2po $DOMAIN.pot &&
mv $DOMAIN.po $DOMAIN.pot;
fi;
else
mv $DOMAIN.po $DOMAIN.pot;
fi;
}

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,30 +1,136 @@
#
# This makefile was created with the sole purpose of emulating the
# makefiles of the rest of domains (and thus make updates easily
# scriptable).
#
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.4
DOMAIN= wesnoth-manpages
MSGMERGE = msgmerge
MSGFMT = msgfmt
# Default target executed when no arguments are given to make.
default_target: all
.SUFFIXES: .gmo .po .po-update
#=============================================================================
# Special targets provided by cmake.
.po.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
tmpdir=`pwd`; \
echo "$$lang:"; \
echo "$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
mv -f $$tmpdir/$$lang.new.po $$lang.po; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
# Disable implicit rules so canoncical targets will work.
.SUFFIXES:
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /usr/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/mog/src/wesnoth
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/mog/src/wesnoth
# Include the progress variables for this target.
include CMakeFiles/progress.make
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
cd /home/mog/src/wesnoth/po/wesnoth-manpages && /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
cd /home/mog/src/wesnoth/po/wesnoth-manpages && /usr/bin/cmake -P cmake_install.cmake
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
cd /home/mog/src/wesnoth/po/wesnoth-manpages && /usr/bin/cmake -P cmake_install.cmake
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
cd /home/mog/src/wesnoth/po/wesnoth-manpages && /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
# Special rule for the target install/local
install/local/fast: install/local
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
cd /home/mog/src/wesnoth/po/wesnoth-manpages && /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
# The main all target
all: cmake_check_build_system
cd /home/mog/src/wesnoth && $(CMAKE_COMMAND) -E cmake_progress_start /home/mog/src/wesnoth/CMakeFiles $(CMAKE_ALL_PROGRESS)
cd /home/mog/src/wesnoth && $(MAKE) -f CMakeFiles/Makefile2 po/wesnoth-manpages/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/mog/src/wesnoth/CMakeFiles 0
# The main clean target
clean:
cd /home/mog/src/wesnoth && $(MAKE) -f CMakeFiles/Makefile2 po/wesnoth-manpages/clean
# The main clean target
clean/fast: clean
# Prepare targets for installation.
preinstall: all
cd /home/mog/src/wesnoth && $(MAKE) -f CMakeFiles/Makefile2 po/wesnoth-manpages/preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/mog/src/wesnoth && $(MAKE) -f CMakeFiles/Makefile2 po/wesnoth-manpages/preinstall
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
# Help Target
help::
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... install"
@echo "... install/local"
@echo "... list_install_components"
@echo "... rebuild_cache"
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/mog/src/wesnoth && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
# this dummy rule only displays the statistics, there is no need to
# generate .gmo files for po4a manpages
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
echo "$(MSGFMT) -c --statistics -o /dev/null $${lang}.po"; \
$(MSGFMT) -c --statistics -o /dev/null $${lang}.po

View file

@ -1,30 +1,136 @@
#
# This makefile was created with the sole purpose of emulating the
# makefiles of the rest of domains (and thus make updates easily
# scriptable).
#
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.4
DOMAIN= wesnoth-manual
MSGMERGE = msgmerge
MSGFMT = msgfmt
# Default target executed when no arguments are given to make.
default_target: all
.SUFFIXES: .gmo .po .po-update
#=============================================================================
# Special targets provided by cmake.
.po.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
tmpdir=`pwd`; \
echo "$$lang:"; \
echo "$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
mv -f $$tmpdir/$$lang.new.po $$lang.po; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
# Disable implicit rules so canoncical targets will work.
.SUFFIXES:
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /usr/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/mog/src/wesnoth
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/mog/src/wesnoth
# Include the progress variables for this target.
include CMakeFiles/progress.make
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
cd /home/mog/src/wesnoth/po/wesnoth-manual && /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
cd /home/mog/src/wesnoth/po/wesnoth-manual && /usr/bin/cmake -P cmake_install.cmake
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
cd /home/mog/src/wesnoth/po/wesnoth-manual && /usr/bin/cmake -P cmake_install.cmake
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
cd /home/mog/src/wesnoth/po/wesnoth-manual && /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
# Special rule for the target install/local
install/local/fast: install/local
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
cd /home/mog/src/wesnoth/po/wesnoth-manual && /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
# The main all target
all: cmake_check_build_system
cd /home/mog/src/wesnoth && $(CMAKE_COMMAND) -E cmake_progress_start /home/mog/src/wesnoth/CMakeFiles $(CMAKE_ALL_PROGRESS)
cd /home/mog/src/wesnoth && $(MAKE) -f CMakeFiles/Makefile2 po/wesnoth-manual/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/mog/src/wesnoth/CMakeFiles 0
# The main clean target
clean:
cd /home/mog/src/wesnoth && $(MAKE) -f CMakeFiles/Makefile2 po/wesnoth-manual/clean
# The main clean target
clean/fast: clean
# Prepare targets for installation.
preinstall: all
cd /home/mog/src/wesnoth && $(MAKE) -f CMakeFiles/Makefile2 po/wesnoth-manual/preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/mog/src/wesnoth && $(MAKE) -f CMakeFiles/Makefile2 po/wesnoth-manual/preinstall
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
# Help Target
help::
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... install"
@echo "... install/local"
@echo "... list_install_components"
@echo "... rebuild_cache"
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/mog/src/wesnoth && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
# this dummy rule only displays the statistics, there is no need to
# generate .gmo files for po4a manpages
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
echo "$(MSGFMT) -c --statistics -o /dev/null $${lang}.po"; \
$(MSGFMT) -c --statistics -o /dev/null $${lang}.po

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

10
po/wesnoth-tb/.gitignore vendored Normal file
View file

@ -0,0 +1,10 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in
POTFILES
stamp-po
remove-potcdate.sed
*.gmo

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})

View file

@ -1,3 +1,6 @@
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
Makefile.in
Makefile.in.in

11
po/wesnoth/CMakeLists.txt Normal file
View file

@ -0,0 +1,11 @@
#get domain from current dir
file(RELATIVE_PATH REL ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR} )
set(DOMAIN ${REL})
file(READ LINGUAS LINGUAS)
string(REPLACE "\n" "" LINGUAS ${LINGUAS})
separate_arguments(LINGUAS)
ADD_POT_TARGET(${DOMAIN})
ADD_PO_TARGETS(${DOMAIN} ${LINGUAS})
ADD_MO_TARGETS(${DOMAIN} ${LINGUAS})