diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 6981a02b0b..828bbda866 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -24,6 +24,23 @@ AM_CXXFLAGS += $(XCFLAGS) LIBS += LIBS += -lpthread -lrt +.PHONY: increment_version + +all: increment_version + +increment_version: + if test -e ver.cpp; then \ + build=`sed -rs 's/.*version_num = ([[:digit:]]+);/\1/;q' ver.cpp`; \ + build=`expr $$build + 1`; \ + else \ + build=0; \ + fi; \ + echo "extern const unsigned long version_num = $$build;" > ver.cpp; \ + echo "extern const char *const version_time = \"`date`\";" >> ver.cpp; + +ver.cpp: + $(MAKE) increment_version + Screens = \ Screen.cpp Screen.h ScreenAttract.cpp ScreenAttract.h \ ScreenBookkeeping.cpp ScreenBookkeeping.h \ @@ -566,6 +583,7 @@ main_LDADD = \ $(XLIBS) \ libtomcrypt.a libtommath.a +nodist_stepmania_SOURCES = ver.cpp stepmania_SOURCES = $(main_SOURCES) stepmania_LDADD = $(main_LDADD) diff --git a/stepmania/src/archutils/Unix/arch_setup.h b/stepmania/src/archutils/Unix/arch_setup.h index e741a2f68d..e6837dbfeb 100644 --- a/stepmania/src/archutils/Unix/arch_setup.h +++ b/stepmania/src/archutils/Unix/arch_setup.h @@ -24,6 +24,9 @@ #endif #endif +/* For RageLog */ +#define HAVE_VERSION_INFO + #include "archutils/Common/gcc_byte_swaps.h" #endif