emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marco Wahl <marcowahlsoft@gmail.com>
To: "Ulrich Müller" <ulm@gentoo.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix parallel build failure for Texinfo manual
Date: Mon, 20 Dec 2021 22:39:06 +0100	[thread overview]
Message-ID: <87r1a7rm6d.fsf@gmail.com> (raw)
In-Reply-To: <uee67gr96@gentoo.org> ("Ulrich Müller"'s message of "Mon, 20 Dec 2021 17:44:53 +0100")

[-- Attachment #1: Type: text/plain, Size: 2592 bytes --]

Ulrich Müller <ulm@gentoo.org> writes:

> * doc/Makefile (org.texi, orgguide.texi): Fix parallel build failure.
> ---
>
> Forwarding Gentoo Linux bug #829055 <https://bugs.gentoo.org/829055>.
> When doing a parallel build (make -j16), a failure was observed when
> building the Texinfo documentation:
>
> make -C doc info
> make[1]: Entering directory '/var/tmp/portage/app-emacs/org-mode-9.5/work/org-mode-release_9.5/doc'
> emacs  -Q -batch --eval '(setq vc-handled-backends nil org-startup-folded nil)' 				      \
>   --eval '(add-to-list `load-path "../lisp")' \
>   --eval '(load "../mk/org-fixup.el")' 	      \
>   --eval '(org-make-manuals)'
> emacs  -Q -batch --eval '(setq vc-handled-backends nil org-startup-folded nil)' 				      \
>   --eval '(add-to-list `load-path "../lisp")' \
>   --eval '(load "../mk/org-fixup.el")' 	      \
>   --eval '(org-make-manuals)'
> Loading /var/tmp/portage/app-emacs/org-mode-9.5/work/org-mode-release_9.5/mk/org-fixup.el (source)...
> Loading /var/tmp/portage/app-emacs/org-mode-9.5/work/org-mode-release_9.5/mk/org-fixup.el (source)...
> ...lease_9.5/doc/org.texi locked by portage@local... (pid 55): (s, q, p, ?)? 
> Cannot resolve lock conflict in batch mode
> make[1]: *** [Makefile:31: orgguide.texi] Error 255
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory '/var/tmp/portage/app-emacs/org-mode-9.5/work/org-mode-release_9.5/doc'
> make: *** [mk/targets.mk:127: info] Error 2
>
> Fix by making org.texi a prerequisite of orgguide.texi, with an empty
> recipe.
>
>  doc/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/doc/Makefile b/doc/Makefile
> index 96fda1445..7f996deae 100644
> --- a/doc/Makefile
> +++ b/doc/Makefile
> @@ -27,12 +27,14 @@ guide::		orgguide.texi org-version.inc
>  	../mk/guidesplit.pl $@/*
>  endif
>  
> -org.texi orgguide.texi:	org-manual.org org-guide.org
> +org.texi:	org-manual.org org-guide.org
>  	$(BATCH) \
>  	  --eval '(add-to-list '"'"'load-path "../lisp")' \
>  	  --eval '(load "../mk/org-fixup.el")' \
>  	  --eval '(org-make-manuals)'
>  
> +orgguide.texi:	org.texi
> +
>  org-version.inc:	org.texi
>  	@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
>  	@echo "@c automatically generated, do not edit"  > org-version.inc

Thanks for the report and the suggestion.

Possibly a split of function org-make-manuals in org-make-manual and
org-make-guide and further create two single targets instead of the
current double target is more clear.

See the patch.

WDYT?



[-- Attachment #2: 0001-Fix-parallel-make-of-docs.patch --]
[-- Type: text/x-diff, Size: 2409 bytes --]

From cc89632186d63b2078baf446e44ed1425974be5e Mon Sep 17 00:00:00 2001
From: Marco Wahl <marcowahlsoft@gmail.com>
Date: Mon, 20 Dec 2021 22:27:50 +0100
Subject: [PATCH] Fix parallel make of docs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* doc/Makefile: Split multiple target "org.texi orgguide.texi".
* mk/org-fixup.el (org-make-manual, org-make-guide):  New functions.
  (org-make-manuals): Removed.

Reported by Ulrich Müller.  https://list.orgmode.org/uee67gr96@gentoo.org/
---
 doc/Makefile    | 10 ++++++++--
 mk/org-fixup.el | 15 ++++++++++-----
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/doc/Makefile b/doc/Makefile
index 7fb96e65d..5b8639330 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -27,11 +27,17 @@ guide::		orgguide.texi org-version.inc
 	../mk/guidesplit.pl $@/*
 endif
 
-org.texi orgguide.texi:	org-manual.org org-guide.org
+org.texi:	org-manual.org org-guide.org
 	$(BATCH) 				      \
 	  --eval '(add-to-list `load-path "../lisp")' \
 	  --eval '(load "../mk/org-fixup.el")' 	      \
-	  --eval '(org-make-manuals)'
+	  --eval '(org-make-manual)'
+
+orgguide.texi:	org-manual.org org-guide.org
+	$(BATCH) 				      \
+	  --eval '(add-to-list `load-path "../lisp")' \
+	  --eval '(load "../mk/org-fixup.el")' 	      \
+	  --eval '(org-make-guide)'
 
 org-version.inc:	org.texi
 	@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
diff --git a/mk/org-fixup.el b/mk/org-fixup.el
index c0eef23cb..e910f0b52 100644
--- a/mk/org-fixup.el
+++ b/mk/org-fixup.el
@@ -27,12 +27,17 @@
 (require 'autoload)
 (require 'org-compat "org-compat.el")
 
-(defun org-make-manuals ()
-  "Generate the Texinfo files out of Org manuals."
+(defun org-make-manual ()
+  "Generate the Texinfo file out of the Org manual."
   (require 'ox-texinfo)
-  (dolist (manual '("../doc/org-manual.org" "../doc/org-guide.org"))
-    (find-file manual)
-    (org-texinfo-export-to-texinfo)))
+  (find-file "../doc/org-manual.org")
+  (org-texinfo-export-to-texinfo))
+
+(defun org-make-guide ()
+  "Generate the Texinfo file out of the Org guide."
+  (require 'ox-texinfo)
+  (find-file "../doc/org-guide.org")
+  (org-texinfo-export-to-texinfo))
 
 (defun org-make-org-version (org-release org-git-version)
   "Make the file org-version.el in the current directory.
-- 
2.25.1


  reply	other threads:[~2021-12-20 21:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 16:44 [PATCH] Fix parallel build failure for Texinfo manual Ulrich Müller
2021-12-20 21:39 ` Marco Wahl [this message]
2021-12-21  7:29   ` Ulrich Mueller
2021-12-21 11:21     ` Marco Wahl
2021-12-21 12:17   ` Max Nikulin
2021-12-21 12:48     ` Marco Wahl
2021-12-21 14:37       ` Max Nikulin
2021-12-21 20:34         ` Marco Wahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1a7rm6d.fsf@gmail.com \
    --to=marcowahlsoft@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ulm@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).