build_profile, make.log and other stuff

This commit is contained in:
2023-02-13 19:24:47 +06:00
parent 1b38b43c54
commit a0cdbf5522
15 changed files with 315 additions and 140 deletions

View File

@@ -1,24 +1,68 @@
all: build_exec
######################################
###### Build tasks #######
######################################
###### Build cbuild/default_tasks #######
build_exec:
@cbuild/call_task.sh build_exec
build_exec_dbg:
@cbuild/call_task.sh build_exec_dbg
all: build_exec_dbg
build_shared_lib:
@cbuild/call_task.sh build_shared_lib
build_shared_lib_dbg:
@cbuild/call_task.sh build_shared_lib_dbg
# generates different profile info
build_profile:
@cbuild/call_task.sh build_profile 2>&1 | tee make_raw.log
build_static_lib:
@cbuild/call_task.sh build_static_lib
build_static_lib_dbg:
@cbuild/call_task.sh build_static_lib_dbg
# creates executable using profile info generated by build_profile
build_exec: build_profile
@cbuild/call_task.sh build_exec 2>&1 | tee -a make_raw.log
###### Launch cbuild/default_tasks #######
# creates executable with debug info and no optimizations
build_exec_dbg:
@cbuild/call_task.sh build_exec_dbg 2>&1 | tee make_raw.log
# creates shared library
build_shared_lib:
@cbuild/call_task.sh build_shared_lib 2>&1 | tee make_raw.log
# creates shared library with debug symbols and no optimizations
build_shared_lib_dbg:
@cbuild/call_task.sh build_shared_lib_dbg 2>&1 | tee make_raw.log
# creates static library
build_static_lib:
@cbuild/call_task.sh build_static_lib 2>&1 | tee make_raw.log
# creates static library with debug symbols and no optimizations
build_static_lib_dbg:
@cbuild/call_task.sh build_static_lib_dbg 2>&1 | tee make_raw.log
######################################
###### Launch tasks #######
######################################
# executes $EXEC_FILE
exec: build_exec
@cbuild/call_task.sh exec
@cbuild/call_task.sh exec 2>&1 | tee -a make_raw.log
# executes $EXEC_FILE
exec_dbg: build_exec_dbg
@cbuild/call_task.sh exec_dbg 2>&1 | tee -a make_raw.log
# executes $EXEC_FILE with valgrind memory checker
valgrind: build_exec_dbg
@cbuild/call_task.sh valgrind
@cbuild/call_task.sh valgrind 2>&1 | tee -a make_raw.log
######################################
###### Other tasks #######
######################################
# deletes generated files
clean:
@cbuild/call_task.sh clean 2>&1 | tee make_raw.log
# removes all unreadable characters copied from stdio
fix_log:
sed 's/[^[:blank:][:print:]]//g' make_raw.log \
| sed 's/\[0;[0-9][0-9]m//g' \
| sed 's/\[0;[0-9]m//g' \
| sed 's/\[[0-9][0-9]m//g' \
| sed 's/\[[0-9]m//g' \
| sed 's/ H //g' \
| sed 's/\[3gH //g' \
> make_fixed.log