plugins -> build systems

This commit is contained in:
Jörn-Michael Miehe 2019-09-24 13:46:15 +02:00
parent 08c1a7e62b
commit d7f6a1fb8d
3 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@
g_bin="$(readlink -f "$(which "$0")")" g_bin="$(readlink -f "$(which "$0")")"
g_lib=${g_bin/"bin"/"lib"} g_lib=${g_bin/"bin"/"lib"}
declare -a g_plugins declare -a g_build_systems
# #
# load base program # load base program

View file

@ -7,9 +7,9 @@ do_compile() { # $1:DIR $2:OBJECT $3:DONE
local object="$2" local object="$2"
local done="${3:-0}" local done="${3:-0}"
# build plugins # build systems
for plugin in ${g_plugins[@]}; do for build_system in ${g_build_systems[@]}; do
try_${plugin} "${dir}" "${object}" \ try_${build_system} "${dir}" "${object}" \
&& local done="1" && local done="1"
done done

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
g_plugins+=(make) g_build_systems+=(make)
# compile using bare make command # compile using bare make command
do_make() { # $1:DIR $2:MAKEFILE $3:OBJECT do_make() { # $1:DIR $2:MAKEFILE $3:OBJECT