Index: trunk/doc/user/09_appendix/src/Makefile =================================================================== --- trunk/doc/user/09_appendix/src/Makefile (revision 37027) +++ trunk/doc/user/09_appendix/src/Makefile (revision 37028) @@ -3,6 +3,9 @@ PCBRND = ../../../../src/pcb-rnd CLEANFILES=../action_details.html ../action_reference.html ../formats.html ../bridges.svg ../dialogs.html +include ../../../../Makefile.conf +include $(LIBRND_MAK) + all: $(CLEANFILES) ../action_details.html: ./action_compiler.sh ../action_src/*.html librnd_acts @@ -21,7 +24,7 @@ ./gen_formats.sh > ../formats.html ../dialogs.html: $(PCBRND) ./gen_dialogs.sh ./dialog_extra.awk - ./gen_dialogs.sh > ../dialogs.html + LIBRND_LIBDIR="$(LIBRND_LIBDIR)" ./gen_dialogs.sh > ../dialogs.html FORCE: Index: trunk/doc/user/09_appendix/src/gen_dialogs.sh =================================================================== --- trunk/doc/user/09_appendix/src/gen_dialogs.sh (revision 37027) +++ trunk/doc/user/09_appendix/src/gen_dialogs.sh (revision 37028) @@ -2,6 +2,12 @@ trunk=../../../.. +if test -z "$LIBRND_LIBDIR" +then +# when not run from the Makefile + LIBRND_LIBDIR=`cd $trunk/doc/developer/packaging && make -f librnd_root.mk libdir` +fi + # exceptions dlgtbl=' BEGIN { @@ -40,7 +46,7 @@ dlgextra="`cat dialog_extra.awk`" -. $trunk/util/devhelpers/list_dialogs.sh +. $LIBRND_LIBDIR/devhelpers/list_dialogs.sh list_dlgs $trunk/src/*.c $trunk/src_plugins/*/*.c | gen_html Index: trunk/util/devhelpers/list_dialogs.sh =================================================================== --- trunk/util/devhelpers/list_dialogs.sh (revision 37027) +++ trunk/util/devhelpers/list_dialogs.sh (nonexistent) @@ -1,97 +0,0 @@ -# shell lib - -# assumes running from the source tree - -# list all dialogs from the source files provided on the arg list -list_dlgs() -{ -grep RND_DAD_NEW "$@" | awk ' - ($1 ~ "TEMPLATE") { next } - { - file=$1 - name=$0 - sub(":$", "", file) - sub(".*src/", "src/", file) - sub(".*src_plugins/", "src_plugins/", file) - sub(".*RND_DAD_NEW[^(]*[(]", "", name) - title=name - if (name ~ "^\"") { - sub("\"", "", name) - sub("\".*", "", name) - } - else - name = "" - - sub("[^,]*,[^,]*, *", "", title) - if (title ~ "^\"") { - sub("\"", "", title) - sub("\".*", "", title) - } - else - title = "" - - print name "\t" title "\t" file - } -' -} - -# read dialog list and emit a html -gen_html() -{ -awk -F "[\t]" ' -function orna(s) -{ - if ((s == "") || (s == "")) return "n/a" - return s -} - -'"$dlgtbl"' -'"$dlgextra"' - -function out(id, name, src, action, comment ,acturl1,acturl2,fn,tmp) { - if (action == "") { - if (id in ACTION) action = ACTION[id] - else if (src in ACTION) action = ACTION[src] - } - - if (action != "") { - acturl1 = action - sub("[(].*", "", acturl1) - fn = "../action_src/" acturl1 ".html" - if ((getline tmp < fn) == 1) { - acturl1 = "" - acturl2 = "" - } - else { - acturl1 = "" - acturl2 = "" - } - close(fn) - } - - if (comment == "") { - if (id in COMMENT) comment = COMMENT[id] - else if (src in COMMENT) comment = COMMENT[src] - else comment = " " - } - - print "" orna(id) "" orna(name) "" acturl1 orna(action) acturl2 "" src "" comment -} - -{ - id=$1 - name=$2 - src=$3 - if ((src in IGNORE) && ((name ~ IGNORE[src]) || (id ~ IGNORE[src]))) - next - out(id, name, src) -} -' - -echo ' - - - -' -} -