From 3f911fbf72d372a487970f1eac739b77c47aada0 Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 22:38:02 +0000 Subject: [PATCH 01/15] Add Python to SCons --- SConstruct | 10 ++++++++-- sconscripts/python_SConscript | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 sconscripts/python_SConscript diff --git a/SConstruct b/SConstruct index cf6a18c08..233217de9 100644 --- a/SConstruct +++ b/SConstruct @@ -19,11 +19,15 @@ rust_rustc_builder = Builder(action='rustc $SOURCE -o $TARGET$PROGSUFFIX') go_builder = Builder(action='go build -o $TARGET$PROGSUFFIX $SOURCE') +# For interpreted languages to copy to build directory +copy_builder = Builder(action=Copy('$TARGET', '$SOURCE')) + env = Environment(ENV=os.environ, BUILDERS={'rustc': rust_rustc_builder, 'cargo': rust_cargo_builder, - 'Go': go_builder}, - tools=['gcc', 'gnulink', 'g++', 'gas', 'gfortran']) + 'Go': go_builder, + 'Python': copy_builder}, + tools=['gcc', 'gnulink', 'g++', 'gas']) Export('env') @@ -33,6 +37,7 @@ env['ASFLAGS'] = '--64' # Add other languages here when you want to add language targets # Put 'name_of_language_directory' : 'file_extension' + languages = { 'c': 'c', 'cpp': 'cpp', @@ -40,6 +45,7 @@ languages = { 'rust': 'rs', 'go': 'go', 'fortran': 'f90', + 'python': 'py', } # Do not add new Builders here, add them to the BUILDERS argument in the call to Environment above diff --git a/sconscripts/python_SConscript b/sconscripts/python_SConscript new file mode 100644 index 000000000..037af5b35 --- /dev/null +++ b/sconscripts/python_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Python(f'#/build/python/{chapter_name}.py', str(file)) From 3b714872c7a7093ab74ce82692882bcfa77b0a4b Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:02:26 +0000 Subject: [PATCH 02/15] Add Julia to SCons --- SConstruct | 3 ++- sconscripts/julia_SConscript | 6 ++++++ sconscripts/python_SConscript | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 sconscripts/julia_SConscript diff --git a/SConstruct b/SConstruct index 233217de9..f064fd142 100644 --- a/SConstruct +++ b/SConstruct @@ -26,7 +26,7 @@ env = Environment(ENV=os.environ, BUILDERS={'rustc': rust_rustc_builder, 'cargo': rust_cargo_builder, 'Go': go_builder, - 'Python': copy_builder}, + 'Copier': copy_builder}, tools=['gcc', 'gnulink', 'g++', 'gas']) Export('env') @@ -46,6 +46,7 @@ languages = { 'go': 'go', 'fortran': 'f90', 'python': 'py', + 'julia': 'jl', } # Do not add new Builders here, add them to the BUILDERS argument in the call to Environment above diff --git a/sconscripts/julia_SConscript b/sconscripts/julia_SConscript new file mode 100644 index 000000000..e5eceeac3 --- /dev/null +++ b/sconscripts/julia_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/julia/{chapter_name}.jl', str(file)) diff --git a/sconscripts/python_SConscript b/sconscripts/python_SConscript index 037af5b35..ac12dbeff 100644 --- a/sconscripts/python_SConscript +++ b/sconscripts/python_SConscript @@ -3,4 +3,4 @@ from pathlib import Path for file in files_to_compile: chapter_name = file.parent.parent.parent.stem - env.Python(f'#/build/python/{chapter_name}.py', str(file)) + env.Copier(f'#/build/python/{chapter_name}.py', str(file)) From e855e0695dff331a9eb35bcdf0af7bb8060c8b2e Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:11:10 +0000 Subject: [PATCH 03/15] Add PHP to SCons --- SConstruct | 1 + sconscripts/php_SConscript | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 sconscripts/php_SConscript diff --git a/SConstruct b/SConstruct index f064fd142..de32b8c7a 100644 --- a/SConstruct +++ b/SConstruct @@ -47,6 +47,7 @@ languages = { 'fortran': 'f90', 'python': 'py', 'julia': 'jl', + 'php': 'php', } # Do not add new Builders here, add them to the BUILDERS argument in the call to Environment above diff --git a/sconscripts/php_SConscript b/sconscripts/php_SConscript new file mode 100644 index 000000000..9c96e6cbf --- /dev/null +++ b/sconscripts/php_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/php/{chapter_name}.php', str(file)) From af1f1892996f21960919911faa2c4f668de499e5 Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:13:36 +0000 Subject: [PATCH 04/15] Add Ruby to SCons --- SConstruct | 1 + sconscripts/ruby_SConscript | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 sconscripts/ruby_SConscript diff --git a/SConstruct b/SConstruct index de32b8c7a..c0c052d25 100644 --- a/SConstruct +++ b/SConstruct @@ -48,6 +48,7 @@ languages = { 'python': 'py', 'julia': 'jl', 'php': 'php', + 'ruby': 'rb', } # Do not add new Builders here, add them to the BUILDERS argument in the call to Environment above diff --git a/sconscripts/ruby_SConscript b/sconscripts/ruby_SConscript new file mode 100644 index 000000000..126d92e07 --- /dev/null +++ b/sconscripts/ruby_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/ruby/{chapter_name}.rb', str(file)) From 6ddf88a3415f29a115e00205ce61711f6a8c38ab Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:15:26 +0000 Subject: [PATCH 05/15] Add Lua to SCons --- SConstruct | 1 + sconscripts/lua_SConscript | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 sconscripts/lua_SConscript diff --git a/SConstruct b/SConstruct index c0c052d25..1c6f18834 100644 --- a/SConstruct +++ b/SConstruct @@ -49,6 +49,7 @@ languages = { 'julia': 'jl', 'php': 'php', 'ruby': 'rb', + 'lua': 'lua', } # Do not add new Builders here, add them to the BUILDERS argument in the call to Environment above diff --git a/sconscripts/lua_SConscript b/sconscripts/lua_SConscript new file mode 100644 index 000000000..552e81863 --- /dev/null +++ b/sconscripts/lua_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/lua/{chapter_name}.lua', str(file)) From 3eff1480f687d3e916c904a4faed99fe474c416b Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:20:45 +0000 Subject: [PATCH 06/15] Add Powershell to SCons --- SConstruct | 2 ++ sconscripts/powershell_SConscript | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 sconscripts/powershell_SConscript diff --git a/SConstruct b/SConstruct index 1c6f18834..a27713f52 100644 --- a/SConstruct +++ b/SConstruct @@ -50,6 +50,8 @@ languages = { 'php': 'php', 'ruby': 'rb', 'lua': 'lua', + 'powershell': 'ps1', + 'bash': 'bash', } # Do not add new Builders here, add them to the BUILDERS argument in the call to Environment above diff --git a/sconscripts/powershell_SConscript b/sconscripts/powershell_SConscript new file mode 100644 index 000000000..a36ae2a60 --- /dev/null +++ b/sconscripts/powershell_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/powershell/{chapter_name}.ps1', str(file)) From d7a5b9ce8e659b35ffc8c3a8f0342090761d1224 Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:21:01 +0000 Subject: [PATCH 07/15] Add Bash to Scons --- sconscripts/bash_SConscript | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sconscripts/bash_SConscript diff --git a/sconscripts/bash_SConscript b/sconscripts/bash_SConscript new file mode 100644 index 000000000..5c9383100 --- /dev/null +++ b/sconscripts/bash_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/bash/{chapter_name}.bash', str(file)) From 76e2e030501a726a62c6a81f2a44f6c8624c8bbe Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:26:41 +0000 Subject: [PATCH 08/15] Add Smalltalk to SCons --- SConstruct | 1 + sconscripts/smalltalk_SConscript | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 sconscripts/smalltalk_SConscript diff --git a/SConstruct b/SConstruct index a27713f52..e0c679519 100644 --- a/SConstruct +++ b/SConstruct @@ -52,6 +52,7 @@ languages = { 'lua': 'lua', 'powershell': 'ps1', 'bash': 'bash', + 'smalltalk': 'st' } # Do not add new Builders here, add them to the BUILDERS argument in the call to Environment above diff --git a/sconscripts/smalltalk_SConscript b/sconscripts/smalltalk_SConscript new file mode 100644 index 000000000..56f5105c5 --- /dev/null +++ b/sconscripts/smalltalk_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/smalltalk/{chapter_name}.st', str(file)) From 0d08a1cde52746195b0b08f26d44d6ea5cce1675 Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:35:00 +0000 Subject: [PATCH 09/15] Add Viml to SCons --- SConstruct | 3 ++- sconscripts/viml_SConscript | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 sconscripts/viml_SConscript diff --git a/SConstruct b/SConstruct index e0c679519..2d0aff3b6 100644 --- a/SConstruct +++ b/SConstruct @@ -52,7 +52,8 @@ languages = { 'lua': 'lua', 'powershell': 'ps1', 'bash': 'bash', - 'smalltalk': 'st' + 'smalltalk': 'st', + 'viml': 'vim', } # Do not add new Builders here, add them to the BUILDERS argument in the call to Environment above diff --git a/sconscripts/viml_SConscript b/sconscripts/viml_SConscript new file mode 100644 index 000000000..2e7e02b50 --- /dev/null +++ b/sconscripts/viml_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/viml/{chapter_name}.vim', str(file)) From 5495e58eea367ad7e427799585b653326fb7d1e2 Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:43:55 +0000 Subject: [PATCH 10/15] Fix Fortran --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 2d0aff3b6..c83dcefe6 100644 --- a/SConstruct +++ b/SConstruct @@ -27,7 +27,7 @@ env = Environment(ENV=os.environ, 'cargo': rust_cargo_builder, 'Go': go_builder, 'Copier': copy_builder}, - tools=['gcc', 'gnulink', 'g++', 'gas']) + tools=['gcc', 'gnulink', 'g++', 'gas', 'gfortran']) Export('env') From 6ced014b5197bccd62fc4c8d0bc30ca39d5024e3 Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:45:55 +0000 Subject: [PATCH 11/15] Alphabetise languages --- SConstruct | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/SConstruct b/SConstruct index c83dcefe6..30969349c 100644 --- a/SConstruct +++ b/SConstruct @@ -39,19 +39,19 @@ env['ASFLAGS'] = '--64' # Put 'name_of_language_directory' : 'file_extension' languages = { - 'c': 'c', - 'cpp': 'cpp', 'asm-x64': 's', - 'rust': 'rs', - 'go': 'go', + 'bash': 'bash', + 'c': 'c', + 'cpp': 'cpp', 'fortran': 'f90', - 'python': 'py', + 'go': 'go', 'julia': 'jl', - 'php': 'php', - 'ruby': 'rb', 'lua': 'lua', + 'php': 'php', 'powershell': 'ps1', - 'bash': 'bash', + 'python': 'py', + 'ruby': 'rb', + 'rust': 'rs', 'smalltalk': 'st', 'viml': 'vim', } From f96b2b1b8f4fb58e755f995b9a8166823f9c6dbf Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:53:37 +0000 Subject: [PATCH 12/15] Add Lolcode to SCons --- SConstruct | 1 + sconscripts/lolcode_SConscript | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 sconscripts/lolcode_SConscript diff --git a/SConstruct b/SConstruct index 30969349c..065bdfd73 100644 --- a/SConstruct +++ b/SConstruct @@ -46,6 +46,7 @@ languages = { 'fortran': 'f90', 'go': 'go', 'julia': 'jl', + 'lolcode': 'lol', 'lua': 'lua', 'php': 'php', 'powershell': 'ps1', diff --git a/sconscripts/lolcode_SConscript b/sconscripts/lolcode_SConscript new file mode 100644 index 000000000..dd90185ec --- /dev/null +++ b/sconscripts/lolcode_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/lolcode/{chapter_name}.lol', str(file)) From cd4c74844916c737601492215f50b4bbc539ff69 Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Mon, 29 Nov 2021 22:56:43 +0000 Subject: [PATCH 13/15] Add Javascript to SCons --- SConstruct | 1 + sconscripts/javascript_SConscript | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 sconscripts/javascript_SConscript diff --git a/SConstruct b/SConstruct index 065bdfd73..2bc5c8c28 100644 --- a/SConstruct +++ b/SConstruct @@ -45,6 +45,7 @@ languages = { 'cpp': 'cpp', 'fortran': 'f90', 'go': 'go', + 'javascript': 'js', 'julia': 'jl', 'lolcode': 'lol', 'lua': 'lua', diff --git a/sconscripts/javascript_SConscript b/sconscripts/javascript_SConscript new file mode 100644 index 000000000..2f8f9736a --- /dev/null +++ b/sconscripts/javascript_SConscript @@ -0,0 +1,6 @@ +Import('files_to_compile env') +from pathlib import Path + +for file in files_to_compile: + chapter_name = file.parent.parent.parent.stem + env.Copier(f'#/build/javascript/{chapter_name}.js', str(file)) From c29525b9f0aaeba73aa3e6ca8fa5a1fcf95e384f Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 5 Dec 2021 14:50:45 +0000 Subject: [PATCH 14/15] Update to new build format --- sconscripts/bash_SConscript | 8 ++++---- sconscripts/javascript_SConscript | 8 ++++---- sconscripts/julia_SConscript | 8 ++++---- sconscripts/lolcode_SConscript | 8 ++++---- sconscripts/lua_SConscript | 8 ++++---- sconscripts/php_SConscript | 8 ++++---- sconscripts/powershell_SConscript | 8 ++++---- sconscripts/python_SConscript | 8 ++++---- sconscripts/ruby_SConscript | 8 ++++---- sconscripts/smalltalk_SConscript | 8 ++++---- sconscripts/viml_SConscript | 8 ++++---- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/sconscripts/bash_SConscript b/sconscripts/bash_SConscript index 5c9383100..0b3c17dc0 100644 --- a/sconscripts/bash_SConscript +++ b/sconscripts/bash_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/bash/{chapter_name}.bash', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.bash' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) diff --git a/sconscripts/javascript_SConscript b/sconscripts/javascript_SConscript index 2f8f9736a..767f5cd4a 100644 --- a/sconscripts/javascript_SConscript +++ b/sconscripts/javascript_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/javascript/{chapter_name}.js', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.js' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/julia_SConscript b/sconscripts/julia_SConscript index e5eceeac3..84de28959 100644 --- a/sconscripts/julia_SConscript +++ b/sconscripts/julia_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/julia/{chapter_name}.jl', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.jl' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/lolcode_SConscript b/sconscripts/lolcode_SConscript index dd90185ec..241565f53 100644 --- a/sconscripts/lolcode_SConscript +++ b/sconscripts/lolcode_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/lolcode/{chapter_name}.lol', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.lol' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/lua_SConscript b/sconscripts/lua_SConscript index 552e81863..a64415d74 100644 --- a/sconscripts/lua_SConscript +++ b/sconscripts/lua_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/lua/{chapter_name}.lua', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.lua' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/php_SConscript b/sconscripts/php_SConscript index 9c96e6cbf..9748a1a5a 100644 --- a/sconscripts/php_SConscript +++ b/sconscripts/php_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/php/{chapter_name}.php', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.php' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/powershell_SConscript b/sconscripts/powershell_SConscript index a36ae2a60..bbb4a9b1a 100644 --- a/sconscripts/powershell_SConscript +++ b/sconscripts/powershell_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/powershell/{chapter_name}.ps1', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.ps1' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/python_SConscript b/sconscripts/python_SConscript index ac12dbeff..0d26a9620 100644 --- a/sconscripts/python_SConscript +++ b/sconscripts/python_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/python/{chapter_name}.py', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.py' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/ruby_SConscript b/sconscripts/ruby_SConscript index 126d92e07..ad58ed64a 100644 --- a/sconscripts/ruby_SConscript +++ b/sconscripts/ruby_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/ruby/{chapter_name}.rb', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.rb' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/smalltalk_SConscript b/sconscripts/smalltalk_SConscript index 56f5105c5..fa17ef150 100644 --- a/sconscripts/smalltalk_SConscript +++ b/sconscripts/smalltalk_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/smalltalk/{chapter_name}.st', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.st' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file diff --git a/sconscripts/viml_SConscript b/sconscripts/viml_SConscript index 2e7e02b50..bef5029f4 100644 --- a/sconscripts/viml_SConscript +++ b/sconscripts/viml_SConscript @@ -1,6 +1,6 @@ Import('files_to_compile env') -from pathlib import Path -for file in files_to_compile: - chapter_name = file.parent.parent.parent.stem - env.Copier(f'#/build/viml/{chapter_name}.vim', str(file)) +for file_info in files_to_compile: + build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.vim' + build_result = env.Copier(build_target, str(file_info.path)) + env.Alias(str(file_info.chapter), build_result) \ No newline at end of file From aaffa32cda09881fdc791d7a3b6abeea46ed5e58 Mon Sep 17 00:00:00 2001 From: PeanutbutterWarrior <50717143+PeanutbutterWarrior@users.noreply.github.com> Date: Sun, 5 Dec 2021 17:52:38 +0000 Subject: [PATCH 15/15] Remove smalltalk --- SConstruct | 1 - sconscripts/smalltalk_SConscript | 6 ------ 2 files changed, 7 deletions(-) delete mode 100644 sconscripts/smalltalk_SConscript diff --git a/SConstruct b/SConstruct index 2bc5c8c28..a1a096168 100644 --- a/SConstruct +++ b/SConstruct @@ -54,7 +54,6 @@ languages = { 'python': 'py', 'ruby': 'rb', 'rust': 'rs', - 'smalltalk': 'st', 'viml': 'vim', } diff --git a/sconscripts/smalltalk_SConscript b/sconscripts/smalltalk_SConscript deleted file mode 100644 index fa17ef150..000000000 --- a/sconscripts/smalltalk_SConscript +++ /dev/null @@ -1,6 +0,0 @@ -Import('files_to_compile env') - -for file_info in files_to_compile: - build_target = f'#/build/{file_info.language}/{file_info.chapter}/{file_info.path.stem}.st' - build_result = env.Copier(build_target, str(file_info.path)) - env.Alias(str(file_info.chapter), build_result) \ No newline at end of file