summaryrefslogtreecommitdiff
path: root/Makefile.grf.in
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-07-30 17:21:42 +0000
committerrubidium <rubidium@openttd.org>2014-07-30 17:21:42 +0000
commit8fa42362e984b1dbfb911b78543afc512c9863ea (patch)
tree698ecf85ae42691ab36e7d9d71353dd6da0e1278 /Makefile.grf.in
parent006212547cecd63e7af8d9f84434e2e1efd6ec69 (diff)
downloadopenttd-8fa42362e984b1dbfb911b78543afc512c9863ea.tar.xz
(svn r26708) -Codechange: replace C preprocessor with all kinds of options to prevent adding certain things to the result and the sed script to remove everything that shouldn't be in the resulting nfo file but came out of the C preprocessor by a small-ish awk program. This means no more breaking if a C preprocessor decides to add more data to the processed file (like GCC's inclusion of stdc-predef.h when not passing -nostdinc). It furthermore more than halfs the time needed for the assemble step of the extra GRF compilation
Diffstat (limited to 'Makefile.grf.in')
-rw-r--r--Makefile.grf.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.grf.in b/Makefile.grf.in
index 81089efb1..c2d058d59 100644
--- a/Makefile.grf.in
+++ b/Makefile.grf.in
@@ -75,10 +75,10 @@ $(BIN_DIR)/%.obm: $(BASESET_DIR)/%.obm $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@
# Compile extra grf
-$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites
+$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites $(GRF_DIR)/assemble_nfo.awk
$(E) '$(STAGE) Assembling openttd.nfo'
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
- $(Q) $(CC_BUILD) -nostdinc -I$(GRF_DIR) -C -E - < "$(GRF_DIR)/openttd.nfo" | sed -e '/^#/d' -e '/^$$/d' > $(OBJS_DIR)/sprites/openttd.nfo
+ $(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/openttd.nfo > $(OBJS_DIR)/sprites/openttd.nfo
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/openttd.nfo
$(E) '$(STAGE) Compiling openttd.grf'
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/openttd.grf