forked from oceanbase/obproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_version.mk
More file actions
32 lines (24 loc) · 1.02 KB
/
build_version.mk
File metadata and controls
32 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
BUILT_SOURCES=build_version.c
CLEANFILES=build_version.c
if UPDATE_BUILDTIME
if HAVESVNWC
$(top_srcdir)/svn_dist_version: $(top_srcdir)/FORCE
@revision@ > $@
endif
build_version.c: $(top_srcdir)/FORCE
echo -n 'const char* build_version() { return "' > $@ && @revision@ | tr -d '\n' >> $@ && echo '"; }' >> $@
echo 'const char* build_date() { return __DATE__; }' >> $@
echo 'const char* build_time() { return __TIME__; }' >> $@
echo -n 'const char* build_flags() { return "' >> $@ && echo -n $(AM_CXXFLAGS) $(CXXFLAGS) |sed s/\"//g >> $@ && echo '"; }' >> $@
$(top_srcdir)/FORCE:
else
if HAVESVNWC
$(top_srcdir)/svn_dist_version:
@revision@ > $@
endif
build_version.c:
echo -n 'const char* build_version() { return "' > $@ && @revision@ | tr -d '\n' >> $@ && echo '"; }' >> $@
echo 'const char* build_date() { return __DATE__; }' >> $@
echo 'const char* build_time() { return __TIME__; }' >> $@
echo -n 'const char* build_flags() { return "' >> $@ && echo -n $(AM_CXXFLAGS) $(CXXFLAGS) |sed s/\"//g >> $@ && echo '"; }' >> $@
endif