Reacting on ticket 138 by stick, revoked buildstamp due to ugly make install

This commit is contained in:
Thomas Schmitt 2008-07-21 15:52:59 +00:00
parent 4a7805e2cd
commit ac2b4dc8e3
3 changed files with 33 additions and 39 deletions

View File

@ -32,14 +32,18 @@ libinclude_HEADERS = \
bin_PROGRAMS = \
xorriso/xorriso
# This looks quite ugly with make install: xorriso.c is compiled twice again
#
# Trying to create a build timestamp file
#
BUILT_SOURCES = xorriso/xorriso_buildstamp.h
# 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
#
# .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)
@ -57,16 +61,16 @@ xorriso_xorriso_SOURCES = \
# Install symbolic links to the xorriso binary
#
install-exec-hook:
if test -e $(bindir)/xorrisofs ; then rm $(bindir)/xorrisofs ; else echo ; fi
ln -s xorriso $(bindir)/xorrisofs
if test -e $(bindir)/osirrox ; then rm $(bindir)/osirrox ; else echo ; fi
ln -s xorriso $(bindir)/osirrox
if test -e $(bindir)/xorrecord ; then rm $(bindir)/xorrecord ; else echo ; fi
ln -s xorriso $(bindir)/xorrecord
if test -e $(DESTDIR)$(bindir)/xorrisofs ; then rm $(DESTDIR)$(bindir)/xorrisofs ; else echo ; fi
ln -s xorriso $(DESTDIR)$(bindir)/xorrisofs
if test -e $(DESTDIR)$(bindir)/osirrox ; then rm $(DESTDIR)$(bindir)/osirrox ; else echo ; fi
ln -s xorriso $(DESTDIR)$(bindir)/osirrox
if test -e $(DESTDIR)$(bindir)/xorrecord ; then rm $(DESTDIR)$(bindir)/xorrecord ; else echo ; fi
ln -s xorriso $(DESTDIR)$(bindir)/xorrecord
# Outperformed by the .PHONY above. But still in for a few release cycles.
# Trying to create a build timestamp file semi-manually
# Alternative to the disabled .PHONY above.
# Trying to create a build timestamp file semi-manually: make buildstamped
#
buildstamp:
date -u '+#define Xorriso_build_timestamP "%Y.%m.%d.%H%M%S"' >xorriso/xorriso_buildstamp.h
@ -76,7 +80,6 @@ buildstamp:
buildstamped: buildstamp
make
# ^^^ Outperformed by the .PHONY above ^^^
## Build test applications

View File

@ -21,14 +21,16 @@ xorriso_xorriso_CFLAGS = -DXorriso_standalonE -DXorriso_with_maiN -DXorriso_with
xorriso_xorriso_LDADD = $(THREAD_LIBS)
# This looks quite ugly with make install: xorriso.c is compiled twice again
#
# Trying to create a build timestamp file
#
BUILT_SOURCES = xorriso/xorriso_buildstamp.h
# 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
# .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_SOURCES = \
@ -165,18 +167,17 @@ test_compare_file_SOURCES = test/compare_file.c
# Install symbolic links to the xorriso binary
#
install-exec-hook:
if test -e $(bindir)/xorrisofs ; then rm $(bindir)/xorrisofs ; else echo ; fi
ln -s xorriso $(bindir)/xorrisofs
if test -e $(bindir)/osirrox ; then rm $(bindir)/osirrox ; else echo ; fi
ln -s xorriso $(bindir)/osirrox
if test -e $(bindir)/xorrecord ; then rm $(bindir)/xorrecord ; else echo ; fi
ln -s xorriso $(bindir)/xorrecord
if test -e $(DESTDIR)$(bindir)/xorrisofs ; then rm $(DESTDIR)$(bindir)/xorrisofs ; else echo ; fi
ln -s xorriso $(DESTDIR)$(bindir)/xorrisofs
if test -e $(DESTDIR)$(bindir)/osirrox ; then rm $(DESTDIR)$(bindir)/osirrox ; else echo ; fi
ln -s xorriso $(DESTDIR)$(bindir)/osirrox
if test -e $(DESTDIR)$(bindir)/xorrecord ; then rm $(DESTDIR)$(bindir)/xorrecord ; else echo ; fi
ln -s xorriso $(DESTDIR)$(bindir)/xorrecord
# <<< seems to be outperformed by the .PHONY above
# Trying to create a build timestamp file
# Alternative to the disabled .PHONY above.
# Trying to create a build timestamp file semi-manually: make buildstamped
#
buildstamp:
date -u '+#define Xorriso_build_timestamP "%Y.%m.%d.%H%M%S"' >xorriso/xorriso_buildstamp.h
@ -185,17 +186,7 @@ buildstamp:
# 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
# <<< seems to be outperformed by the .PHONY above
## ========================================================================= ##

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.07.18.135540"
#define Xorriso_timestamP "2008.07.21.155324"