Generate a ver.cpp on every make all but not on make stepmania, unless ver.cpp does not exist.
This commit is contained in:
@@ -24,6 +24,23 @@ AM_CXXFLAGS += $(XCFLAGS)
|
|||||||
LIBS +=
|
LIBS +=
|
||||||
LIBS += -lpthread -lrt
|
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 = \
|
Screens = \
|
||||||
Screen.cpp Screen.h ScreenAttract.cpp ScreenAttract.h \
|
Screen.cpp Screen.h ScreenAttract.cpp ScreenAttract.h \
|
||||||
ScreenBookkeeping.cpp ScreenBookkeeping.h \
|
ScreenBookkeeping.cpp ScreenBookkeeping.h \
|
||||||
@@ -566,6 +583,7 @@ main_LDADD = \
|
|||||||
$(XLIBS) \
|
$(XLIBS) \
|
||||||
libtomcrypt.a libtommath.a
|
libtomcrypt.a libtommath.a
|
||||||
|
|
||||||
|
nodist_stepmania_SOURCES = ver.cpp
|
||||||
stepmania_SOURCES = $(main_SOURCES)
|
stepmania_SOURCES = $(main_SOURCES)
|
||||||
stepmania_LDADD = $(main_LDADD)
|
stepmania_LDADD = $(main_LDADD)
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* For RageLog */
|
||||||
|
#define HAVE_VERSION_INFO
|
||||||
|
|
||||||
#include "archutils/Common/gcc_byte_swaps.h"
|
#include "archutils/Common/gcc_byte_swaps.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user