summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile40
1 files changed, 15 insertions, 25 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index 0d30dddc9d..a789409507 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -683,31 +683,21 @@ distclean: clean clean-contrib clean-rltiles
# This information is included in crash reports, and is printed with
# "crawl -version"
-compile-flags:
- @echo "// Automatically generated by makefile" > .compflag.h
- @echo "#ifndef __included_crawl_compiler_flags_h" >> .compflag.h
- @echo "#define __included_crawl_compiler_flags_h" >> .compflag.h
-
- @echo -n "#define CRAWL_CFLAGS \"" >> .compflag.h
- @echo -n $(CFLAGS) | sed s/\"/\\\"/g >> .compflag.h
- @echo "\"" >> .compflag.h
-
- @echo -n "#define CRAWL_CFLAGS_L \"" >> .compflag.h
- @echo -n $(CFLAGS_L) | sed s/\"/\\\"/g >> .compflag.h
- @echo "\"" >> .compflag.h
-
- @echo -n "#define CRAWL_LDFLAGS \"" >> .compflag.h
- @echo -n $(LDFLAGS) | sed s/\"/\\\"/g >> .compflag.h
- @echo "\"" >> .compflag.h
-
- @echo "#endif" >> .compflag.h
-
- @if [ "`diff -N -q .compflag.h compflag.h`" ]; then \
- echo Updating compflag.h; \
- mv .compflag.h compflag.h; \
- fi
-
-compflag.h: compile-flags
+compflag.h:
+ $(QUIET_GEN)
+ @echo "// Automatically generated by makefile" > compflag.h
+ @echo "#ifndef __included_crawl_compiler_flags_h" >> compflag.h
+ @echo "#define __included_crawl_compiler_flags_h" >> compflag.h
+ @echo -n "#define CRAWL_CFLAGS \"" >> compflag.h
+ @echo -n $(CFLAGS) | sed s/\"/\\\"/g >> compflag.h
+ @echo "\"" >> compflag.h
+ @echo -n "#define CRAWL_CFLAGS_L \"" >> compflag.h
+ @echo -n $(CFLAGS_L) | sed s/\"/\\\"/g >> compflag.h
+ @echo "\"" >> compflag.h
+ @echo -n "#define CRAWL_LDFLAGS \"" >> compflag.h
+ @echo -n $(LDFLAGS) | sed s/\"/\\\"/g >> compflag.h
+ @echo "\"" >> compflag.h
+ @echo "#endif" >> compflag.h
$(GAME): $(GAME_DEPENDS) compile-flags
$(QUIET_LINK)$(CXX) $(LDFLAGS) $(EXTRA_OBJECTS) $(OBJECTS) -o $(GAME) $(LIB)