bshell: re-organise build into three separate components
bshell: the front-end binary bshell.runtime: contains the parser, compiler, and classes needed to run bshell scripts bshell.core: contains the builtin commandlets and aliases
This commit is contained in:
+3
-29
@@ -17,34 +17,8 @@ execute_process(
|
||||
COMMAND ${Python_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/build-id.py
|
||||
OUTPUT_VARIABLE bshell_version)
|
||||
|
||||
set(source_dirs
|
||||
ast compile parse parse/lex parse/syntax
|
||||
runtime format command cmdlets aliases)
|
||||
|
||||
if (bshell_interactive EQUAL 1)
|
||||
message(STATUS "Interactive support: Enabled")
|
||||
set(source_dirs ${source_dirs} line-ed)
|
||||
else ()
|
||||
message(STATUS "Interactive support: Disabled")
|
||||
endif ()
|
||||
|
||||
file(GLOB bshell_sources
|
||||
bshell/*.c
|
||||
bshell/*.h)
|
||||
|
||||
foreach (d ${source_dirs})
|
||||
file(GLOB sources
|
||||
bshell/${d}/*.c
|
||||
bshell/${d}/*.h)
|
||||
set(bshell_sources ${bshell_sources} ${sources})
|
||||
endforeach (d)
|
||||
|
||||
message(STATUS "B Shell version: ${bshell_version}")
|
||||
|
||||
add_executable(bshell ${bshell_sources})
|
||||
|
||||
target_link_libraries(bshell FX::Runtime FX::Collections FX::Term)
|
||||
target_compile_definitions(bshell PUBLIC
|
||||
BSHELL_VERSION="${bshell_version}"
|
||||
BSHELL_INTERACTIVE=${bshell_interactive})
|
||||
add_subdirectory(bshell)
|
||||
add_subdirectory(bshell.runtime)
|
||||
add_subdirectory(bshell.core)
|
||||
|
||||
Reference in New Issue
Block a user