rebuild_kerep

This commit is contained in:
timerix 2023-01-16 03:13:02 +06:00
parent ab099b0bcd
commit 5faeeb3a13
6 changed files with 25 additions and 11 deletions

View File

@ -1,4 +1,10 @@
###### Build cbuild/default_tasks #######
all: build_exec
rebuild_kerep:
@cbuild/call_task.sh rebuild_kerep
build_exec:
@cbuild/call_task.sh build_exec
build_exec_dbg:
@ -19,6 +25,4 @@ exec: build_exec
@cbuild/call_task.sh exec
valgrind: build_exec_dbg
@cbuild/call_task.sh valgrind
all: build_exec
@cbuild/call_task.sh

2
cbuild

@ -1 +1 @@
Subproject commit af91a8927b5c33350af093d324c2106c9a193a1d
Subproject commit cd6b3dfa1e2f6fc78257f55f611c13272f09686e

View File

@ -1,6 +1,6 @@
#!/bin/bash
CBUILD_VERSION=3
CONFIG_VERSION=4
CONFIG_VERSION=5
PROJECT=cobek
echo "reading $PROJECT default config..."
@ -20,6 +20,9 @@ OBJDIR=obj
EXEC_FILE=cb2c.com
case $TASK in
rebuild_kerep)
TASK_SCRIPT=tasks/rebuild_kerep.sh
;;
build_exec)
C_ARGS="-O2"
CPP_ARGS="$C_ARGS"

2
kerep

@ -1 +1 @@
Subproject commit f09aa092c1eb4769ca83dfac2976dc3da21f9a5f
Subproject commit fed82e58d30615379e811aa9068c9002c0576179

View File

@ -1,9 +1,13 @@
#!/bin/bash
cd kerep
if [ ! -f "bin/kerep.a" ]; then
exec make "$KEREP_BUILD_TASK"
if [ ! -f "kerep/bin/kerep.a" ] || [ -f .rebuild_kerep ]
then
cd kerep
if ! make "$KEREP_BUILD_TASK"; then
exit 1
fi
cd ..
rm -rf .rebuild_kerep
fi
cp bin/kerep.a ../obj/
cp kerep/bin/kerep.a obj/
printf "${GREEN}copied ${CYAN}kerep.a\n"
cd ..

3
tasks/rebuild_kerep.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
touch .rebuild_kerep
printf "kerep.a will be rebuilt in the next build task"