2015-08-04 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / libcilkrts / mk / cilk-version.mk
blob76f3f4ee38e2ffdbdb0bc09a875fec36d4bcbfb9
1 #########################################################################
3 # @copyright
4 # Copyright (C) 2009-2013, Intel Corporation
5 # All rights reserved.
6 #
7 # @copyright
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions
10 # are met:
12 # * Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # * Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in
16 # the documentation and/or other materials provided with the
17 # distribution.
18 # * Neither the name of Intel Corporation nor the names of its
19 # contributors may be used to endorse or promote products derived
20 # from this software without specific prior written permission.
22 # @copyright
23 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
30 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
31 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
33 # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 # POSSIBILITY OF SUCH DAMAGE.
35 ###########################################################################
36 # cilk-version.mk
38 # The one place we look up information from the code management system
40 # Note that the build number is *only* valid on the build machines
42 ifeq ($(wildcard $(TOP)/../.hg),)
43 # If this is the open source release, there is no Mercurial repository,
44 # so set some reasonable defaults.
45 CILK_VERSION_MAJOR := 2
46 CILK_VERSION_MINOR := 0
47 CILK_VERSION_BUILD := 1
48 CILK_VERSION_REV := 0
50 CILK_VERSION_HASH := 000000000000
51 CILK_VERSION_BRANCH := oss
52 else
53 CILK_VERSION_MAJOR := 2
54 CILK_VERSION_MINOR := 0
55 CILK_VERSION_BUILD := $(firstword $(subst +, ,$(shell hg id --num)))
56 CILK_VERSION_REV := 0
58 CILK_VERSION_HASH := $(firstword $(subst +, ,$(shell hg id --id)))
59 CILK_VERSION_BRANCH := $(shell hg id --branch)
60 endif