summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/.gitignore1
-rw-r--r--crawl-ref/source/makefile40
2 files changed, 15 insertions, 26 deletions
diff --git a/crawl-ref/.gitignore b/crawl-ref/.gitignore
index 2dc2260a9d..17f914c1c1 100644
--- a/crawl-ref/.gitignore
+++ b/crawl-ref/.gitignore
@@ -40,7 +40,6 @@ mapgen.log
makefile.dep
/source/.contrib-ok
/source/compflag.h
-/source/.compflag.h
# The Crawl executable.
/source/crawl
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)