Index: Autostyle.html
===================================================================
--- Autostyle.html (nonexistent)
+++ Autostyle.html (revision 207)
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
Index: Autostyle.sh
===================================================================
--- Autostyle.sh (nonexistent)
+++ Autostyle.sh (revision 207)
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+autostyle()
+{
+ awk -v "template=$1" -v "root=$ROOT" '
+ BEGIN {
+ while((getline < template) > 0) {
+ if (parse_auto(RES, $0)) {
+ if (RES["action"] == "begin")
+ curr = RES["ID"]
+ else
+ reset_curr = 1
+ }
+ if (curr != "")
+ AUTO[curr] = AUTO[curr] var_subs($0) "\n"
+ if (reset_curr) {
+ curr = ""
+ reset_curr = 0
+ }
+ }
+ }
+
+ function var_subs(s)
+ {
+ gsub("[$]ROOT[$]", root, s)
+ return s
+ }
+
+ function parse_auto(RES, line ,tmp)
+ {
+ if (!(line ~ ".*", "", line)
+ line = tolower(line)
+ tmp = line
+ sub("[ \t].*$", "", tmp)
+ RES["ID"] = tmp
+ tmp = line
+ sub("^[^ \t]*[ \t]*", "", tmp)
+ RES["action"] = tmp
+ return 1
+ }
+
+ {
+ if (parse_auto(RES, $0)) {
+ if (RES["action"] == "begin")
+ skip = 1
+ else if (RES["action"] == "end") {
+ printf("%s", AUTO[RES["ID"]])
+ skip = 0
+ }
+ next
+ }
+ }
+
+ (!skip) { print $0 }
+
+ '
+}
+
+for html in $*
+do
+ case $html in
+ Autostyle.html) ;;
+ *)
+ mv $html $html.tmp
+ autostyle "Autostyle.html" < $html.tmp > $html
+ if test $? = 0
+ then
+ rm $html.tmp
+ else
+ echo "Failed on $html, keeping the original version."
+ mv $html.tmp $html
+ fi
+ esac
+done
Property changes on: Autostyle.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: Makefile
===================================================================
--- Makefile (nonexistent)
+++ Makefile (revision 207)
@@ -0,0 +1,67 @@
+MENU_RES=../src/camv-rnd-menu.lht
+KEYLIST=../util/keylist.sh
+DEBLIST=../util/devhelpers/deblist.sh
+ROOT=..
+
+all: user/keys.html user/keytree.svg user/keytree.txt
+ ROOT="" ./Autostyle.sh *.html
+
+include ../Makefile.conf
+
+user/keytree.svg: $(MENU_RES) $(KEYLIST)
+ $(KEYLIST) --dot user/node_names.txt $(MENU_RES) > user/keytree.dot
+ dot -Tsvg < user/keytree.dot >user/keytree.svg
+
+user/keytree.txt: $(MENU_RES) $(KEYLIST)
+ $(KEYLIST) --lst $(MENU_RES) > user/keytree.txt
+
+
+user/keys.html: $(MENU_RES) $(KEYLIST)
+ $(KEYLIST) $(MENU_RES) > user/keys.html
+
+install_main:
+ $(SCCBOX) $(HOW) *.html *.txt TODO $(DOCDIR)/
+
+install:
+ $(SCCBOX) mkdir -p "$(DOCDIR)"
+ cd man && $(MAKE) install
+ cd user && $(MAKE) install
+ cd tutorials && $(MAKE) install
+ cd security && $(MAKE) install
+ cd conf && $(MAKE) install
+ cd developer && $(MAKE) install
+ $(MAKE) install_main HOW="install -f -d"
+
+linstall:
+ cd man && $(MAKE) linstall
+ cd user && $(MAKE) linstall
+ cd tutorials && $(MAKE) linstall
+ cd security && $(MAKE) linstall
+ cd conf && $(MAKE) linstall
+ cd developer && $(MAKE) linstall
+ $(MAKE) install_main HOW="install -f -l -d"
+
+uninstall:
+ cd man && $(MAKE) uninstall
+ cd user && $(MAKE) uninstall
+ cd tutorials && $(MAKE) uninstall
+ cd security && $(MAKE) uninstall
+ cd conf && $(MAKE) uninstall
+ cd developer && $(MAKE) uninstall
+ $(MAKE) install_main HOW="install -f -u -d"
+
+clean:
+ cd man && $(MAKE) clean
+ cd user && $(MAKE) clean
+ cd tutorials && $(MAKE) clean
+ cd security && $(MAKE) clean
+ cd conf && $(MAKE) clean
+ cd developer && $(MAKE) clean
+
+distclean:
+ cd man && $(MAKE) distclean
+ cd user && $(MAKE) distclean
+ cd tutorials && $(MAKE) distclean
+ cd security && $(MAKE) distclean
+ cd conf && $(MAKE) distclean
+ cd developer && $(MAKE) distclean