From 7e6d46244f8270e9827bc0b6441886208e79f985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Tue, 24 Sep 2019 14:20:37 +0200 Subject: [PATCH] $DIR $OBJECT ... --- build/usr/local/lib/autodoc/globals | 2 +- build/usr/local/lib/autodoc/handle_inotify | 18 +++++++++--------- build/usr/local/lib/autodoc/plugins/make.sh | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build/usr/local/lib/autodoc/globals b/build/usr/local/lib/autodoc/globals index ec8cefe..bbe9c83 100644 --- a/build/usr/local/lib/autodoc/globals +++ b/build/usr/local/lib/autodoc/globals @@ -1,4 +1,4 @@ #!/bin/bash -# $1:WATCHROOT (default: ".") +# $WATCHROOT (default: ".") g_watchroot="$(readlink -f "${1:-.}")" diff --git a/build/usr/local/lib/autodoc/handle_inotify b/build/usr/local/lib/autodoc/handle_inotify index 97d751f..6429c36 100644 --- a/build/usr/local/lib/autodoc/handle_inotify +++ b/build/usr/local/lib/autodoc/handle_inotify @@ -1,7 +1,7 @@ #!/bin/bash # process an inotify event -do_handle() { # $1:FLAGS $2:OBJECT +do_handle() { # $FLAGS $OBJECT # extract params local flags="$1" shift 1 @@ -19,8 +19,8 @@ do_handle() { # $1:FLAGS $2:OBJECT do_compile "${dir}" "${object}" } -# compile a directory -do_compile() { # $1:DIR $2:OBJECT $3:DONE +# compile an OBJECT using build instructions found in DIRectory +do_compile() { # $DIR $OBJECT $DONE # extract params local dir="$1" local object="$2" @@ -28,7 +28,7 @@ do_compile() { # $1:DIR $2:OBJECT $3:DONE # build systems for build_system in ${g_build_systems[@]}; do - do_build_system "${build_system}" "${dir}" "${object}" \ + do_build_system "${dir}" "${object}" "${build_system}" \ && local done="1" done @@ -44,11 +44,11 @@ do_compile() { # $1:DIR $2:OBJECT $3:DONE } # use given BUILD_SYSTEM to process an OBJECT from a DIRectory -do_build_system() { # $1:BUILD_SYSTEM $2:DIR $3:OBJECT +do_build_system() { # $DIR $OBJECT $BUILD_SYSTEM # extract params - local build_system="$1" - local dir="$2" - local object="$3" + local dir="$1" + local object="$2" + local build_system="$3" # not done yet local result=1 @@ -61,7 +61,7 @@ do_build_system() { # $1:BUILD_SYSTEM $2:DIR $3:OBJECT if [ -r "${file}" ]; then # actually call into build system echo -n "Found '${file}': " - do_${build_system} "$(basename "${file}")" "${dir}" "${object}" \ + do_${build_system} "${dir}" "${object}" "$(basename "${file}")" \ && local result=0 echo "" fi diff --git a/build/usr/local/lib/autodoc/plugins/make.sh b/build/usr/local/lib/autodoc/plugins/make.sh index f150b9f..5eaff77 100644 --- a/build/usr/local/lib/autodoc/plugins/make.sh +++ b/build/usr/local/lib/autodoc/plugins/make.sh @@ -7,11 +7,11 @@ g_build_systems+=(make) g_build_systems_glob[make]="Makefile *.mk" # compile using bare make command -do_make() { # $1:MAKEFILE $2:DIR $3:OBJECT +do_make() { # $DIR $OBJECT $MAKEFILE # extract params - local makefile="$1" - local dir="$2" - local object="$3" + local dir="$1" + local object="$2" + local makefile="$3" # check Makefile 'source pattern' local srcpat="$(grep -E "^#%SRCPAT%" "${dir}/${makefile}" | tail -n 1 | sed -r "s/^#%SRCPAT%\s+//")"