1##===- tools/scan-build/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 10CLANG_LEVEL := ../.. 11 12include $(CLANG_LEVEL)/../../Makefile.config 13include $(CLANG_LEVEL)/Makefile 14 15ifeq ($(HOST_OS),MingW) 16 Suffix := .bat 17endif 18 19CLANG_INSTALL_SCANBUILD ?= 1 20 21ifeq ($(CLANG_INSTALL_SCANBUILD), 1) 22 InstallTargets := $(ToolDir)/scan-build$(Suffix) \ 23 $(LibexecDir)/c++-analyzer$(Suffix) \ 24 $(LibexecDir)/ccc-analyzer$(Suffix) \ 25 $(ShareDir)/scan-build/scanview.css \ 26 $(ShareDir)/scan-build/sorttable.js \ 27 $(ShareDir)/man/man1/scan-build.1 28 29 ifeq ($(HOST_OS),Darwin) 30 InstallTargets := $(InstallTargets) $(ToolDir)/set-xcode-analyzer 31 endif 32endif 33 34all:: $(InstallTargets) 35 36$(ToolDir)/%: bin/% Makefile $(ToolDir)/.dir 37 $(Echo) "Copying $(notdir $<) to the 'bin' directory..." 38 $(Verb)cp $< $@ 39 $(Verb)chmod +x $@ 40 41$(LibexecDir)/%: libexec/% Makefile $(LibexecDir)/.dir 42 $(Echo) "Copying $(notdir $<) to the 'libexec' directory..." 43 $(Verb)cp $< $@ 44 $(Verb)chmod +x $@ 45 46$(ShareDir)/man/man1/%: man/% Makefile $(ShareDir)/man/man1/.dir 47 $(Echo) "Copying $(notdir $<) to the 'man' directory..." 48 $(Verb)cp $< $@ 49 50$(ShareDir)/scan-build/%: share/scan-build/% Makefile $(ShareDir)/scan-build/.dir 51 $(Echo) "Copying $(notdir $<) to the 'share' directory..." 52 $(Verb)cp $< $@ 53 54