Introduced automatic buildstamp generation for dynamic library version

This commit is contained in:
2008-07-19 11:30:08 +00:00
parent 589f3c45f0
commit 4a7805e2cd
2 changed files with 17 additions and 14 deletions

View File

@ -32,6 +32,15 @@ libinclude_HEADERS = \
bin_PROGRAMS = \
xorriso/xorriso
# Trying to create a build timestamp file
#
BUILT_SOURCES = xorriso/xorriso_buildstamp.h
# phony targets get rebuilt every time
.PHONY: xorriso/xorriso_buildstamp.h
xorriso/xorriso_buildstamp.h:
date -u '+#define Xorriso_build_timestamP "%Y.%m.%d.%H%M%S"' >xorriso/xorriso_buildstamp.h
cat xorriso/xorriso_buildstamp.h
xorriso_xorriso_CPPFLAGS = -Ilibisoburn
xorriso_xorriso_CFLAGS = -DXorriso_with_maiN -DXorriso_with_regeX $(READLINE_DEF)
xorriso_xorriso_LDADD = libisoburn/libisoburn.la -lisofs -lburn $(THREAD_LIBS)
@ -56,7 +65,8 @@ install-exec-hook:
ln -s xorriso $(bindir)/xorrecord
# Trying to create a build timestamp file
# Outperformed by the .PHONY above. But still in for a few release cycles.
# Trying to create a build timestamp file semi-manually
#
buildstamp:
date -u '+#define Xorriso_build_timestamP "%Y.%m.%d.%H%M%S"' >xorriso/xorriso_buildstamp.h
@ -65,15 +75,8 @@ buildstamp:
# For now make buildstamped has to be performed explicitely.
buildstamped: buildstamp
make
#
# Processing of the "all:" rule happens too late.
# How to create a dependency of xorriso.c on buildstamp ?
# Not working:
# Add xorriso_buildstamp.h to xorriso_xorriso_SOURCES and make it depend
# on buildstamp. It runs. But at quite random occasions.
# xorriso/xorriso_buildstamp.h: buildstamp
#
# all: buildstamp
# ^^^ Outperformed by the .PHONY above ^^^
## Build test applications