summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLars Müller2007-04-15 21:09:00 +0200
committerLars Müller2007-04-15 21:09:00 +0200
commit92aed9a2c3f3f1a816990c5d9fa22c46d177f6ec (patch)
tree9c068574e7eacf8d28106e0e8a34079427d6c894 /Makefile
parentAdd DESTDIR variable and use it in the install rule. This allows make (diff)
downloadcore-92aed9a2c3f3f1a816990c5d9fa22c46d177f6ec.tar.gz
core-92aed9a2c3f3f1a816990c5d9fa22c46d177f6ec.tar.xz
core-92aed9a2c3f3f1a816990c5d9fa22c46d177f6ec.zip
Create a file name REVISION while creating the tar ball. This is
uesfull as soon as OpenSLX is installed from the tar ball and not from inside the subversion. In this case svnversion can't provide the revision the tar ball was made from. Only append the repository resivion to the version string if OPENSLX_SVN_SNAPSHOT from the environment is set to _anything_ != "". git-svn-id: http://svn.openslx.org/svn/openslx/trunk@895 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 6e3b0b0d..85be3bf4 100644
--- a/Makefile
+++ b/Makefile
@@ -57,12 +57,10 @@ endif
#packaging tool for .deb packages too.
tarball:
- @OPENSLX_SVN_SNAPSHOT=$$( echo $${OPENSLX_SVN_SNAPSHOT} | \
- tr [:upper:] [:lower:]); \
- case "$${OPENSLX_SVN_SNAPSHOT}" in \
- yes|y|1) OPENSLX_VERSION_SVNREV=$$( svnversion) ;; \
- esac; \
+ @OPENSLX_VERSION_SVNREV=$$( svnversion); \
. ./VERSIONS; \
+ echo "OPENSLX_VERSION_SVNREV=\"$${OPENSLX_VERSION_SVNREV}\"" \
+ >REVISION; \
echo "Creating OpenSLX $${OPENSLX_VERSION_STRING} tar ball "; \
if test -e "../openslx-$${OPENSLX_VERSION_STRING}" -a \
! -L "../openslx-$${OPENSLX_VERSION_STRING}"; then \
@@ -84,7 +82,8 @@ tarball:
"openslx-$${OPENSLX_VERSION_STRING}/"; \
test "$${OPENSLX_SOURCEDIR_SYMLINK_CREATED}" = "yes" && \
rm -f "openslx-$${OPENSLX_VERSION_STRING}"; \
- cd - >/dev/null
+ cd - >/dev/null; \
+ rm REVISION
install:
@echo "Checking installation requirements..."; \
@@ -202,7 +201,11 @@ functions via\n# inclusion: '. /etc/functions' ..." \
> $(DESTDIR)$(SLX_CONFIG_PATH)/settings.local
@# create slxversion script:
- @OPENSLX_VERSION_SVNREV=$$(svnversion .); \
+ @if test -e REVISION; then \
+ . REVISION; \
+ else \
+ OPENSLX_VERSION_SVNREV=$$(svnversion .); \
+ fi; \
. ./VERSIONS; \
echo "echo $${OPENSLX_VERSION_STRING}" \
> $(DESTDIR)${SLX_BIN_PATH}/slxversion