Fix 'make man' for parallel make
Ensure the Python Lex/Yacc (PLY) cache used by makedocbook is initialized before it is used by parallelizable rules to make the DocBook XML, as it appears that these can collide in cache generation, leading to errors. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
72ee64045b
commit
4007871174
|
@ -364,6 +364,7 @@ doc/makedoc:
|
|||
|
||||
# Recursive targets for man and install-man
|
||||
man:
|
||||
(cd doc && $(MAKE) man-cache) || exit 1; \
|
||||
for d in $(SUBDIRS); do \
|
||||
if test "$$d" != "."; then \
|
||||
(cd $$d && $(MAKE) man) || exit 1; \
|
||||
|
|
|
@ -1116,6 +1116,7 @@ doc/makedoc:
|
|||
|
||||
# Recursive targets for man and install-man
|
||||
man:
|
||||
(cd doc && $(MAKE) man-cache) || exit 1; \
|
||||
for d in $(SUBDIRS); do \
|
||||
if test "$$d" != "."; then \
|
||||
(cd $$d && $(MAKE) man) || exit 1; \
|
||||
|
|
|
@ -21,3 +21,8 @@ ACLOCAL_AMFLAGS = -I .. -I ../..
|
|||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
|
||||
man:
|
||||
|
||||
man-cache:
|
||||
${srcdir}/makedocbook.py --cache
|
||||
|
||||
.PHONY: man-cache
|
||||
|
|
|
@ -358,6 +358,11 @@ makedoc.o: makedoc.c
|
|||
|
||||
man:
|
||||
|
||||
man-cache:
|
||||
${srcdir}/makedocbook.py --cache
|
||||
|
||||
.PHONY: man-cache
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
|
@ -824,8 +824,12 @@ def main(file):
|
|||
if __name__ == '__main__' :
|
||||
options = OptionParser()
|
||||
options.add_option('-v', '--verbose', action='count', dest = 'verbose')
|
||||
options.add_option('-c', '--cache', action='store_true', dest = 'cache', help="just ensure PLY cache is up to date")
|
||||
(opts, args) = options.parse_args()
|
||||
|
||||
if opts.cache:
|
||||
sys.exit()
|
||||
|
||||
verbose = opts.verbose
|
||||
|
||||
if len(args) > 0:
|
||||
|
|
Loading…
Reference in New Issue