diff --git a/Makefile.in b/Makefile.in index 9e1f4d77d1..1c5479b269 100644 --- a/Makefile.in +++ b/Makefile.in @@ -132,7 +132,7 @@ DISTDIR=./_dist_dir/$(DISTDIRNAME) ############################## Files ################################## -WX_LINGUAS = `cd $(top_builddir)/locale; ls *.mo 2> /dev/null | sed -n 's/\.mo//p'` +WX_LINGUAS = `cd $(top_srcdir)/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@ locale_files +all: @WX_ALL@ $(build_libdir)/@WX_LIBRARY_NAME_STATIC@: $(OBJECTS) @$(INSTALL) -d $(build_libdir) @@ -377,8 +377,6 @@ lexer.c: $(COMMDIR)/lexer.l -include $(OBJECTS:.o=.d) -locale_files: - @(cd locale && $(MAKE)) CREATE_INSTALLED_LINKS: preinstall $(RM) $(libdir)/@WX_LIBRARY_LINK1@ @@ -452,8 +450,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) locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \ - echo "$(INSTALL_DATA) locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo"; \ + $(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"; \ done preinstall_res: $(build_libdir)/@WX_RESOURCES_MACOSX_COMPILED@ @@ -1290,10 +1288,11 @@ MISC_DIST: ALL_GUI_DIST mkdir $(DISTDIR)/misc/gs_afm cp $(MISCDIR)/gs_afm/*.afm $(DISTDIR)/misc/gs_afm -INTL_DIST: locale_files +INTL_DIST: mkdir $(DISTDIR)/locale - cp $(INTLDIR)/Makefile.in $(DISTDIR)/locale + cp $(INTLDIR)/Makefile $(DISTDIR)/locale cp $(INTLDIR)/*.po $(DISTDIR)/locale + -cp $(INTLDIR)/*.mo $(DISTDIR)/locale MANUAL_DIST: mkdir $(DISTDIR)/docs diff --git a/configure b/configure index c100599b8b..3fcf04b582 100755 --- a/configure +++ b/configure @@ -8369,17 +8369,17 @@ fi fi - echo $ac_n "checking for --enable-icocur""... $ac_c" 1>&6 -echo "configure:8374: checking for --enable-icocur" >&5 + echo $ac_n "checking for --enable-ico_cur""... $ac_c" 1>&6 +echo "configure:8374: checking for --enable-ico_cur" >&5 no_cache=0 - # Check whether --enable-icocur or --disable-icocur was given. -if test "${enable_icocur+set}" = set; then - enableval="$enable_icocur" + # Check whether --enable-ico_cur or --disable-ico_cur was given. +if test "${enable_ico_cur+set}" = set; then + enableval="$enable_ico_cur" if test "$enableval" = yes; then - ac_cv_use_icocur='wxUSE_ICO_CUR=yes' + ac_cv_use_ico_cur='wxUSE_ICO_CUR=yes' else - ac_cv_use_icocur='wxUSE_ICO_CUR=no' + ac_cv_use_ico_cur='wxUSE_ICO_CUR=no' fi else @@ -8391,14 +8391,14 @@ else no_cache=1 fi - ac_cv_use_icocur='wxUSE_ICO_CUR='$DEFAULT_wxUSE_ICO_CUR + ac_cv_use_ico_cur='wxUSE_ICO_CUR='$DEFAULT_wxUSE_ICO_CUR fi - eval "$ac_cv_use_icocur" + eval "$ac_cv_use_ico_cur" if test "$no_cache" != 1; then - echo $ac_cv_use_icocur >> ${wx_arg_cache_file}.tmp + echo $ac_cv_use_ico_cur >> ${wx_arg_cache_file}.tmp fi if test "$wxUSE_ICO_CUR" = yes; then @@ -19782,7 +19782,6 @@ 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 <> $CONFIG_STATUS <<\EOF diff --git a/configure.in b/configure.in index 2b1e3ebeea..1e5be7dee3 100644 --- a/configure.in +++ b/configure.in @@ -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(icocur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR) +WX_ARG_ENABLE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR) fi dnl for GUI only @@ -5048,7 +5048,6 @@ AC_OUTPUT([ src/makeprog.env src/makelib.env Makefile - locale/Makefile ], [ dnl This test is required to make the following idempotent. diff --git a/locale/Makefile b/locale/Makefile new file mode 100644 index 0000000000..8d4123a65e --- /dev/null +++ b/locale/Makefile @@ -0,0 +1,50 @@ +# 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$ diff --git a/locale/Makefile.in b/locale/Makefile.in deleted file mode 100644 index 8323f238d6..0000000000 --- a/locale/Makefile.in +++ /dev/null @@ -1,56 +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 := `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$