Skip to content
Snippets Groups Projects
Commit 86e3196c authored by Jonathan Roelofs's avatar Jonathan Roelofs
Browse files

[scan-build] Move non user-facing utilities to share

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253068 91177308-0d34-0410-b5e6-96231b3b80d8
parent d989a56b
No related branches found
No related tags found
No related merge requests found
......@@ -64,15 +64,15 @@ if(CLANG_INSTALL_SCANBUILD)
endforeach()
foreach(ShareFile ${ShareFiles})
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile}
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/share/scan-view
${CMAKE_BINARY_DIR}/share/scan-build
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile}
${CMAKE_BINARY_DIR}/share/scan-view/
${CMAKE_BINARY_DIR}/share/scan-build/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
install(FILES share/${ShareFile} DESTINATION share/scan-view)
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile})
install(FILES share/${ShareFile} DESTINATION share/scan-build)
endforeach()
add_custom_target(scan-build ALL DEPENDS ${Depends})
......
......@@ -462,7 +462,7 @@ sub CopyFiles {
my $Dir = shift;
my $JS = Cwd::realpath("$RealBin/sorttable.js");
my $JS = Cwd::realpath("$RealBin/../share/scan-build/sorttable.js");
DieDiag("Cannot find 'sorttable.js'.\n")
if (! -r $JS);
......@@ -472,7 +472,7 @@ sub CopyFiles {
DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n")
if (! -r "$Dir/sorttable.js");
my $CSS = Cwd::realpath("$RealBin/scanview.css");
my $CSS = Cwd::realpath("$RealBin/../share/scan-build/scanview.css");
DieDiag("Cannot find 'scanview.css'.\n")
if (! -r $CSS);
......
option(CLANG_INSTALL_SCANVIEW "Install the scan-view tool" ON)
set(BinFiles
Reporter.py
ScanView.py
scan-view
startfile.py)
scan-view)
set(ShareFiles
ScanView.py
Reporter.py
startfile.py
FileRadar.scpt
GetRadarVersion.scpt
bugcatcher.ico)
......
......@@ -15,10 +15,10 @@ include $(CLANG_LEVEL)/Makefile
CLANG_INSTALL_SCANVIEW ?= 1
ifeq ($(CLANG_INSTALL_SCANVIEW), 1)
InstallTargets := $(ToolDir)/Reporter.py \
$(ToolDir)/ScanView.py \
$(ToolDir)/scan-view \
$(ToolDir)/startfile.py \
InstallTargets := $(ToolDir)/scan-view \
$(ShareDir)/scan-view/Reporter.py \
$(ShareDir)/scan-view/ScanView.py \
$(ShareDir)/scan-view/startfile.py \
$(ShareDir)/scan-view/FileRadar.scpt \
$(ShareDir)/scan-view/GetRadarVersion.scpt \
$(ShareDir)/scan-view/bugcatcher.ico
......
......@@ -4,6 +4,8 @@
"""
import sys
import imp
import os
import posixpath
import thread
import time
......@@ -54,6 +56,7 @@ def start_browser(port, options):
webbrowser.open(url)
def run(port, options, root):
sys.path.append(os.path.dirname(__file__) + "/../share/scan-view")
import ScanView
try:
print 'Starting scan-view at: http://%s:%d'%(options.host,
......
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment