allow extra spaces after \ line continuation in Makefile.am

This commit is contained in:
Frédéric Péters 2011-09-29 18:17:32 +02:00
parent 0508681eee
commit 4677984da0
1 changed files with 3 additions and 2 deletions

View File

@ -494,8 +494,9 @@ class Lgo(App):
doc = None
if os.path.split(tarinfo.name)[-1] in ('Makefile.am', 'GNUmakefile.am'):
fd = tar.extractfile(tarinfo)
makefile_am = fd.read()
makefile_am = makefile_am.replace('\\\n', ' ')
makefile_am = fd.read()
# merge lines continued with \
makefile_am = re.sub(r'\\\s*\n', r' ', makefile_am)
if 'DOC_ID' in makefile_am and regex_gdu.findall(makefile_am):
logging.debug('found usage of mallard in %s' % tarinfo.name)
doc = MallardModule.create_from_tar(tar, tarinfo, makefile_am, nightly)