summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-08-25 13:41:42 +0000
committerMike Frysinger <vapier@gentoo.org>2007-08-25 13:41:42 +0000
commit8476af1dcb530f59fc0dd53851a6b8894228d5b4 (patch)
tree3cf453b1f980e9280e2c1aed55079a140bd061b8 /app-portage
parentarm/sh stable (diff)
downloadgentoo-2-8476af1dcb530f59fc0dd53851a6b8894228d5b4.tar.gz
gentoo-2-8476af1dcb530f59fc0dd53851a6b8894228d5b4.tar.bz2
gentoo-2-8476af1dcb530f59fc0dd53851a6b8894228d5b4.zip
allow for @DESCRIPTION to be omitted if @RETURN exists
(Portage version: 2.1.3.7)
Diffstat (limited to 'app-portage')
-rw-r--r--app-portage/eclass-manpages/files/eclass-to-manpage.awk16
1 files changed, 10 insertions, 6 deletions
diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 440c5624f138..2ecc638a4799 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.5 2007/08/07 03:11:50 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.6 2007/08/25 13:41:42 vapier Exp $
# This awk converts the comment documentation found in eclasses
# into man pages for easier/nicer reading.
@@ -26,7 +26,7 @@
# @MAINTAINER:
# <optional; list of contacts, one per line>
# @DESCRIPTION:
-# <required; blurb about this function>
+# <required if no @RETURN; blurb about this function>
# The format of variables:
# @VARIABLE: foo
@@ -147,13 +147,17 @@ function handle_function() {
# now print out the stuff
print ".TP"
print "\\fB" func_name "\\fR " man_text(usage)
- print man_text(desc)
- if (funcret != "")
- print "\nReturn value: " funcret
+ if (desc != "")
+ print man_text(desc)
+ if (funcret != "") {
+ if (desc != "")
+ print ""
+ print "Return value: " funcret
+ }
if (blurb == "")
fail("no @BLURB found")
- if (desc == "")
+ if (desc == "" && funcret == "")
fail("no @DESCRIPTION found")
}