1
0
Fork 0

(svn r181) Makefile: enabled ability to supress output of missing strings in lng files

Makefile: added versiontag for autoupdate of outdated makefile.config files
release/0.4.5
bjarni 2004-09-08 09:07:18 +00:00
parent debb158c95
commit 49773d7a9e
2 changed files with 16 additions and 10 deletions

View File

@ -81,6 +81,10 @@
# Configuration # Configuration
# #
# Makefile version tag
# it checks if the version tag in makefile.config is the same and force update outdated config files
MAKEFILE_VERSION:=1
# CONFIG_WRITER have to be found even for manual configuration # CONFIG_WRITER have to be found even for manual configuration
CONFIG_WRITER=makefiledir/Makefile.config_writer CONFIG_WRITER=makefiledir/Makefile.config_writer
@ -99,13 +103,8 @@ else
CONFIG_INCLUDED:=1 CONFIG_INCLUDED:=1
endif endif
# tests if makefile.config contains the new needed SDL-CONFIG # updates makefile.config if it's outdated
# it updates makefile.config if needed. Flags like ENABLE_NETWORK are remembered ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION))
ifndef SDL-CONFIG
ifdef WITH_SDL
ifndef MANUAL_CONFIG
#network is enabled by default
ENABLE_NETWORK:=1
UPDATECONFIG:=upgradeconf UPDATECONFIG:=upgradeconf
CONFIG_INCLUDED:= CONFIG_INCLUDED:=
else else
@ -116,8 +115,6 @@ else
SDL-CONFIG:=sdl-config SDL-CONFIG:=sdl-config
endif endif
endif endif
endif
endif
ifndef CONFIG_INCLUDED ifndef CONFIG_INCLUDED
-include $(LIB_DETECTION) -include $(LIB_DETECTION)
@ -138,6 +135,12 @@ else
WARNING_DISPLAY:=-fno-strict-aliasing WARNING_DISPLAY:=-fno-strict-aliasing
endif endif
ifdef SUPRESS_LANG_ERRORS
ifndef VERBOSE_FILTER
LANG_ERRORS = >/dev/null 2>&1
endif
endif
ifdef STATIC ifdef STATIC
ifndef WIN32 ifndef WIN32
ifndef OSX ifndef OSX
@ -546,7 +549,7 @@ table/strings.h: lang/english.lng
lang/%.lng: lang/%.txt $(STRGEN) lang/%.lng: lang/%.txt $(STRGEN)
@echo 'Generating $@'; \ @echo 'Generating $@'; \
$(STRGEN) $(STRGEN_FLAGS) $< $(VERBOSE_FILTER) $(STRGEN) $(STRGEN_FLAGS) $< $(VERBOSE_FILTER) $(LANG_ERRORS)
winres.o: ttd.rc winres.o: ttd.rc
windres -o $@ $< windres -o $@ $<

View File

@ -16,6 +16,7 @@ $(MAKE_CONFIG):
$(call CONFIG_LINE,\# Display_Warnings: when off it hides some warnings while compiling) $(call CONFIG_LINE,\# Display_Warnings: when off it hides some warnings while compiling)
$(call CONFIG_LINE,\# MIDI: sets path to midi player) $(call CONFIG_LINE,\# MIDI: sets path to midi player)
$(call CONFIG_LINE,\# MIDI_ARG: sets an argument which is used when calling the midi player. Default off) $(call CONFIG_LINE,\# MIDI_ARG: sets an argument which is used when calling the midi player. Default off)
$(call CONFIG_LINE,\# SUPRESS_LANG_ERRORS: supresses output about missing and mismatched strings)
$(call CONFIG_LINE,STATIC:=$(STATIC)) $(call CONFIG_LINE,STATIC:=$(STATIC))
$(call CONFIG_LINE,TRANSLATOR:=$(TRANSLATOR)) $(call CONFIG_LINE,TRANSLATOR:=$(TRANSLATOR))
$(call CONFIG_LINE,DISPLAY_WARNINGS:=$(DISPLAY_WARNINGS)) $(call CONFIG_LINE,DISPLAY_WARNINGS:=$(DISPLAY_WARNINGS))
@ -23,6 +24,7 @@ $(MAKE_CONFIG):
$(call CONFIG_LINE,PROFILE:=$(PROFILE)) $(call CONFIG_LINE,PROFILE:=$(PROFILE))
$(call CONFIG_LINE,MIDI:=$(MIDI)) $(call CONFIG_LINE,MIDI:=$(MIDI))
$(call CONFIG_LINE,MIDI_ARG:=$(MIDI_ARG)) $(call CONFIG_LINE,MIDI_ARG:=$(MIDI_ARG))
$(call CONFIG_LINE,SUPRESS_LANG_ERRORS:=$(SUPRESS_LANG_ERRORS))
$(call CONFIG_LINE,) $(call CONFIG_LINE,)
$(call CONFIG_LINE,\# DATA_DIR_PREFIX is the path to OpenTTD. It can be absolute or relative) $(call CONFIG_LINE,\# DATA_DIR_PREFIX is the path to OpenTTD. It can be absolute or relative)
@ -79,3 +81,4 @@ $(MAKE_CONFIG):
$(call CONFIG_LINE,SDL-CONFIG:=$(SDL-CONFIG)) $(call CONFIG_LINE,SDL-CONFIG:=$(SDL-CONFIG))
$(call CONFIG_LINE,CONFIG_INCLUDED:=yes) $(call CONFIG_LINE,CONFIG_INCLUDED:=yes)
$(call CONFIG_LINE,PATH_SET:=$(PATH_SET)) $(call CONFIG_LINE,PATH_SET:=$(PATH_SET))
$(call CONFIG_LINE,CONFIG_VERSION:=$(MAKEFILE_VERSION))