changeset 15902:a28e6fe274d7 draft

(svn r20586) -Codechange: silence nforenum and grfcodec progress output (if possible)
author rubidium <rubidium@openttd.org>
date Sat, 21 Aug 2010 10:57:01 +0000
parents 531a292b682f
children 7585966382b1
files Makefile.grf.in
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.grf.in
+++ b/Makefile.grf.in
@@ -23,6 +23,7 @@
 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 @@
 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 @@
 
 # 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.