public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Fix 'make man' for parallel make
@ 2016-12-06 17:36 Jon TURNEY
  0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2016-12-06 17:36 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4007871174fb9c814103b6a9215f24a700409fa7

commit 4007871174fb9c814103b6a9215f24a700409fa7
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Dec 6 15:06:26 2016 +0000

    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>

Diff:
---
 newlib/Makefile.am        | 1 +
 newlib/Makefile.in        | 1 +
 newlib/doc/Makefile.am    | 5 +++++
 newlib/doc/Makefile.in    | 5 +++++
 newlib/doc/makedocbook.py | 4 ++++
 5 files changed, 16 insertions(+)

diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index ee58007..20ab163 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -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; \
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index c04da3c..f0296b6 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -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; \
diff --git a/newlib/doc/Makefile.am b/newlib/doc/Makefile.am
index 99afb41..dbebfcc 100644
--- a/newlib/doc/Makefile.am
+++ b/newlib/doc/Makefile.am
@@ -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
diff --git a/newlib/doc/Makefile.in b/newlib/doc/Makefile.in
index de17da7..a12872d 100644
--- a/newlib/doc/Makefile.in
+++ b/newlib/doc/Makefile.in
@@ -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:
diff --git a/newlib/doc/makedocbook.py b/newlib/doc/makedocbook.py
index 1b4f5ab..0c84e3c 100755
--- a/newlib/doc/makedocbook.py
+++ b/newlib/doc/makedocbook.py
@@ -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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-06 17:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-06 17:36 [newlib-cygwin] Fix 'make man' for parallel make Jon TURNEY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).