Changeset - r15892:c047b238dbdf
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2010-08-21 10:57:01
rubidium@openttd.org
(svn r20586) -Codechange: silence nforenum and grfcodec progress output (if possible)
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
Makefile.grf.in
Show inline comments
 
@@ -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 @@ all: $(BIN_DIR)/openttd.grf
 

	
 
# 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.
0 comments (0 inline, 0 general)