Commit 5d458390 authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by Kevin Modzelewski

Add some install rules

parent 91e5a372
...@@ -1079,3 +1079,13 @@ lint_%: %.cpp plugins/clang_linter.so ...@@ -1079,3 +1079,13 @@ lint_%: %.cpp plugins/clang_linter.so
.PHONY: clang_lint .PHONY: clang_lint
clang_lint: $(foreach FN,$(MAIN_SRCS),$(dir $(FN))lint_$(notdir $(FN:.cpp=))) clang_lint: $(foreach FN,$(MAIN_SRCS),$(dir $(FN))lint_$(notdir $(FN:.cpp=)))
# 'make package' will build a package using the pgo build, since that's the
# configuration with the best performance. Testing that is a pain since it
# requires rerunning the pgo build, so there's also 'make package_nonpgo' mostly
# for testing.
package: pyston_pgo
$(NINJA) -C $(CMAKE_DIR_RELEASE_GCC_PGO) package
package_nonpgo:
$(NINJA) -C $(CMAKE_DIR_RELEASE) package
...@@ -12,6 +12,9 @@ foreach(STDLIB_FILE ${STDLIB_SRCS} ${STD_INCLUDES}) ...@@ -12,6 +12,9 @@ foreach(STDLIB_FILE ${STDLIB_SRCS} ${STD_INCLUDES})
COMMENT "Copying ${FN_REL}" COMMENT "Copying ${FN_REL}"
) )
set(STDLIB_TARGETS ${STDLIB_TARGETS} ${TARGET}) set(STDLIB_TARGETS ${STDLIB_TARGETS} ${TARGET})
get_filename_component(DIR ${FN_REL} DIRECTORY)
install(FILES ${STDLIB_FILE} DESTINATION ${DIR})
endforeach(STDLIB_FILE) endforeach(STDLIB_FILE)
add_custom_target(copy_stdlib ALL DEPENDS ${STDLIB_TARGETS}) add_custom_target(copy_stdlib ALL DEPENDS ${STDLIB_TARGETS})
...@@ -126,19 +129,22 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers -Wno-tautolo ...@@ -126,19 +129,22 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers -Wno-tautolo
add_library(FROM_CPYTHON OBJECT ${STDMODULE_SRCS} ${STDOBJECT_SRCS} ${STDPYTHON_SRCS} ${STDPARSER_SRCS}) add_library(FROM_CPYTHON OBJECT ${STDMODULE_SRCS} ${STDOBJECT_SRCS} ${STDPYTHON_SRCS} ${STDPARSER_SRCS})
add_dependencies(FROM_CPYTHON copy_stdlib) add_dependencies(FROM_CPYTHON copy_stdlib)
add_custom_command(OUTPUT set(STDMODULES
${CMAKE_BINARY_DIR}/lib_pyston/future_builtins.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/future_builtins.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/_multiprocessing.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/_multiprocessing.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/pyexpat.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/pyexpat.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/_elementtree.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/_elementtree.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/bz2.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/bz2.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/_ctypes.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/_ctypes.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/grp.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/grp.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/readline.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/readline.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/termios.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/termios.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/_curses.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/_curses.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/mmap.pyston.so ${CMAKE_BINARY_DIR}/from_cpython/Lib/mmap.pyston.so
COMMAND ${CMAKE_BINARY_DIR}/pyston setup.py build --build-lib ${CMAKE_BINARY_DIR}/lib_pyston )
add_custom_command(OUTPUT ${STDMODULES}
COMMAND ${CMAKE_BINARY_DIR}/pyston setup.py build --build-lib ${CMAKE_BINARY_DIR}/from_cpython/Lib
DEPENDS DEPENDS
pyston pyston
copy_stdlib copy_stdlib
...@@ -166,4 +172,6 @@ add_custom_command(OUTPUT ...@@ -166,4 +172,6 @@ add_custom_command(OUTPUT
Modules/_cursesmodule.c Modules/_cursesmodule.c
Modules/mmapmodule.c Modules/mmapmodule.c
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_target(sharedmods DEPENDS ${CMAKE_BINARY_DIR}/lib_pyston/_multiprocessing.pyston.so) add_custom_target(sharedmods ALL DEPENDS ${CMAKE_BINARY_DIR}/from_cpython/Lib/_multiprocessing.pyston.so)
install(FILES ${STDMODULES} DESTINATION from_cpython/Lib)
...@@ -13,3 +13,5 @@ foreach(STDLIB_FILE ${LIBPYSTON_SRCS}) ...@@ -13,3 +13,5 @@ foreach(STDLIB_FILE ${LIBPYSTON_SRCS})
set(LIBPYSTON_TARGETS ${LIBPYSTON_TARGETS} ${TARGET}) set(LIBPYSTON_TARGETS ${LIBPYSTON_TARGETS} ${TARGET})
endforeach(STDLIB_FILE) endforeach(STDLIB_FILE)
add_custom_target(copy_libpyston ALL DEPENDS ${LIBPYSTON_TARGETS}) add_custom_target(copy_libpyston ALL DEPENDS ${LIBPYSTON_TARGETS})
install(FILES ${LIBPYSTON_SRCS} DESTINATION lib_pyston)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment