mirror of https://github.com/OpenTTD/OpenTTD
(svn r23576) -Codechange: split the base of strgen with the strgen code that creates the actual .lng files
parent
c97b2a5224
commit
1f083c3ac8
|
@ -42,6 +42,10 @@ RES := $(shell mkdir -p $(BIN_DIR)/lang )
|
||||||
|
|
||||||
all: table/strings.h $(LANGS)
|
all: table/strings.h $(LANGS)
|
||||||
|
|
||||||
|
strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
||||||
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||||
|
|
||||||
strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
|
||||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||||
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
|
||||||
|
@ -62,7 +66,7 @@ lang/english.txt: $(LANG_DIR)/english.txt
|
||||||
$(Q)mkdir -p lang
|
$(Q)mkdir -p lang
|
||||||
$(Q)cp $(LANG_DIR)/english.txt lang/english.txt
|
$(Q)cp $(LANG_DIR)/english.txt lang/english.txt
|
||||||
|
|
||||||
$(STRGEN): alloc_func.o string.o strgen.o getoptdata.o
|
$(STRGEN): alloc_func.o string.o strgen_base.o strgen.o getoptdata.o
|
||||||
$(E) '$(STAGE) Compiling and Linking $@'
|
$(E) '$(STAGE) Compiling and Linking $@'
|
||||||
$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -138,4 +138,14 @@ struct LanguageWriter {
|
||||||
void WriteLang(const StringData &data);
|
void WriteLang(const StringData &data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void CDECL strgen_warning(const char *s, ...) WARN_FORMAT(1, 2);
|
||||||
|
void CDECL strgen_error(const char *s, ...) WARN_FORMAT(1, 2);
|
||||||
|
void NORETURN CDECL strgen_fatal(const char *s, ...) WARN_FORMAT(1, 2);
|
||||||
|
char *ParseWord(char **buf);
|
||||||
|
|
||||||
|
extern const char *_file;
|
||||||
|
extern int _cur_line;
|
||||||
|
extern int _errors, _warnings, _show_todo;
|
||||||
|
extern LanguagePackHeader _lang;
|
||||||
|
|
||||||
#endif /* STRGEN_H */
|
#endif /* STRGEN_H */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -30,9 +30,9 @@ struct CmdStruct {
|
||||||
CmdFlags flags;
|
CmdFlags flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void EmitSingleChar(Buffer *buffer, char *buf, int value);
|
extern void EmitSingleChar(Buffer *buffer, char *buf, int value);
|
||||||
static void EmitPlural(Buffer *buffer, char *buf, int value);
|
extern void EmitPlural(Buffer *buffer, char *buf, int value);
|
||||||
static void EmitGender(Buffer *buffer, char *buf, int value);
|
extern void EmitGender(Buffer *buffer, char *buf, int value);
|
||||||
|
|
||||||
static const CmdStruct _cmd_structs[] = {
|
static const CmdStruct _cmd_structs[] = {
|
||||||
/* Font size */
|
/* Font size */
|
||||||
|
|
Loading…
Reference in New Issue