mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:19:43 +00:00
Autogenerate the shebang lines for tools/opt-viewer
Summary: Since these files depend on the built python modules, they need to use the right python binary to run them. So use configure_file to set the right shebang line. Patch By: cbiesinger (Christian Biesinger) Reviewers: chandlerc, beanz, anemet Reviewed By: anemet Subscribers: compnerd, JDevlieghere, mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65983 llvm-svn: 369486
This commit is contained in:
parent
a1004684f5
commit
91c7b0fa0a
@ -660,6 +660,8 @@ if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
|
||||
message(FATAL_ERROR "Python 2.7 or newer is required")
|
||||
endif()
|
||||
|
||||
get_filename_component(PYTHON_BASENAME ${PYTHON_EXECUTABLE} NAME)
|
||||
|
||||
######
|
||||
# LLVMBuild Integration
|
||||
#
|
||||
|
@ -1,13 +1,28 @@
|
||||
set (files
|
||||
"optpmap.py"
|
||||
"style.css")
|
||||
|
||||
set (generated_files
|
||||
"opt-diff.py"
|
||||
"opt-stats.py"
|
||||
"opt-viewer.py"
|
||||
"optpmap.py"
|
||||
"optrecord.py"
|
||||
"style.css")
|
||||
"optrecord.py")
|
||||
|
||||
foreach (file ${generated_files})
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${file}.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${file})
|
||||
endforeach (file)
|
||||
|
||||
foreach (file ${files})
|
||||
install(PROGRAMS ${file}
|
||||
DESTINATION share/opt-viewer
|
||||
COMPONENT opt-viewer)
|
||||
endforeach (file)
|
||||
|
||||
|
||||
foreach (file ${generated_files})
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${file}
|
||||
DESTINATION share/opt-viewer
|
||||
COMPONENT opt-viewer)
|
||||
endforeach (file)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env @PYTHON_BASENAME@
|
||||
|
||||
from __future__ import print_function
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env @PYTHON_BASENAME@
|
||||
|
||||
from __future__ import print_function
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env @PYTHON_BASENAME@
|
||||
|
||||
from __future__ import print_function
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env @PYTHON_BASENAME@
|
||||
|
||||
from __future__ import print_function
|
||||
|
Loading…
Reference in New Issue
Block a user