2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Updated the comment parsing logic in Boost Build's util/doc.jam module. Now correctly recognizes comment blocks starting with an empty line and correctly parses comment lines where the initial # character is followed by a non-whitespace characters.

This for example allows it to correctly process comments written like this:

######################################
#
# And example comment.
#
######################################

Which would previously not get interpreted as valid module description comment blocks.

[SVN r48313]
This commit is contained in:
Jurko Gospodnetić
2008-08-23 11:51:45 +00:00
parent 3788ebf2c4
commit 97e9af5e74

View File

@@ -606,7 +606,7 @@ local rule print-help-project (
: jamfile * # The project Jamfile.
)
{
if $(jamfile<$(jamfile)>.docs[1])
if $(jamfile<$(jamfile)>.docs)
{
# Print the docs.
print.section "Project-specific help"
@@ -625,7 +625,7 @@ local rule print-help-config (
config-file # The configuration Jamfile.
)
{
if $(jamfile<$(config-file)>.docs[1])
if $(jamfile<$(config-file)>.docs)
{
# Print the docs.
print.section "Configuration help"
@@ -649,7 +649,7 @@ local rule extract-comment (
local l = [ MATCH "^[$(ws)]*(#)(.*)$" : $(line) ] ;
while $(l[1]) && $($(var))
{
if $(l[2]) { comment += [ MATCH "^[$(ws)](.*)$" : $(l[2]) ] ; }
if $(l[2]) { comment += [ MATCH "^[$(ws)]?(.*)$" : $(l[2]) ] ; }
else { comment += "" ; }
$(var) = $($(var)[2-]) ;
line = $($(var)[1]) ;
@@ -908,7 +908,7 @@ rule scan-module (
set-module-copyright $(module-name) : $(comment-block) ;
}
else if $(action[1]) in "print-help-project" "print-help-config"
&& ! $(jamfile<$(target)>.docs[1])
&& ! $(jamfile<$(target)>.docs)
{
# special module docs for the project jamfile.
jamfile<$(target)>.docs = $(comment-block) ;