# --*- Makefile -*--

# This Makefile module defines additional version string that is
# automatically generated using Version Control System (VCS)
# facilities. It can be used as an addition to the string from the
# '.version' file, especially for the versions that are in
# development, to give unambiguaous reference to the revision from
# which the source code was assembled.

VCS_VERSION := $(shell svnversion)
VCS_MESSAGE := SVN revision ${VCS_VERSION}

ifeq (${VCS_VERSION},Unversioned directory)
    VCS_VERSION := $(shell git log --format='%h' -1 2>/dev/null)
    ifeq (${VCS_VERSION},)
        VCS_MESSAGE :=
    else
        VCS_MESSAGE := GIT commit ${VCS_VERSION}
    endif
endif
