Browse Source

Opportunity to generate build timestamp via make buildstamped

master
Thomas Schmitt 14 years ago
parent
commit
766129ec66
  1. 25
      Makefile.am
  2. 5
      xorriso/make_xorriso_standalone.sh
  3. 3
      xorriso/xorriso_buildstamp.h
  4. 3
      xorriso/xorriso_buildstamp_none.h
  5. 22
      xorriso/xorriso_makefile_am.txt
  6. 2
      xorriso/xorriso_timestamp.h

25
Makefile.am

@ -41,7 +41,8 @@ xorriso_xorriso_SOURCES = \
xorriso/xorriso.c \
xorriso/xorrisoburn.h \
xorriso/xorrisoburn.c \
xorriso/xorriso_timestamp.h
xorriso/xorriso_timestamp.h \
xorriso/xorriso_buildstamp.h
# Install symbolic links to the xorriso binary
@ -52,6 +53,27 @@ install-exec-hook:
if test -e $(bindir)/osirrox ; then rm $(bindir)/osirrox ; else echo ; fi
ln -s xorriso $(bindir)/osirrox
# Trying to create a build timestamp file
#
buildstamp:
date -u '+#define Xorriso_build_timestamP "%Y.%m.%d.%H%M%S"' >xorriso/xorriso_buildstamp.h
cat xorriso/xorriso_buildstamp.h
# 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
## Build test applications
noinst_PROGRAMS = \
test/compare_file
@ -129,6 +151,7 @@ EXTRA_DIST = \
COPYING \
INSTALL \
xorriso/changelog.txt \
xorriso/xorriso_buildstamp_none.h \
xorriso/README \
$(man_MANS)

5
xorriso/make_xorriso_standalone.sh

@ -124,12 +124,17 @@ copy_files \
xorriso/xorrisoburn.[ch] \
xorriso/xorriso.[ch1] \
xorriso/xorriso_private.h \
\
xorriso/xorriso_timestamp.h \
\
xorriso/changelog.txt \
xorriso/xorriso_eng.html \
xorriso/man_1_xorriso.html \
"$lone_dir"/xorriso
copy_files xorriso/xorriso_buildstamp_none.h \
"$lone_dir"/xorriso/xorriso_buildstamp.h
create_dir "$lone_dir"/test
copy_files \
test/compare_file.c \

3
xorriso/xorriso_buildstamp.h

@ -0,0 +1,3 @@
#ifndef Xorriso_build_timestamP
#define Xorriso_build_timestamP "-none-given-"
#endif

3
xorriso/xorriso_buildstamp_none.h

@ -0,0 +1,3 @@
#ifndef Xorriso_build_timestamP
#define Xorriso_build_timestamP "-none-given-"
#endif

22
xorriso/xorriso_makefile_am.txt

@ -28,6 +28,7 @@ xorriso_xorriso_SOURCES = \
xorriso/xorrisoburn.h \
xorriso/xorrisoburn.c \
xorriso/xorriso_timestamp.h \
xorriso/xorriso_buildstamp.h \
\
libisoburn/libisoburn.h \
libisoburn/isoburn.h \
@ -137,7 +138,6 @@ xorriso_xorriso_SOURCES = \
\
version.h
noinst_PROGRAMS = \
test/compare_file
@ -159,6 +159,26 @@ install-exec-hook:
if test -e $(bindir)/osirrox ; then rm $(bindir)/osirrox ; else echo ; fi
ln -s xorriso $(bindir)/osirrox
# Trying to create a build timestamp file
#
buildstamp:
date -u '+#define Xorriso_build_timestamP "%Y.%m.%d.%H%M%S"' >xorriso/xorriso_buildstamp.h
cat xorriso/xorriso_buildstamp.h
# For now make buildstamped has to be performed manually.
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
## ========================================================================= ##
# Indent source files

2
xorriso/xorriso_timestamp.h

@ -1 +1 @@
#define Xorriso_timestamP "2008.07.09.055133"
#define Xorriso_timestamP "2008.07.09.155540"

Loading…
Cancel
Save