Commit 268976b9 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Add rules for building mo files.

parent 9c98f691
...@@ -248,6 +248,7 @@ loader/wine-preloader ...@@ -248,6 +248,7 @@ loader/wine-preloader
loader/wine64 loader/wine64
loader/wine64-preloader loader/wine64-preloader
msg.pot msg.pot
po/*.mo
programs/Makeprog.rules programs/Makeprog.rules
programs/rpcss/epm.h programs/rpcss/epm.h
programs/rpcss/epm_s.c programs/rpcss/epm_s.c
......
...@@ -24,7 +24,7 @@ IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \ ...@@ -24,7 +24,7 @@ IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \
IDL_GEN_HEADERS = $(IDL_H_SRCS:.idl=.h) $(IDL_C_SRCS:.idl=.h) $(IDL_I_SRCS:.idl=.h) \ IDL_GEN_HEADERS = $(IDL_H_SRCS:.idl=.h) $(IDL_C_SRCS:.idl=.h) $(IDL_I_SRCS:.idl=.h) \
$(IDL_P_SRCS:.idl=.h) $(IDL_S_SRCS:.idl=.h) $(IDL_P_SRCS:.idl=.h) $(IDL_S_SRCS:.idl=.h)
CLEAN_FILES = *.o *.a *.so *.ln *.res *.fake *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc core CLEAN_FILES = *.o *.a *.so *.mo *.ln *.res *.fake *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc core
CLEAN_TARGETS = $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_P_SRCS:%=dlldata.c) \ CLEAN_TARGETS = $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_P_SRCS:%=dlldata.c) \
$(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) \ $(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) \
$(PO_SRCS:%=rsrc.pot) $(MC_SRCS:%=msg.pot) $(XTEMPLATE_SRCS:.x=.h) $(PO_SRCS:%=rsrc.pot) $(MC_SRCS:%=msg.pot) $(XTEMPLATE_SRCS:.x=.h)
...@@ -42,7 +42,7 @@ filter: dummy ...@@ -42,7 +42,7 @@ filter: dummy
# Implicit rules # Implicit rules
.SUFFIXES: .mc .rc .res .idl .tlb .h .y .l .tab.c .tab.h .yy.c .ok .man.in .man _c.c _i.c _p.c _s.c _r.res _t.res .cross.o @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp .SUFFIXES: .mc .rc .res .idl .tlb .h .y .l .tab.c .tab.h .yy.c .ok .man.in .man _c.c _i.c _p.c _s.c _r.res _t.res .cross.o .po .mo @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp
.c.o: .c.o:
$(CC) -c $(ALLCFLAGS) -o $@ $< $(CC) -c $(ALLCFLAGS) -o $@ $<
...@@ -107,6 +107,9 @@ filter: dummy ...@@ -107,6 +107,9 @@ filter: dummy
.svg.bmp: .svg.bmp:
CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@ CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@
.po.mo:
$(MSGFMT) -o $@ $<
# Rules for IDL files # Rules for IDL files
dlldata.c: $(WIDL) Makefile.in dlldata.c: $(WIDL) Makefile.in
......
...@@ -50,9 +50,11 @@ FONTFORGE = @FONTFORGE@ ...@@ -50,9 +50,11 @@ FONTFORGE = @FONTFORGE@
RSVG = @RSVG@ RSVG = @RSVG@
CONVERT = @CONVERT@ CONVERT = @CONVERT@
ICOTOOL = @ICOTOOL@ ICOTOOL = @ICOTOOL@
MSGFMT = @MSGFMT@
CROSSTARGET = @CROSSTARGET@ CROSSTARGET = @CROSSTARGET@
LINGUAS = @LINGUAS@ LINGUAS = @LINGUAS@
ALL_PO_FILES = $(LINGUAS:%=@top_srcdir@/po/%.po) ALL_PO_FILES = $(LINGUAS:%=@top_srcdir@/po/%.po)
ALL_MO_FILES = $(LINGUAS:%=@top_builddir@/po/%.mo)
CROSSAR = $(CROSSTARGET)-ar CROSSAR = $(CROSSTARGET)-ar
CROSSRANLIB = $(CROSSTARGET)-ranlib CROSSRANLIB = $(CROSSTARGET)-ranlib
MKINSTALLDIRS = $(top_srcdir)/tools/mkinstalldirs -m 755 MKINSTALLDIRS = $(top_srcdir)/tools/mkinstalldirs -m 755
......
...@@ -682,6 +682,7 @@ CPP ...@@ -682,6 +682,7 @@ CPP
OPENGL_LIBS OPENGL_LIBS
XLIB XLIB
MAINTAINER_MODE MAINTAINER_MODE
MSGFMT
ICOTOOL ICOTOOL
CONVERT CONVERT
RSVG RSVG
...@@ -782,6 +783,7 @@ with_cups ...@@ -782,6 +783,7 @@ with_cups
with_curses with_curses
with_fontconfig with_fontconfig
with_freetype with_freetype
with_gettext
with_gettextpo with_gettextpo
with_gphoto with_gphoto
with_glu with_glu
...@@ -1471,6 +1473,7 @@ Optional Packages: ...@@ -1471,6 +1473,7 @@ Optional Packages:
--without-curses do not use (n)curses --without-curses do not use (n)curses
--without-fontconfig do not use fontconfig --without-fontconfig do not use fontconfig
--without-freetype do not use the FreeType library --without-freetype do not use the FreeType library
--without-gettext do not use gettext
--without-gettextpo do not use the GetTextPO library --without-gettextpo do not use the GetTextPO library
--without-gphoto do not use gphoto (Digital Camera support) --without-gphoto do not use gphoto (Digital Camera support)
--without-glu do not use the GLU library --without-glu do not use the GLU library
...@@ -2559,6 +2562,12 @@ if test "${with_freetype+set}" = set; then : ...@@ -2559,6 +2562,12 @@ if test "${with_freetype+set}" = set; then :
fi fi
# Check whether --with-gettext was given.
if test "${with_gettext+set}" = set; then :
withval=$with_gettext;
fi
# Check whether --with-gettextpo was given. # Check whether --with-gettextpo was given.
if test "${with_gettextpo+set}" = set; then : if test "${with_gettextpo+set}" = set; then :
withval=$with_gettextpo; if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi withval=$with_gettextpo; if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi
...@@ -4817,7 +4826,6 @@ then ...@@ -4817,7 +4826,6 @@ then
fi fi
for ac_prog in fontforge for ac_prog in fontforge
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
...@@ -5033,6 +5041,49 @@ fi ...@@ -5033,6 +5041,49 @@ fi
done done
test -n "$ICOTOOL" || ICOTOOL="false" test -n "$ICOTOOL" || ICOTOOL="false"
for ac_prog in msgfmt
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_MSGFMT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$MSGFMT"; then
ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_MSGFMT="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
MSGFMT=$ac_cv_prog_MSGFMT
if test -n "$MSGFMT"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
$as_echo "$MSGFMT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$MSGFMT" && break
done
test -n "$MSGFMT" || MSGFMT="false"
if test "x$enable_maintainer_mode" != "xyes" if test "x$enable_maintainer_mode" != "xyes"
then then
...@@ -5097,6 +5148,19 @@ $as_echo "yes ($icotool_version_major.$icotool_version_minor)" >&6; } ...@@ -5097,6 +5148,19 @@ $as_echo "yes ($icotool_version_major.$icotool_version_minor)" >&6; }
fi fi
fi fi
with_gettext=yes
with_gettextpo=yes
{ ac_cv_header_gettext_po_h=; unset ac_cv_header_gettext_po_h;}
fi
test "x$with_gettext" != xno || MSGFMT=false
if test "$MSGFMT" = false; then :
case "x$with_gettext" in
x) as_fn_append wine_warnings "|gettext tools not found, translations won't be built." ;;
xno) ;;
*) as_fn_error $? "gettext tools not found, translations won't be built.
This is an error since --with-gettext was requested." "$LINENO" 5 ;;
esac
fi fi
...@@ -14616,6 +14680,8 @@ if test "x$enable_fonts" != xno; then ...@@ -14616,6 +14680,8 @@ if test "x$enable_fonts" != xno; then
ac_config_links="$ac_config_links fonts/tahomabd.ttf:fonts/tahomabd.ttf" ac_config_links="$ac_config_links fonts/tahomabd.ttf:fonts/tahomabd.ttf"
test "$srcdir" = "." || wine_fn_config_symlink fonts/tahomabd.ttf test "$srcdir" = "." || wine_fn_config_symlink fonts/tahomabd.ttf
fi fi
ac_config_links="$ac_config_links po/LINGUAS:po/LINGUAS"
test "$srcdir" = "." || wine_fn_config_symlink po/LINGUAS
if test "x$enable_tools" != xno; then if test "x$enable_tools" != xno; then
ac_config_links="$ac_config_links tools/l_intl.nls:tools/l_intl.nls" ac_config_links="$ac_config_links tools/l_intl.nls:tools/l_intl.nls"
test "$srcdir" = "." || wine_fn_config_symlink tools/l_intl.nls test "$srcdir" = "." || wine_fn_config_symlink tools/l_intl.nls
...@@ -15366,13 +15432,17 @@ then ...@@ -15366,13 +15432,17 @@ then
@echo timestamp > \$@ @echo timestamp > \$@
ALL_POT_FILES =$ALL_POT_FILES ALL_POT_FILES =$ALL_POT_FILES
all: \$(ALL_PO_FILES)
\$(ALL_PO_FILES): \$(srcdir)/po/wine.pot \$(ALL_PO_FILES): \$(srcdir)/po/wine.pot
msgmerge -q \$@ \$(srcdir)/po/wine.pot | msgattrib --no-obsolete -o \$@.new && mv \$@.new \$@ msgmerge -q \$@ \$(srcdir)/po/wine.pot | msgattrib --no-obsolete -o \$@.new && mv \$@.new \$@
\$(srcdir)/po/wine.pot: \$(ALL_POT_FILES) \$(srcdir)/po/wine.pot: \$(ALL_POT_FILES)
msgcat -o \$@ \$(ALL_POT_FILES)" msgcat -o \$@ \$(ALL_POT_FILES)"
fi fi
if test "$MSGFMT" != false
then
wine_fn_append_rule ALL_MAKEFILE_DEPENDS "__builddeps__: \$(ALL_MO_FILES)"
fi
if test "x$enable_tools" != xno if test "x$enable_tools" != xno
then then
wine_fn_append_rule ALL_MAKEFILE_DEPENDS "\$(MAKEDEP): tools/Makefile wine_fn_append_rule ALL_MAKEFILE_DEPENDS "\$(MAKEDEP): tools/Makefile
...@@ -16123,6 +16193,7 @@ do ...@@ -16123,6 +16193,7 @@ do
"fonts/symbol.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/symbol.ttf:fonts/symbol.ttf" ;; "fonts/symbol.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/symbol.ttf:fonts/symbol.ttf" ;;
"fonts/tahoma.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/tahoma.ttf:fonts/tahoma.ttf" ;; "fonts/tahoma.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/tahoma.ttf:fonts/tahoma.ttf" ;;
"fonts/tahomabd.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/tahomabd.ttf:fonts/tahomabd.ttf" ;; "fonts/tahomabd.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/tahomabd.ttf:fonts/tahomabd.ttf" ;;
"po/LINGUAS") CONFIG_LINKS="$CONFIG_LINKS po/LINGUAS:po/LINGUAS" ;;
"tools/l_intl.nls") CONFIG_LINKS="$CONFIG_LINKS tools/l_intl.nls:tools/l_intl.nls" ;; "tools/l_intl.nls") CONFIG_LINKS="$CONFIG_LINKS tools/l_intl.nls:tools/l_intl.nls" ;;
"wine") CONFIG_LINKS="$CONFIG_LINKS wine:tools/winewrapper" ;; "wine") CONFIG_LINKS="$CONFIG_LINKS wine:tools/winewrapper" ;;
"wine64") CONFIG_LINKS="$CONFIG_LINKS wine64:tools/winewrapper" ;; "wine64") CONFIG_LINKS="$CONFIG_LINKS wine64:tools/winewrapper" ;;
......
...@@ -45,6 +45,7 @@ AC_ARG_WITH(curses, AS_HELP_STRING([--without-curses],[do not use (n)curses]) ...@@ -45,6 +45,7 @@ AC_ARG_WITH(curses, AS_HELP_STRING([--without-curses],[do not use (n)curses])
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]), AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]),
[if test "x$withval" = "xno"; then ac_cv_header_fontconfig_fontconfig_h=no; fi]) [if test "x$withval" = "xno"; then ac_cv_header_fontconfig_fontconfig_h=no; fi])
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library])) AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
AC_ARG_WITH(gettext, AS_HELP_STRING([--without-gettext],[do not use gettext]))
AC_ARG_WITH(gettextpo, AS_HELP_STRING([--without-gettextpo],[do not use the GetTextPO library]), AC_ARG_WITH(gettextpo, AS_HELP_STRING([--without-gettextpo],[do not use the GetTextPO library]),
[if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi]) [if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi])
AC_ARG_WITH(gphoto, AS_HELP_STRING([--without-gphoto],[do not use gphoto (Digital Camera support)])) AC_ARG_WITH(gphoto, AS_HELP_STRING([--without-gphoto],[do not use gphoto (Digital Camera support)]))
...@@ -280,7 +281,6 @@ then ...@@ -280,7 +281,6 @@ then
LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4" LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64' dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
fi fi
AC_SUBST(LINT)
AC_SUBST(LINTFLAGS) AC_SUBST(LINTFLAGS)
dnl Check for various programs dnl Check for various programs
...@@ -289,6 +289,7 @@ AC_CHECK_PROGS(PKG_CONFIG, pkg-config, false) ...@@ -289,6 +289,7 @@ AC_CHECK_PROGS(PKG_CONFIG, pkg-config, false)
AC_CHECK_PROGS(RSVG, rsvg, false) AC_CHECK_PROGS(RSVG, rsvg, false)
AC_CHECK_PROGS(CONVERT, convert, false) AC_CHECK_PROGS(CONVERT, convert, false)
AC_CHECK_PROGS(ICOTOOL, icotool, false) AC_CHECK_PROGS(ICOTOOL, icotool, false)
AC_CHECK_PROGS(MSGFMT, msgfmt, false)
if test "x$enable_maintainer_mode" != "xyes" if test "x$enable_maintainer_mode" != "xyes"
then then
...@@ -348,8 +349,16 @@ else ...@@ -348,8 +349,16 @@ else
fi fi
fi fi
dnl Maintainer mode requires gettext
with_gettext=yes
with_gettextpo=yes
AS_UNSET(ac_cv_header_gettext_po_h)
fi fi
test "x$with_gettext" != xno || MSGFMT=false
WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false],
[gettext tools not found, translations won't be built.])
dnl **** Check for some libraries **** dnl **** Check for some libraries ****
dnl Check for -li386 for NetBSD and OpenBSD dnl Check for -li386 for NetBSD and OpenBSD
...@@ -2328,6 +2337,7 @@ WINE_CONFIG_SYMLINK(fonts/marlett.ttf,,enable_fonts) ...@@ -2328,6 +2337,7 @@ WINE_CONFIG_SYMLINK(fonts/marlett.ttf,,enable_fonts)
WINE_CONFIG_SYMLINK(fonts/symbol.ttf,,enable_fonts) WINE_CONFIG_SYMLINK(fonts/symbol.ttf,,enable_fonts)
WINE_CONFIG_SYMLINK(fonts/tahoma.ttf,,enable_fonts) WINE_CONFIG_SYMLINK(fonts/tahoma.ttf,,enable_fonts)
WINE_CONFIG_SYMLINK(fonts/tahomabd.ttf,,enable_fonts) WINE_CONFIG_SYMLINK(fonts/tahomabd.ttf,,enable_fonts)
WINE_CONFIG_SYMLINK(po/LINGUAS)
WINE_CONFIG_SYMLINK(tools/l_intl.nls,,enable_tools) WINE_CONFIG_SYMLINK(tools/l_intl.nls,,enable_tools)
WINE_CONFIG_SYMLINK(wine,tools/winewrapper) WINE_CONFIG_SYMLINK(wine,tools/winewrapper)
WINE_CONFIG_SYMLINK(wine64,tools/winewrapper,enable_win64) WINE_CONFIG_SYMLINK(wine64,tools/winewrapper,enable_win64)
...@@ -3056,13 +3066,17 @@ then ...@@ -3056,13 +3066,17 @@ then
@echo timestamp > \$[@] @echo timestamp > \$[@]
ALL_POT_FILES =$ALL_POT_FILES ALL_POT_FILES =$ALL_POT_FILES
all: \$(ALL_PO_FILES)
\$(ALL_PO_FILES): \$(srcdir)/po/wine.pot \$(ALL_PO_FILES): \$(srcdir)/po/wine.pot
msgmerge -q \$[@] \$(srcdir)/po/wine.pot | msgattrib --no-obsolete -o \$[@].new && mv \$[@].new \$[@] msgmerge -q \$[@] \$(srcdir)/po/wine.pot | msgattrib --no-obsolete -o \$[@].new && mv \$[@].new \$[@]
\$(srcdir)/po/wine.pot: \$(ALL_POT_FILES) \$(srcdir)/po/wine.pot: \$(ALL_POT_FILES)
msgcat -o \$[@] \$(ALL_POT_FILES)]) msgcat -o \$[@] \$(ALL_POT_FILES)])
fi fi
if test "$MSGFMT" != false
then
WINE_APPEND_RULE([ALL_MAKEFILE_DEPENDS],[__builddeps__: \$(ALL_MO_FILES)])
fi
if test "x$enable_tools" != xno if test "x$enable_tools" != xno
then then
WINE_APPEND_RULE([ALL_MAKEFILE_DEPENDS], WINE_APPEND_RULE([ALL_MAKEFILE_DEPENDS],
......
...@@ -97,6 +97,7 @@ my @ignores = ( ...@@ -97,6 +97,7 @@ my @ignores = (
"include/config.h", "include/config.h",
"include/stamp-h", "include/stamp-h",
"msg.pot", "msg.pot",
"po/*.mo",
"programs/winetest/build.nfo", "programs/winetest/build.nfo",
"programs/winetest/build.rc", "programs/winetest/build.rc",
"rsrc.pot", "rsrc.pot",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment