Makfile: Generate help for *.sh files.
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-bii_scripts/Makefile new-bii_scripts/Makefile
--- old-bii_scripts/Makefile 2022-09-26 05:19:42.227636924 +0200
+++ new-bii_scripts/Makefile 2022-09-26 05:19:42.227636924 +0200
@@ -28,6 +28,10 @@
# with no parameters at all
# add scriptname to the PLAINTXT_PL_SCRIPT_LIST variable
+# for scripts with name *.sh that generate help when called
+# with "-h" as the only parameter
+# add scriptname to the PLAINTXT_H_SH_SCRIPT_LIST variable
+
# for scripts with name *.pl that generate help when called
# with "-h" as the only parameter
# add scriptname to the PLAINTXT_H_PL_SCRIPT_LIST variable
@@ -302,6 +306,11 @@
PLAINTXT_HELP_SCRIPT_LIST= \
darcs-kompare \
darcs-meld
+
+# scripts with no embedded documentation
+# create online help by executing "(script.sh -h 2>&1; true)
+PLAINTXT_H_SH_SCRIPT_LIST= \
+ repo-mirror.sh
# scripts with no embedded documentation
# create online help by executing "(script.p -h 2>&1; true)
@@ -335,7 +344,7 @@
gen_iocsh_reg.pl
# scripts with no embedded documentation
-# create online help by executing "(script.pl -h 2>&1; true)
+# create online help by executing "(script.py -h 2>&1; true)
PLAINTXT_H_PY_SCRIPT_LIST= \
csv2json.py pyone.py sqlutil.py ssh-pw.py \
hg2darcs.py hg2git.py python-modules.py subst-dump.py
@@ -501,6 +510,9 @@
_HTML_PLAINTXT_HELP_SCRIPT_BUILD_LIST=\
$(addprefix $(SCRIPT_HTML_BUILD_DIR)/,$(call force_extension_list,html,$(PLAINTXT_HELP_SCRIPT_LIST)))
+_HTML_PLAINTXT_H_SH_SCRIPT_BUILD_LIST=\
+ $(addprefix $(SCRIPT_HTML_BUILD_DIR)/,$(call force_extension_list,html,$(PLAINTXT_H_SH_SCRIPT_LIST)))
+
_HTML_PLAINTXT_H_P_SCRIPT_BUILD_LIST=\
$(addprefix $(SCRIPT_HTML_BUILD_DIR)/,$(call force_extension_list,html,$(PLAINTXT_H_P_SCRIPT_LIST)))
@@ -513,6 +525,9 @@
_HTML_PLAINTXT_PL_SCRIPT_BUILD_LIST=\
$(addprefix $(SCRIPT_HTML_BUILD_DIR)/,$(call force_extension_list,html,$(PLAINTXT_PL_SCRIPT_LIST)))
+_HTML_PLAINTXT_SH_SCRIPT_BUILD_LIST=\
+ $(addprefix $(SCRIPT_HTML_BUILD_DIR)/,$(call force_extension_list,html,$(PLAINTXT_SH_SCRIPT_LIST)))
+
_HTML_PLAINTXT_SCRIPT_BUILD_LIST=\
$(addprefix $(SCRIPT_HTML_BUILD_DIR)/,$(call force_extension_list,html,$(PLAINTXT_SCRIPT_LIST)))
@@ -525,6 +540,7 @@
# all plaintxt documentation scripts:
_PLAINTXT_ALL_SCRIPT_LIST= \
$(PLAINTXT_H_SCRIPT_LIST) \
+ $(PLAINTXT_H_SH_SCRIPT_LIST) \
$(PLAINTXT_H_P_SCRIPT_LIST) \
$(PLAINTXT_H_PL_SCRIPT_LIST) \
$(PLAINTXT_H_PY_SCRIPT_LIST) \
@@ -764,6 +780,7 @@
build_html_script_plaintxt: $(_HTML_PLAINTXT_SCRIPT_BUILD_LIST) \
$(_HTML_PLAINTXT_H_SCRIPT_BUILD_LIST) \
$(_HTML_PLAINTXT_HELP_SCRIPT_BUILD_LIST) \
+ $(_HTML_PLAINTXT_H_SH_SCRIPT_BUILD_LIST) \
$(_HTML_PLAINTXT_H_P_SCRIPT_BUILD_LIST) \
$(_HTML_PLAINTXT_H_PL_SCRIPT_BUILD_LIST) \
$(_HTML_PLAINTXT_H_PY_SCRIPT_BUILD_LIST) \
@@ -784,6 +801,11 @@
(. $(SETENV) && $< --help 2>&1; true) >> $@
@echo "</PRE>" >> $@
+$(_HTML_PLAINTXT_H_SH_SCRIPT_BUILD_LIST): $(SCRIPT_HTML_BUILD_DIR)/%.html: $(SCRIPT_SRC_DIR)/%.sh | $(SCRIPT_HTML_BUILD_DIR) mk_exec
+ @echo "<PRE>" > $@
+ (. $(SETENV) && $< -h 2>>$(ERRLOG); true) >> $@
+ @echo "</PRE>" >> $@
+
$(_HTML_PLAINTXT_H_P_SCRIPT_BUILD_LIST): $(SCRIPT_HTML_BUILD_DIR)/%.html: $(SCRIPT_SRC_DIR)/%.p | $(SCRIPT_HTML_BUILD_DIR) mk_exec
@echo "<PRE>" > $@
(. $(SETENV) && $< -h 2>&1; true) >> $@
patch b113ee3d9bf91d25ce4413b769e619c612162ee1
Author: Goetz Pfeiffer <Goetz.Pfeiffer@helmholtz-berlin.de>
Date: Mon Jan 24 11:04:52 CET 2022
* Makfile: Generate help for *.sh files