rename samples to examples; delete dead build scripts

This commit is contained in:
Allen Webster
2021-09-02 18:49:34 -07:00
parent f26bbc2c37
commit 47b5e0bf72
18 changed files with 17 additions and 231 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ root_path=$PWD
###### Bin Scripts ############################################################
$bin_path/build_tests.sh
$bin_path/build_samples.sh
$bin_path/build_examples.sh
$bin_path/run_tests.sh
$bin_path/run_samples.sh
$bin_path/run_examples.sh
###### Restore Path ###########################################################
cd $og_path
+6 -6
View File
@@ -6,14 +6,14 @@ cd "$(dirname "$0")"
cd ..
###### Script #################################################################
echo "~~~ Build All Samples ~~~"
echo "~~~ Build All Exampes ~~~"
bin/bld_core.sh show_ctx
bin/bld_core.sh unit old_style_custom_layer samples/old_style_custom_layer.c
bin/bld_core.sh unit output_parse samples/output_parse/output_parse.c
bin/bld_core.sh unit c_code_generation samples/c_code_generation.c
bin/bld_core.sh unit node_errors samples/node_errors/node_errors.c
bin/bld_core.sh unit parse_check samples/parse_check.c
bin/bld_core.sh unit old_style_custom_layer examples/old_style_custom_layer.c
bin/bld_core.sh unit output_parse examples/output_parse/output_parse.c
bin/bld_core.sh unit c_code_generation examples/c_code_generation.c
bin/bld_core.sh unit node_errors examples/node_errors/node_errors.c
bin/bld_core.sh unit parse_check examples/parse_check.c
echo
+9 -9
View File
@@ -4,12 +4,12 @@
og_path=$PWD
cd "$(dirname "$0")"
cd ..
root_path=$PWD
build_path=$root_path/build
samples_path=$root_path/samples
root_path=$PWD
build_path=$root_path/build
examples_path=$root_path/examples
echo ~~~ Running Output Parse Sample ~~~
cd $samples_path
echo ~~~ Running Output Parse Example ~~~
cd $examples_path
if [ -d "output_parse/examples" ]; then
cd output_parse/examples
mkdir -p output
@@ -18,17 +18,17 @@ if [ -d "output_parse/examples" ]; then
fi
echo
echo ~~~ Running C Code Generation Sample ~~~
echo ~~~ Running C Code Generation Example ~~~
cd $build_path
./c_code_generation.exe
echo
echo ~~~ Running Error Generation Sample ~~~
echo ~~~ Running Error Generation Example ~~~
cd $build_path
./node_errors.exe $samples_path/node_errors/node_errors.mdesk
./node_errors.exe $examples_path/node_errors/node_errors.mdesk
echo
echo ~~~ Running C++ Sample ~~~
echo ~~~ Running C++ Example ~~~
cd $build_path
./cpp_build_test.exe
echo
-73
View File
@@ -1,73 +0,0 @@
@echo off
echo ~~~ Metadesk Build ~~~
set compile_flags= /nologo /Zi /FC /MP /I..\source\
if not exist build mkdir build
pushd build
echo.
echo ~~~ Build All Samples ~~~
cl %compile_flags% ..\samples\old_style_custom_layer.c
cl %compile_flags% ..\samples\toy_language\toy_language.c
cl %compile_flags% ..\samples\static_site_generator\static_site_generator.c
cl %compile_flags% ..\samples\output_parse\output_parse.c
cl %compile_flags% ..\samples\c_code_generation.c
cl %compile_flags% ..\samples\node_errors\node_errors.c
cl %compile_flags% ..\samples\parse_check.c
echo.
echo ~~~ Build All Tests ~~~
cl %compile_flags% ..\tests\sanity_tests.c
cl %compile_flags% ..\tests\unicode_test.c
cl %compile_flags% ..\tests\cpp_build_test.cpp
popd
echo.
echo ~~~ Running Sanity Tests ~~~
pushd build
sanity_tests.exe
popd
echo.
echo ~~~ Running Static Site Generator Sample ~~~
pushd samples
pushd static_site_generator
pushd example_site
if not exist generated mkdir generated
pushd generated
..\..\..\..\build\static_site_generator.exe --siteinfo:..\site_info.mdesk --pagedir:..\
popd
popd
popd
popd
echo.
echo ~~~ Running Output Parse Sample ~~~
pushd samples
pushd output_parse
pushd examples
if not exist output mkdir output
pushd output
..\..\..\..\build\output_parse.exe ..\example.mdesk ..\example2.mdesk
popd
popd
popd
popd
echo.
echo ~~~ Running C Code Generation Sample ~~~
pushd build
c_code_generation.exe
popd
echo.
echo ~~~ Running Error Generation Sample ~~~
pushd build
node_errors.exe %~dp0\samples\node_errors\node_errors.mdesk
popd
echo.
echo ~~~ Running C++ Sample ~~~
pushd build
cpp_build_test.exe
popd
-65
View File
@@ -1,65 +0,0 @@
#!/bin/bash
CC=clang
# NOTE(mal): Silent pushd/popd
pushd () {
command pushd "$@" > /dev/null
}
popd () {
command popd "$@" > /dev/null
}
echo ~~~ Metadesk Build ~~~
# TODO(mal): Review these warnings
accepted_clang_warnings="-Wno-deprecated-declarations -Wno-pointer-sign -Wno-writable-strings -Wno-unknown-warning-option"
compile_flags="-I../source/ $accepted_clang_warnings"
mkdir -p build
pushd build
echo
echo ~~~ Build All Samples ~~~
$CC $compile_flags ../samples/old_style_custom_layer.c -o old_style_custom_layer
$CC $compile_flags ../samples/static_site_generator/static_site_generator.c -o static_site_generator
$CC $compile_flags ../samples/output_parse/output_parse.c -o output_parse
$CC $compile_flags ../samples/c_code_generation.c -o c_code_generation
$CC $compile_flags ../samples/node_errors/node_errors.c -o node_errors
echo
echo ~~~ Build All Tests ~~~
$CC $compile_flags ../tests/sanity_tests.c -o sanity_tests
$CC $compile_flags ../tests/unicode_test.c -o unicode_test
clang++ $compile_flags ../tests/cpp_build_test.cpp
popd
echo
echo ~~~ Running Sanity Tests ~~~
pushd build
./sanity_tests
popd
echo
echo ~~~ Running Static Site Generator Sample ~~~
mkdir -p samples/static_site_generator/example_site/generated
pushd samples/static_site_generator/example_site/generated
../../../../build/static_site_generator --siteinfo ../site_info.mdesk --pagedir ../
popd
echo
echo ~~~ Running Output Parse Sample ~~~
mkdir -p samples/output_parse/examples/output
pushd samples/output_parse/examples/output
../../../../build/output_parse ../example.mdesk ../example2.mdesk
popd
echo
echo ~~~ Running C Code Generation Sample ~~~
pushd build
./c_code_generation
popd
echo
echo ~~~ Running Error Generation Sample ~~~
pushd build
./node_errors ../samples/node_errors/node_errors.mdesk
popd
-76
View File
@@ -1,76 +0,0 @@
@echo off
echo ~~~ Metadesk Build ~~~
set src=%cd%
rem TODO(mal): Review these warnings
set accepted_clang_warnings=-Wno-deprecated-declarations -Wno-pointer-sign -Wno-writable-strings -Wno-unknown-warning-option
set compile_flags=-I%src%/source/ %accepted_clang_warnings%
if not exist build mkdir build
pushd build
echo.
echo ~~~ Build All Samples ~~~
clang %compile_flags% %src%\samples\old_style_custom_layer.c -o old_style_custom_layer.exe
clang %compile_flags% %src%\samples\static_site_generator\static_site_generator.c -o static_site_generator.exe
clang %compile_flags% %src%\samples\output_parse\output_parse.c -o output_parse.exe
clang %compile_flags% %src%\samples\c_code_generation.c -o c_code_generation.exe
clang %compile_flags% %src%\samples\node_errors\node_errors.c -o node_errors.exe
echo.
echo ~~~ Build All Tests ~~~
clang %compile_flags% %src%\tests\sanity_tests.c -o sanity_tests.exe
clang %compile_flags% %src%\tests\unicode_test.c -o unicode_test.exe
clang++ %compile_flags% %src%\tests\cpp_build_test.cpp -o cpp_build_test.exe
popd
echo.
echo ~~~ Running Sanity Tests ~~~
pushd build
sanity_tests.exe
popd
echo.
echo ~~~ Running Static Site Generator Sample ~~~
pushd samples
pushd static_site_generator
pushd example_site
if not exist generated mkdir generated
pushd generated
..\..\..\..\build\static_site_generator.exe --siteinfo ..\site_info.mdesk --pagedir ..\
popd
popd
popd
popd
echo.
echo ~~~ Running Output Parse Sample ~~~
pushd samples
pushd output_parse
pushd examples
if not exist output mkdir output
pushd output
..\..\..\..\build\output_parse.exe ..\example.mdesk ..\example2.mdesk
popd
popd
popd
popd
echo.
echo ~~~ Running C Code Generation Sample ~~~
pushd build
c_code_generation.exe
popd
echo.
echo ~~~ Running Error Generation Sample ~~~
pushd build
node_errors.exe %~dp0\samples\node_errors\node_errors.mdesk
popd
echo.
echo ~~~ Running C++ Sample ~~~
pushd build
cpp_build_test.exe
popd