From 284feb4236acf990b715551dfcdfd5b7a419f74a Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 21 Aug 2010 10:57:01 +0000 Subject: (svn r20586) -Codechange: silence nforenum and grfcodec progress output (if possible) --- Makefile.grf.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.grf.in b/Makefile.grf.in index 10a4bdcd1..963b6d4d2 100644 --- a/Makefile.grf.in +++ b/Makefile.grf.in @@ -23,6 +23,7 @@ GRF_DIR = $(ROOT_DIR)/media/extra_grf BIN_DIR = !!BIN_DIR!!/data OBJS_DIR = !!GRF_OBJS_DIR!! OS = !!OS!! +STAGE = !!STAGE!! # Check if we want to show what we are doing ifdef VERBOSE @@ -34,8 +35,8 @@ else endif # Some configurational settings for your environment. -GRFCODEC := grfcodec -NFORENUM := $(shell [ `which nforenum 2>/dev/null` ] && echo "nforenum" || echo "renum") +GRFCODEC := $(shell grfcodec -s -v >/dev/null 2>/dev/null && echo "grfcodec -s" || echo "grfcodec") +NFORENUM := $(shell nforenum -s -v >/dev/null 2>/dev/null && echo "nforenum -s" || echo "nforenum") MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum") # Some "should not be changed" settings. @@ -56,11 +57,14 @@ $(BIN_DIR)/openttd.grf: $(PCX_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites # Yeah, we'd like to use -i in the sed, but Mac OS X's sed and GNU sed just can't agree on the usage of -i. In any case either one of them fails. $(OBJS_DIR)/openttd.grf: $(PCX_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites + $(E) '$(STAGE) Assembling openttd.nfo' $(Q)-cp $(PCX_FILES) $(OBJS_DIR)/sprites 2> /dev/null $(Q) gcc -I$(GRF_DIR) -C -E - < "$(GRF_DIR)/openttd.nfo" | sed -e '/^#/d' -e '/^$$/d' > $(OBJS_DIR)/sprites/openttd.nfo $(Q) $(NFORENUM) $(OBJS_DIR)/sprites/openttd.nfo + $(E) '$(STAGE) Compiling openttd.grf' $(Q) $(GRFCODEC) -e -m1 $(OBJS_DIR)/openttd.grf $(Q) cp $(OBJS_DIR)/openttd.grf $(BIN_DIR)/openttd.grf + $(E) '$(STAGE) Updating base graphics sets' $(Q) for grf in $(BIN_DIR)/orig*.obg; do sed 's/^OPENTTD.GRF = [0-9a-f]*$$/OPENTTD.GRF = '`$(MD5SUM) $(BIN_DIR)/openttd.grf | sed 's@ .*@@'`'/' $$grf > $$grf.tmp && mv $$grf.tmp $$grf; done # Clean up temporary files. -- cgit v1.2.3-70-g09d2