make all now compiles .mo catalogs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
658974ae66
commit
818ff14582
15
Makefile.in
15
Makefile.in
@ -132,7 +132,7 @@ DISTDIR=./_dist_dir/$(DISTDIRNAME)
|
||||
|
||||
############################## Files ##################################
|
||||
|
||||
WX_LINGUAS = `cd $(top_srcdir)/locale && ls *.mo 2> /dev/null | sed -n 's/\.mo//p'`
|
||||
WX_LINGUAS = `cd $(top_builddir)/locale; ls *.mo 2> /dev/null | sed -n 's/\.mo//p'`
|
||||
|
||||
# this line will include a file which defines ALL_SOURCES, ALL_OBJECTS,
|
||||
# ALL_DEPFILES and ALL_HEADERS variables with the complete list of .cpp, .o,
|
||||
@ -312,7 +312,7 @@ IODBCOBJS = \
|
||||
SONAME_FLAGS = @SONAME_FLAGS@
|
||||
SONAME_FLAGS_GL = @SONAME_FLAGS_GL@
|
||||
|
||||
all: @WX_ALL@
|
||||
all: @WX_ALL@ locale_files
|
||||
|
||||
$(build_libdir)/@WX_LIBRARY_NAME_STATIC@: $(OBJECTS)
|
||||
@$(INSTALL) -d $(build_libdir)
|
||||
@ -377,6 +377,8 @@ lexer.c: $(COMMDIR)/lexer.l
|
||||
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
locale_files:
|
||||
@(cd locale && $(MAKE))
|
||||
|
||||
CREATE_INSTALLED_LINKS: preinstall
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK1@
|
||||
@ -450,8 +452,8 @@ preinstall: $(build_libdir)/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLCHAIN_NAM
|
||||
@for p in $(WX_LINGUAS); do \
|
||||
if test ! -d $(localedir)/$$p; then $(INSTALL) -d $(localedir)/$$p; fi;\
|
||||
if test ! -d $(localedir)/$$p/LC_MESSAGES; then $(INSTALL) -d $(localedir)/$$p/LC_MESSAGES; fi;\
|
||||
$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \
|
||||
echo "$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo"; \
|
||||
$(INSTALL_DATA) locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \
|
||||
echo "$(INSTALL_DATA) locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo"; \
|
||||
done
|
||||
|
||||
preinstall_res: $(build_libdir)/@WX_RESOURCES_MACOSX_COMPILED@
|
||||
@ -1288,11 +1290,10 @@ MISC_DIST: ALL_GUI_DIST
|
||||
mkdir $(DISTDIR)/misc/gs_afm
|
||||
cp $(MISCDIR)/gs_afm/*.afm $(DISTDIR)/misc/gs_afm
|
||||
|
||||
INTL_DIST:
|
||||
INTL_DIST: locale_files
|
||||
mkdir $(DISTDIR)/locale
|
||||
cp $(INTLDIR)/Makefile $(DISTDIR)/locale
|
||||
cp $(INTLDIR)/Makefile.in $(DISTDIR)/locale
|
||||
cp $(INTLDIR)/*.po $(DISTDIR)/locale
|
||||
-cp $(INTLDIR)/*.mo $(DISTDIR)/locale
|
||||
|
||||
MANUAL_DIST:
|
||||
mkdir $(DISTDIR)/docs
|
||||
|
22
configure
vendored
22
configure
vendored
@ -8369,17 +8369,17 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
echo $ac_n "checking for --enable-ico_cur""... $ac_c" 1>&6
|
||||
echo "configure:8374: checking for --enable-ico_cur" >&5
|
||||
echo $ac_n "checking for --enable-icocur""... $ac_c" 1>&6
|
||||
echo "configure:8374: checking for --enable-icocur" >&5
|
||||
no_cache=0
|
||||
# Check whether --enable-ico_cur or --disable-ico_cur was given.
|
||||
if test "${enable_ico_cur+set}" = set; then
|
||||
enableval="$enable_ico_cur"
|
||||
# Check whether --enable-icocur or --disable-icocur was given.
|
||||
if test "${enable_icocur+set}" = set; then
|
||||
enableval="$enable_icocur"
|
||||
|
||||
if test "$enableval" = yes; then
|
||||
ac_cv_use_ico_cur='wxUSE_ICO_CUR=yes'
|
||||
ac_cv_use_icocur='wxUSE_ICO_CUR=yes'
|
||||
else
|
||||
ac_cv_use_ico_cur='wxUSE_ICO_CUR=no'
|
||||
ac_cv_use_icocur='wxUSE_ICO_CUR=no'
|
||||
fi
|
||||
|
||||
else
|
||||
@ -8391,14 +8391,14 @@ else
|
||||
no_cache=1
|
||||
fi
|
||||
|
||||
ac_cv_use_ico_cur='wxUSE_ICO_CUR='$DEFAULT_wxUSE_ICO_CUR
|
||||
ac_cv_use_icocur='wxUSE_ICO_CUR='$DEFAULT_wxUSE_ICO_CUR
|
||||
|
||||
fi
|
||||
|
||||
|
||||
eval "$ac_cv_use_ico_cur"
|
||||
eval "$ac_cv_use_icocur"
|
||||
if test "$no_cache" != 1; then
|
||||
echo $ac_cv_use_ico_cur >> ${wx_arg_cache_file}.tmp
|
||||
echo $ac_cv_use_icocur >> ${wx_arg_cache_file}.tmp
|
||||
fi
|
||||
|
||||
if test "$wxUSE_ICO_CUR" = yes; then
|
||||
@ -19782,6 +19782,7 @@ trap 'rm -fr `echo "
|
||||
src/makeprog.env
|
||||
src/makelib.env
|
||||
Makefile
|
||||
locale/Makefile
|
||||
setup.h:setup.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
@ -19965,6 +19966,7 @@ CONFIG_FILES=\${CONFIG_FILES-"wx-config
|
||||
src/makeprog.env
|
||||
src/makelib.env
|
||||
Makefile
|
||||
locale/Makefile
|
||||
"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
@ -1360,7 +1360,7 @@ WX_ARG_ENABLE(gif, [ --enable-gif use gif images (GIF file f
|
||||
WX_ARG_ENABLE(pcx, [ --enable-pcx use pcx images (PCX file format)], wxUSE_PCX)
|
||||
WX_ARG_ENABLE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM)
|
||||
WX_ARG_ENABLE(xpm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM)
|
||||
WX_ARG_ENABLE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR)
|
||||
WX_ARG_ENABLE(icocur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR)
|
||||
|
||||
fi
|
||||
dnl for GUI only
|
||||
@ -5048,6 +5048,7 @@ AC_OUTPUT([
|
||||
src/makeprog.env
|
||||
src/makelib.env
|
||||
Makefile
|
||||
locale/Makefile
|
||||
],
|
||||
[
|
||||
dnl This test is required to make the following idempotent.
|
||||
|
@ -1,50 +0,0 @@
|
||||
# this is the makefile for generating wxstd.po message catalog file and
|
||||
# building lang.mo files from the translated lang.po catalogs
|
||||
|
||||
# this makefile may be invoked to build either wxstd.po or any lang.mo
|
||||
|
||||
# Autodetect the languages we support. Currently this relies on make
|
||||
# being called with this dir as the cwd, but if we generate this file
|
||||
# with configure an explicit path should be specified -- RL.
|
||||
|
||||
WX_LINGUAS := `ls *.po 2> /dev/null | sed -n 's/\(wxstd\)\?\.po//p'`
|
||||
|
||||
# the programs we use (TODO: use configure to detect them)
|
||||
MSGFMT=msgfmt --verbose
|
||||
MSGMERGE=msgmerge
|
||||
XGETTEXT=xgettext
|
||||
XARGS=xargs
|
||||
|
||||
# common xgettext args: C++ syntax, use the specified macro names as markers
|
||||
XGETTEXT_ARGS=-C -k_ -kwxGetTranslation -kwxTRANSLATE -s -j
|
||||
|
||||
# implicit rules
|
||||
%.mo: %.po
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
# a PO file must be updated from wxstd.po to include new translations
|
||||
%.po: wxstd.po
|
||||
if [ -f $@ ]; then $(MSGMERGE) $@ wxstd.po > $@.new && mv $@.new $@; else cp wxstd.po $@; fi
|
||||
|
||||
wxstd.po:
|
||||
touch $@
|
||||
find ../include -name "*.h" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.po
|
||||
find ../src -name "*.cpp" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.po
|
||||
find ../contrib/include -name "*.h" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.po
|
||||
find ../contrib/src -name "*.cpp" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.po
|
||||
|
||||
allpo: force-update
|
||||
@-for t in $(WX_LINGUAS); do $(MAKE) $$t.po; done
|
||||
|
||||
allmo:
|
||||
@for t in $(WX_LINGUAS); do $(MAKE) $$t.mo; done
|
||||
|
||||
force-update:
|
||||
$(RM) wxstd.po
|
||||
|
||||
# targets depending on this one will be always remade
|
||||
FORCE:
|
||||
|
||||
.PHONY: allpo allmo force-update
|
||||
|
||||
# $Id$
|
56
locale/Makefile.in
Normal file
56
locale/Makefile.in
Normal file
@ -0,0 +1,56 @@
|
||||
# this is the makefile for generating wxstd.po message catalog file and
|
||||
# building lang.mo files from the translated lang.po catalogs
|
||||
|
||||
# this makefile may be invoked to build either wxstd.po or any lang.mo
|
||||
|
||||
# Autodetect the languages we support. Currently this relies on make
|
||||
# being called with this dir as the cwd, but if we generate this file
|
||||
# with configure an explicit path should be specified -- RL.
|
||||
|
||||
WX_LINGUAS := `cd @srcdir@ ; ls *.po 2> /dev/null | sed -n 's/\(wxstd\)\?\.po//p'`
|
||||
LINGUAS_TARGETS := $(shell cd @srcdir@ ; ls *.po 2> /dev/null | sed -e 's/wxstd\.po//' | sed -e 's/po/mo/')
|
||||
|
||||
# the programs we use (TODO: use configure to detect them)
|
||||
MSGFMT=msgfmt --verbose
|
||||
MSGMERGE=msgmerge
|
||||
XGETTEXT=xgettext
|
||||
XARGS=xargs
|
||||
|
||||
# common xgettext args: C++ syntax, use the specified macro names as markers
|
||||
XGETTEXT_ARGS=-C -k_ -kwxGetTranslation -kwxTRANSLATE -s -j
|
||||
|
||||
# default target
|
||||
all: allmo
|
||||
|
||||
clean:
|
||||
$(RM) $(LINGUAS_TARGETS)
|
||||
|
||||
# implicit rules
|
||||
%.mo: @srcdir@/%.po
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
# a PO file must be updated from wxstd.po to include new translations
|
||||
@srcdir@/%.po: @srcdir@/wxstd.po
|
||||
if [ -f $@ ]; then $(MSGMERGE) $@ @srcdir@/wxstd.po > $@.new && mv $@.new $@; else cp @srcdir@/wxstd.po $@; fi
|
||||
|
||||
@srcdir@/wxstd.po:
|
||||
touch $@
|
||||
find @top_srcdir@/include -name "*.h" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o $@
|
||||
find @top_srcdir@/src -name "*.cpp" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o $@
|
||||
find @top_srcdir@/contrib/include -name "*.h" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o $@
|
||||
find @top_srcdir@/contrib/src -name "*.cpp" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o $@
|
||||
|
||||
allpo: force-update
|
||||
@-for t in $(WX_LINGUAS); do $(MAKE) @srcdir@/$$t.po; done
|
||||
|
||||
allmo: $(LINGUAS_TARGETS)
|
||||
|
||||
force-update:
|
||||
$(RM) @srcdir@/wxstd.po
|
||||
|
||||
# targets depending on this one will be always remade
|
||||
FORCE:
|
||||
|
||||
.PHONY: all allpo allmo force-update
|
||||
|
||||
# $Id$
|
@ -49,8 +49,6 @@ else
|
||||
export MAKE="make"
|
||||
fi
|
||||
|
||||
(cd locale; make allmo)
|
||||
|
||||
mkdir obj-shared
|
||||
cd obj-shared
|
||||
../configure --prefix=%{pref} --enable-soname --disable-gui --disable-std_iostreams
|
||||
|
@ -63,8 +63,6 @@ else
|
||||
export MAKE="make"
|
||||
fi
|
||||
|
||||
(cd locale; make allmo)
|
||||
|
||||
mkdir obj-shared
|
||||
cd obj-shared
|
||||
../configure --prefix=%{pref} --enable-soname --with-odbc --with-opengl
|
||||
|
@ -62,8 +62,6 @@ else
|
||||
export MAKE="make"
|
||||
fi
|
||||
|
||||
(cd locale; make allmo)
|
||||
|
||||
mkdir obj-shared
|
||||
cd obj-shared
|
||||
../configure --prefix=%{pref} --enable-soname --with-odbc --with-opengl --with-motif
|
||||
|
Loading…
Reference in New Issue
Block a user