unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] build: Fix out-of-tree building of documentation.
@ 2016-01-09 15:30 Taylan Ulrich Bayırlı/Kammer
  2016-01-09 21:30 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-01-09 15:30 UTC (permalink / raw)
  To: guix-devel

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

While working on my other patch I noticed we already have some issues
with out-of-tree builds.  Resolved by this patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-Fix-out-of-tree-building-of-documentation.patch --]
[-- Type: text/x-diff, Size: 1035 bytes --]

From 41650754511487f5f1f937317eebd80c19ca8bf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Sat, 9 Jan 2016 15:56:23 +0100
Subject: [PATCH] build: Fix out-of-tree building of documentation.

* doc.am (.dot.png, .dot.pdf, .dot.eps, .png.eps): Create the directory
  for each target in case of out-of-tree building.
---
 doc.am | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc.am b/doc.am
index e3a91cc..04a74a9 100644
--- a/doc.am
+++ b/doc.am
@@ -65,18 +65,22 @@ DOT_OPTIONS =					\
   -Nfontsize=9 -Nheight=.1 -Nwidth=.1
 
 .dot.png:
+	$(MKDIR_P) `dirname "$@"`
 	$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
 	mv "$@.tmp" "$@"
 
 .dot.pdf:
+	$(MKDIR_P) `dirname "$@"`
 	$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
 	mv "$@.tmp" "$@"
 
 .dot.eps:
+	$(MKDIR_P) `dirname "$@"`
 	$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
 	mv "$@.tmp" "$@"
 
 .png.eps:
+	$(MKDIR_P) `dirname "$@"`
 	convert "$<" "$@-tmp.eps"
 	mv "$@-tmp.eps" "$@"
 
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Fix out-of-tree building of documentation.
  2016-01-09 15:30 [PATCH] build: Fix out-of-tree building of documentation Taylan Ulrich Bayırlı/Kammer
@ 2016-01-09 21:30 ` Ludovic Courtès
  2016-01-10  9:49   ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-01-09 21:30 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: guix-devel

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

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> From 41650754511487f5f1f937317eebd80c19ca8bf1 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>  <taylanbayirli@gmail.com>
> Date: Sat, 9 Jan 2016 15:56:23 +0100
> Subject: [PATCH] build: Fix out-of-tree building of documentation.
>
> * doc.am (.dot.png, .dot.pdf, .dot.eps, .png.eps): Create the directory
>   for each target in case of out-of-tree building.

The files in $(DOT_VECTOR_GRAPHICS) are part of the distribution.  Thus,
when building from a tarball, they are in $(srcdir), not in $(builddir).

However, when building from Git out-of-tree, they should go do $(srcdir)
as well (as is done for Info files.)

A fix would be:


[-- Attachment #2: Type: text/x-patch, Size: 830 bytes --]

diff --git a/doc.am b/doc.am
index e3a91cc..21b08be 100644
--- a/doc.am
+++ b/doc.am
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
 #
 # This file is part of GNU Guix.
@@ -66,15 +66,15 @@ DOT_OPTIONS =					\
 
 .dot.png:
 	$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	mv "$@.tmp" "$(srcdir)/$@"
 
 .dot.pdf:
 	$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	mv "$@.tmp" "$(srcdir)/$@"
 
 .dot.eps:
 	$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	mv "$@.tmp" "$(srcdir)/$@"
 
 .png.eps:
 	convert "$<" "$@-tmp.eps"

[-- Attachment #3: Type: text/plain, Size: 37 bytes --]


Does it work for you?

Ludo’.

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Fix out-of-tree building of documentation.
  2016-01-09 21:30 ` Ludovic Courtès
@ 2016-01-10  9:49   ` Taylan Ulrich Bayırlı/Kammer
  2016-01-10 10:34     ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 1 reply; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-01-10  9:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

ludo@gnu.org (Ludovic Courtès) writes:

> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:
>
>> From 41650754511487f5f1f937317eebd80c19ca8bf1 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>>  <taylanbayirli@gmail.com>
>> Date: Sat, 9 Jan 2016 15:56:23 +0100
>> Subject: [PATCH] build: Fix out-of-tree building of documentation.
>>
>> * doc.am (.dot.png, .dot.pdf, .dot.eps, .png.eps): Create the directory
>>   for each target in case of out-of-tree building.
>
> The files in $(DOT_VECTOR_GRAPHICS) are part of the distribution.  Thus,
> when building from a tarball, they are in $(srcdir), not in $(builddir).
>
> However, when building from Git out-of-tree, they should go do $(srcdir)
> as well (as is done for Info files.)
>
> A fix would be:
>
> [...]

That doesn't solve the problem that the directories for the .tmp files
don't exist.  Does the following look right?


[-- Attachment #2: 0001-build-Fix-out-of-tree-building-of-documentation.patch --]
[-- Type: text/x-diff, Size: 1900 bytes --]

From 8e5f869674334b2f13373abfaf3c72b7bb446c7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Sun, 10 Jan 2016 10:14:43 +0100
Subject: [PATCH 1/2] build: Fix out-of-tree building of documentation.

* doc.am (.dot.png, .dot.pdf, .dot.eps, .png.eps): Put the generated
  files into $(srcdir).
---
 doc.am | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/doc.am b/doc.am
index e3a91cc..49d35c2 100644
--- a/doc.am
+++ b/doc.am
@@ -1,6 +1,7 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
+# Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -65,20 +66,20 @@ DOT_OPTIONS =					\
   -Nfontsize=9 -Nheight=.1 -Nwidth=.1
 
 .dot.png:
-	$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.pdf:
-	$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.eps:
-	$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .png.eps:
-	convert "$<" "$@-tmp.eps"
-	mv "$@-tmp.eps" "$@"
+	convert "$<" "$(srcdir)/$@-tmp.eps"
+	mv "$(srcdir)/$@-tmp.eps" "$(srcdir)/$@"
 
 # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
 # Extending").  Using the `-local' rules is imperfect, because they may be
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Fix out-of-tree building of documentation.
  2016-01-10  9:49   ` Taylan Ulrich Bayırlı/Kammer
@ 2016-01-10 10:34     ` Taylan Ulrich Bayırlı/Kammer
  2016-01-10 21:03       ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-01-10 10:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

>  .png.eps:
> -	convert "$<" "$@-tmp.eps"
> -	mv "$@-tmp.eps" "$@"
> +	convert "$<" "$(srcdir)/$@-tmp.eps"
> +	mv "$(srcdir)/$@-tmp.eps" "$(srcdir)/$@"

Whoops, looks like that rule mustn't be changed.

Updated patch:


[-- Attachment #2: 0001-build-Fix-out-of-tree-building-of-documentation.patch --]
[-- Type: text/x-diff, Size: 1617 bytes --]

From 80c928d93b9f87e227684a53dc4ce4477698c86b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Sun, 10 Jan 2016 10:14:43 +0100
Subject: [PATCH] build: Fix out-of-tree building of documentation.

* doc.am (.dot.png, .dot.pdf, .dot.eps): Put the generated files into
  $(srcdir).
---
 doc.am | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/doc.am b/doc.am
index e3a91cc..8a5cfdc 100644
--- a/doc.am
+++ b/doc.am
@@ -1,6 +1,7 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
+# Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -65,16 +66,16 @@ DOT_OPTIONS =					\
   -Nfontsize=9 -Nheight=.1 -Nwidth=.1
 
 .dot.png:
-	$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.pdf:
-	$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.eps:
-	$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
-	mv "$@.tmp" "$@"
+	$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .png.eps:
 	convert "$<" "$@-tmp.eps"
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Fix out-of-tree building of documentation.
  2016-01-10 10:34     ` Taylan Ulrich Bayırlı/Kammer
@ 2016-01-10 21:03       ` Ludovic Courtès
  2016-01-10 21:33         ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-01-10 21:03 UTC (permalink / raw)
  To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: guix-devel

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> From 80c928d93b9f87e227684a53dc4ce4477698c86b Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>  <taylanbayirli@gmail.com>
> Date: Sun, 10 Jan 2016 10:14:43 +0100
> Subject: [PATCH] build: Fix out-of-tree building of documentation.
>
> * doc.am (.dot.png, .dot.pdf, .dot.eps): Put the generated files into
>   $(srcdir).

LGTM.  If ‘make distcheck’ is still happy, go for it!

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] build: Fix out-of-tree building of documentation.
  2016-01-10 21:03       ` Ludovic Courtès
@ 2016-01-10 21:33         ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 0 replies; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-01-10 21:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:
>
>> From 80c928d93b9f87e227684a53dc4ce4477698c86b Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>>  <taylanbayirli@gmail.com>
>> Date: Sun, 10 Jan 2016 10:14:43 +0100
>> Subject: [PATCH] build: Fix out-of-tree building of documentation.
>>
>> * doc.am (.dot.png, .dot.pdf, .dot.eps): Put the generated files into
>>   $(srcdir).
>
> LGTM.  If ‘make distcheck’ is still happy, go for it!

Yup, pushed.

> Thanks,
> Ludo’.

Taylan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-10 21:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-09 15:30 [PATCH] build: Fix out-of-tree building of documentation Taylan Ulrich Bayırlı/Kammer
2016-01-09 21:30 ` Ludovic Courtès
2016-01-10  9:49   ` Taylan Ulrich Bayırlı/Kammer
2016-01-10 10:34     ` Taylan Ulrich Bayırlı/Kammer
2016-01-10 21:03       ` Ludovic Courtès
2016-01-10 21:33         ` Taylan Ulrich Bayırlı/Kammer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.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).