[ntpsec commit] Take a step towards man-page generation. Explanation in devekl-docs/TODO.

Eric S. Raymond esr at ntpsec.org
Mon Oct 12 17:05:16 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    e54462603c70012bf0b693033baa21e02f01db1c
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=e54462603c70012bf0b693033baa21e02f01db1c

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Mon Oct 12 13:04:20 2015 -0400

Take a step towards man-page generation. Explanation in devekl-docs/TODO.

---

 devel-docs/TODO                                    | 13 +++++++----
 .../{ntp-wait.txt.in => ntp-wait-man.txt.in}       |  0
 sntp/{sntp.txt.in => sntp-man.txt.in}              |  0
 wscript                                            | 27 ++++++++++++++++++----
 4 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/devel-docs/TODO b/devel-docs/TODO
index 511380c..2ec3a98 100644
--- a/devel-docs/TODO
+++ b/devel-docs/TODO
@@ -15,11 +15,14 @@ None right now. (Sep-22 2015)
 * Add 'snapshot' feature to dump config status into a JSON file for collecting 
   build + platform information
 
-* scripts/*/*.in and scripts/ntpsweep.in need to be expanded into the
-  actual scripts by substituting in @-cookies.  So do all files in the tree
-  with extension *.txt.in.
-
-* The doc target should build manual pages.
+* @ expansion needs to be made to work fully for *.txt.in files. They
+  are not yet doing file inclusions properly - for example, in
+  sntp/sntp-man.txt.in the @../docs/includes/sntp-body.txt@ is not
+  interpreted.
+
+* The doc target should build manual pages. Previous item about @-expansion
+  is a prerequisite for this, then the *-man.txt files need to be passed
+  through asciidoc to make generated man pages.
 
 * The install production needs to warn of stale ntpdc and ntpdate binaries.
 
diff --git a/scripts/ntp-wait/ntp-wait.txt.in b/scripts/ntp-wait/ntp-wait-man.txt.in
similarity index 100%
rename from scripts/ntp-wait/ntp-wait.txt.in
rename to scripts/ntp-wait/ntp-wait-man.txt.in
diff --git a/sntp/sntp.txt.in b/sntp/sntp-man.txt.in
similarity index 100%
rename from sntp/sntp.txt.in
rename to sntp/sntp-man.txt.in
diff --git a/wscript b/wscript
index b4cefcb..c157abe 100644
--- a/wscript
+++ b/wscript
@@ -109,8 +109,7 @@ def build(ctx):
 #	ctx.recurse("tests")
 
 
-	subst_source = [
-		"ntpd/complete.conf.in",
+	subst_scripts = [
 		"scripts/ntp-wait/ntp-wait.in",
 		"scripts/ntpsweep/ntpsweep.in",
 		"scripts/ntptrace/ntptrace.in",
@@ -119,8 +118,26 @@ def build(ctx):
 
 	ctx(
 		features    = "subst",
-		source      = subst_source,
-		target		= [x.replace(".in", "") for x in subst_source],
-		chmod		= Utils.O755
+		source      = subst_scripts,
+		target	    = [x.replace(".in", "") for x in subst_scripts],
+		chmod	    = Utils.O755
+	)
+
+	subst_files = [
+		"ntp-keygen/ntp-keygen-man.txt.in",
+		"ntpd/complete.conf.in",
+		"ntpd/ntpd-man.txt.in",
+		"ntpq/ntpq-man.txt.in",
+		"scripts/ntp-wait/ntp-wait-man.txt.in",
+		"scripts/ntptrace/ntptrace-man.txt.in",
+		"sntp/sntp-man.txt.in",
+		"util/ntptickadj-man.txt.in",
+		"util/ntptime-man.txt.in",
+	]
+
+	ctx(
+		features    = "subst",
+		source      = subst_files,
+		target	    = [x.replace(".in", "") for x in subst_files],
 	)
 



More information about the vc mailing list