Modify build-script include folder keys

The key for getting the path of  the own module in the includes.txt is
no  longer '{self}', but rather '{module}', as that is a little easier
to understand.
This commit is contained in:
Eric-Paul Ickhorn 2024-09-08 16:45:20 +02:00
parent 9c691f817f
commit 004f089cf0
Signed by: epickh
GPG Key ID: 1358818BAA38B104
7 changed files with 16 additions and 8 deletions

View File

@ -1,3 +1,3 @@
{self}/inc-c {module}/inc-c
{module-folder}/utility/inc-c {module-folder}/utility/inc-c
{module-folder}/ecs/inc-c {module-folder}/ecs/inc-c

View File

@ -1,2 +1,2 @@
{self}/inc-c {module}/inc-c
{module-folder}/utility/inc-c {module-folder}/utility/inc-c

View File

@ -1,4 +1,4 @@
{self}/inc-c {module}/inc-c
{module-folder}/utility/inc-c {module-folder}/utility/inc-c
{module-folder}/window/inc-c {module-folder}/window/inc-c
{module-folder}/ecs/inc-c {module-folder}/ecs/inc-c

View File

@ -1 +1 @@
{self}/inc-c {module}/inc-c

View File

@ -1,3 +1,3 @@
{self}/inc-c {module}/inc-c
{module-folder}/utility/inc-c {module-folder}/utility/inc-c
{module-folder}/ecs/inc-c {module-folder}/ecs/inc-c

View File

@ -1,2 +1,2 @@
{self}/inc-c {module}/inc-c
{module-folder}/utility/inc-c {module-folder}/utility/inc-c

View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash
cd $(dirname $0) cd $(dirname $0)
SCRIPT_PATH=$(pwd) SCRIPT_PATH=$(pwd)
@ -42,10 +43,10 @@ function make_include_statements() {
for INCLUDE_PATH in $(cat modules/$MODULE_NAME/includes.txt) for INCLUDE_PATH in $(cat modules/$MODULE_NAME/includes.txt)
do do
MODIFIED_PATH="${INCLUDE_PATH//"{self}"/"$PROJECT_PATH/modules/$MODULE_NAME"}" MODIFIED_PATH="${INCLUDE_PATH//"{module}"/"$PROJECT_PATH/modules/$MODULE_NAME"}"
MODIFIED_PATH="${MODIFIED_PATH//"{module-folder}"/"$PROJECT_PATH/modules"}" MODIFIED_PATH="${MODIFIED_PATH//"{module-folder}"/"$PROJECT_PATH/modules"}"
echo "-I ${MODIFIED_PATH//"{dependencies}"/"$PROJECT_PATH/dependencies"}" echo "-I ${MODIFIED_PATH//"{dependencies}"/"$PROJECT_PATH/dependencies"}"
done done
} }
function build_single_module() { function build_single_module() {
@ -68,7 +69,14 @@ function build_single_module() {
gcc -c -o .build/modules/$MODULE_NAME/objects/$OBJECT_NAME -g3 modules/$MODULE_NAME/src-c/$SOURCE $INCLUDE_STATEMENTS gcc -c -o .build/modules/$MODULE_NAME/objects/$OBJECT_NAME -g3 modules/$MODULE_NAME/src-c/$SOURCE $INCLUDE_STATEMENTS
done done
if [[ $(ls .build/modules/$MODULE_NAME/objects/ | grep ".o$") == "" ]];
then
echo "> Empty Module, not creating archive."
echo " "
return
fi
ar -rvs .build/archives/voxula-$MODULE_NAME.a .build/modules/$MODULE_NAME/objects/*.o ar -rvs .build/archives/voxula-$MODULE_NAME.a .build/modules/$MODULE_NAME/objects/*.o
echo " "
} }
mkdir -p .build/archives mkdir -p .build/archives