Files @ r7811:5a33f2f08b6e
Branch filter:

Location: cpp/openttd-patchpack/source/Makefile.lang.in

miham
(svn r11361) -Update: WebTranslator2 update to 2007-10-30 19:53:53
afrikaans - 211 fixed, 22 changed by TrueTenacity (233)
brazilian_portuguese - 2 fixed by fukumori (2)
bulgarian - 3 fixed by thetitan (3)
catalan - 3 fixed, 1 changed by arnaullv (4)
croatian - 49 fixed by knovak (49)
czech - 51 fixed by Hadez (51)
danish - 55 fixed by ThomasA (55)
dutch - 2 fixed by habell (2)
estonian - 52 fixed by t2t2 (7), kristjans (45)
french - 2 fixed by Skiper (2)
german - 56 fixed by moewe2 (56)
italian - 3 fixed, 1 changed by lorenzodv (4)
japanese - 56 fixed by ickoonite (56)
latvian - 38 fixed by Gustavo (38)
norwegian_nynorsk - 56 fixed by pollux (56)
romanian - 55 fixed, 3 changed by CrystyB (16), kneekoo (42)
russian - 3 fixed by Smoky555 (3)
slovak - 2 fixed, 4 changed by lengyel (6)
slovenian - 3 fixed by Necrolyte (3)
spanish - 4 fixed by eusebio (4)
traditional_chinese - 55 fixed by xbddc (55)
ukrainian - 3 fixed, 10 changed by fevral13 (3), mad (10)
# Auto-generated file -- DO NOT EDIT

STRGEN       = !!STRGEN!!
ENDIAN_CHECK = !!ENDIAN_CHECK!!
SRC_DIR      = !!SRC_DIR!!
LANG_DIR     = !!LANG_DIR!!
BIN_DIR      = !!BIN_DIR!!
LANGS_SRC    = $(shell ls $(LANG_DIR)/*.txt)
LANGS        = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng)
CXX_BUILD    = !!CXX_BUILD!!
CFLAGS_BUILD = !!CFLAGS_BUILD!!
STRGEN_FLAGS = !!STRGEN_FLAGS!!
STAGE        = !!STAGE!!
LANG_SUPPRESS= !!LANG_SUPPRESS!!
LANG_OBJS_DIR= !!LANG_OBJS_DIR!!

ifeq ($(LANG_SUPPRESS), yes)
LANG_ERRORS = >/dev/null 2>&1
endif

# Make sure endian_host.h is reasable as if it was in the src/ dir
CFLAGS_BUILD += -I $(LANG_OBJS_DIR)

ENDIAN_TARGETS := endian_host.h endian_target.h $(ENDIAN_CHECK)

# Check if we want to show what we are doing
ifdef VERBOSE
	Q =
	E = @true
else
	Q = @
	E = @echo
endif

RES := $(shell mkdir -p $(BIN_DIR)/lang )

all: table/strings.h $(LANGS)

strgen.o: $(SRC_DIR)/strgen/strgen.cpp endian_host.h
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<

string.o: $(SRC_DIR)/string.cpp endian_host.h
	$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<

lang/english.txt: $(LANG_DIR)/english.txt
	$(Q)mkdir -p lang
	$(Q)cp $(LANG_DIR)/english.txt lang/english.txt

$(STRGEN): string.o strgen.o
	$(E) '$(STAGE) Compiling and Linking $@'
	$(Q)$(CXX_BUILD) string.o strgen.o -o $@

table/strings.h: lang/english.txt $(STRGEN)
	$(E) '$(STAGE) Generating $@'
	@mkdir -p table
	$(Q)./$(STRGEN) -s $(LANG_DIR) -d table

$(LANGS): %.lng: $(LANG_DIR)/%.txt $(STRGEN) lang/english.txt
	$(E) '$(STAGE) Compiling language $(*F)'
	$(Q)./$(STRGEN) $(STRGEN_FLAGS) -s $(LANG_DIR) -d $(LANG_OBJS_DIR) $< $(LANG_ERRORS) && cp $@ $(BIN_DIR)/lang || true # Do not fail all languages when one fails

# The targets to compile the endian-code

endian_host.h: $(ENDIAN_CHECK)
	$(E) '$(STAGE) Testing endianness for host'
	$(Q)./$(ENDIAN_CHECK) > $@

$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
	$(E) '$(STAGE) Compiling and Linking $@'
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@

depend:

clean:
	$(E) '$(STAGE) Cleaning up language files'
	$(Q)rm -f strgen.o string.o table/strings.h $(STRGEN) $(LANGS) $(LANGS:%=$(BIN_DIR)/lang/%) lang/english.* $(ENDIAN_TARGETS)

mrproper: clean

%.lng:
	@echo '$(STAGE) No such language: $(@:%.lng=%)'

.PHONY: all mrproper depend clean