Commit 196ffdf6 authored by Alexandre Julliard's avatar Alexandre Julliard

wmc: Add support for generating a po template file.

parent 45dc5bf6
DEFS = -D__WINESRC__ $(EXTRADEFS)
DEFS = -D__WINESRC__ $(EXTRADEFS)
PROGRAMS = wmc$(EXEEXT) wmc-installed
MANPAGE = wmc.man
ALL_LIBS = @LIBGETTEXTPO@ $(LIBWINE) $(LIBPORT)
C_SRCS = \
lang.c \
mcl.c \
po.c \
utils.c \
wmc.c \
write.c
......@@ -19,10 +20,10 @@ all: $(PROGRAMS)
@MAKE_RULES@
wmc$(EXEEXT): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWINE) $(LIBPORT) $(LDFLAGS) $(LDRPATH_LOCAL)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(ALL_LIBS) $(LDFLAGS) $(LDRPATH_LOCAL)
wmc-installed: $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWINE) $(LIBPORT) $(LDFLAGS) $(LDRPATH_INSTALL)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(ALL_LIBS) $(LDFLAGS) $(LDRPATH_INSTALL)
install:: wmc-installed $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) wmc-installed $(DESTDIR)$(bindir)/wmc$(EXEEXT)
......
This diff is collapsed. Click to expand it.
......@@ -48,7 +48,7 @@ static const char usage[] =
" -H file Write headerfile to file (default is inputfile.h)\n"
" -i Inline messagetable(s)\n"
" -o file Output to file (default is inputfile.rc)\n"
" -O fmt Set output format (rc, res)\n"
" -O fmt Set output format (rc, res, pot)\n"
" -u Inputfile is in unicode\n"
" -U Output unicode messagetable(s)\n"
" -v Show supported codepages and languages\n"
......@@ -121,7 +121,8 @@ FILE *yyin;
static enum
{
FORMAT_RC,
FORMAT_RES
FORMAT_RES,
FORMAT_POT
} output_format;
int getopt (int argc, char *const *argv, const char *optstring);
......@@ -221,6 +222,7 @@ int main(int argc,char *argv[])
case 'O':
if (!strcmp( optarg, "rc" )) output_format = FORMAT_RC;
else if (!strcmp( optarg, "res" )) output_format = FORMAT_RES;
else if (!strcmp( optarg, "pot" )) output_format = FORMAT_POT;
else
{
fprintf(stderr, "Output format must be rc or res\n" );
......@@ -319,6 +321,9 @@ int main(int argc,char *argv[])
case FORMAT_RES:
write_res_file( output_name );
break;
case FORMAT_POT:
write_pot_file( output_name );
break;
}
output_name = NULL;
header_name = NULL;
......
......@@ -49,8 +49,8 @@ wrc(1).
Output to \fIfile\fR. Default is \fIinputfile.rc\fR.
.TP
.BI \-O\ format
Set the output format. Supported formats are \fBrc\fR (the default)
and \fBres\fR.
Set the output format. Supported formats are \fBrc\fR (the default),
\fBres\fR, and \fBpot\fR.
.TP
.B \-u
Assume that the inputfile is in unicode.
......
......@@ -24,5 +24,6 @@ void write_h_file(const char *fname);
void write_rc_file(const char *fname);
void write_bin_files(void);
void write_res_file( const char *name );
void write_pot_file( const char *outname );
#endif
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