• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1##===- clang/lib/Basic/Makefile ----------------------------*- Makefile -*-===##
2#
3#                     The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
7#
8##===----------------------------------------------------------------------===##
9#
10#  This implements the Basic library for the C-Language front-end.
11#
12##===----------------------------------------------------------------------===##
13
14CLANG_LEVEL := ../..
15LIBRARYNAME := clangBasic
16
17include $(CLANG_LEVEL)/Makefile
18
19SVN_REVISION := $(strip \
20        $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..))
21
22SVN_REPOSITORY := $(strip \
23        $(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(PROJ_SRC_DIR)/../..))
24
25LLVM_REVISION := $(strip \
26        $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(LLVM_SRC_ROOT)))
27
28LLVM_REPOSITORY := $(strip \
29        $(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(LLVM_SRC_ROOT)))
30
31CPP.Defines += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include \
32         -DSVN_REVISION='"$(SVN_REVISION)"' -DSVN_REPOSITORY='"$(SVN_REPOSITORY)"' \
33         -DLLVM_REVISION='"$(LLVM_REVISION)"' -DLLVM_REPOSITORY='"$(LLVM_REPOSITORY)"'
34
35$(ObjDir)/.ver-svn .ver: $(ObjDir)/.dir
36	@if [ '$(SVN_REVISION) $(LLVM_REVISION)' != '$(shell cat $(ObjDir)/.ver-svn 2>/dev/null)' ]; then\
37		echo '$(SVN_REVISION) $(LLVM_REVISION)' > $(ObjDir)/.ver-svn;                    \
38	fi
39$(ObjDir)/.ver-svn: .ver
40$(ObjDir)/Version.o: $(ObjDir)/.ver-svn
41