1290001Sglebius[+: -*- Mode: nroff -*- 2290001Sglebius 3290001Sglebius AutoGen5 template man 4290001Sglebius 5290001Sglebius## agman-cmd.tpl -- Template for command line man pages 6290001Sglebius## 7290001Sglebius## This file is part of AutoOpts, a companion to AutoGen. 8290001Sglebius## AutoOpts is free software. 9290001Sglebius## Copyright (C) 1992-2013 Bruce Korb - all rights reserved 10290001Sglebius## 11290001Sglebius## AutoOpts is available under any one of two licenses. The license 12290001Sglebius## in use must be one of these two and the choice is under the control 13290001Sglebius## of the user of the license. 14290001Sglebius## 15290001Sglebius## The GNU Lesser General Public License, version 3 or later 16290001Sglebius## See the files "COPYING.lgplv3" and "COPYING.gplv3" 17290001Sglebius## 18290001Sglebius## The Modified Berkeley Software Distribution License 19290001Sglebius## See the file "COPYING.mbsd" 20290001Sglebius## 21290001Sglebius## These files have the following sha256 sums: 22290001Sglebius## 23290001Sglebius## 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3 24290001Sglebius## 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3 25290001Sglebius## 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd 26290001Sglebius 27290001Sglebius# Produce a man page for section 1, 5 or 8 commands. 28290001Sglebius# Which is selected via: -DMAN_SECTION=n 29290001Sglebius# passed to the autogen invocation. "n" may have a suffix, if desired. 30290001Sglebius# 31290001Sglebius:+][+: 32290001Sglebius 33290001Sglebius(define head-line (lambda() 34290001Sglebius (sprintf ".TH %s %s \"%s\" \"%s\" \"%s\"\n.\\\"\n" 35290001Sglebius (get "prog-name") man-sect 36290001Sglebius (shell "date '+%d %b %Y'") package-text section-name) )) 37290001Sglebius 38290001Sglebius(define man-page #t) 39290001Sglebius(out-push-new) :+][+: 40290001Sglebius 41290001SglebiusINCLUDE "mdoc-synopsis.tlib" :+][+: 42290001SglebiusINCLUDE "cmd-doc.tlib" :+][+: 43290001Sglebius 44290001SglebiusINVOKE build-doc :+][+: 45290001Sglebius 46290001Sglebius (shell (string-append 47290001Sglebius "fn='" (find-file "mdoc2man") "'\n" 48290001Sglebius "test -f ${fn} || die mdoc2man not found from $PWD\n" 49290001Sglebius "${fn} <<\\_EndOfMdoc_ || die ${fn} failed in $PWD\n" 50290001Sglebius (out-pop #t) 51290001Sglebius "\n_EndOfMdoc_" )) 52290001Sglebius 53290001Sglebius:+][+: 54290001Sglebius 55290001Sglebius(out-move (string-append (get "prog-name") "." 56290001Sglebius man-sect)) :+][+: 57290001Sglebius 58290001Sglebiusagman-cmd.tpl ends here :+] 59