xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs: make .txt files writable when building from r/o sources
@ 2014-07-04 14:43 Jan Beulich
  2014-07-04 14:47 ` Andrew Cooper
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2014-07-04 14:43 UTC (permalink / raw)
  To: xen-devel

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

Otherwise an incremental build will fail to overwrite the destination
files.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/docs/Makefile
+++ b/docs/Makefile
@@ -125,6 +125,7 @@ endif
 html/%.txt: %.txt
 	$(INSTALL_DIR) $(@D)
 	cp $< $@
+	chmod u+w $@
 
 html/man/%.1.html: man/%.pod.1 Makefile
 	$(INSTALL_DIR) $(@D)




[-- Attachment #2: make-docs-ro-source.patch --]
[-- Type: text/plain, Size: 406 bytes --]

docs: make .txt files writable when building from r/o sources

Otherwise an incremental build will fail to overwrite the destination
files.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/docs/Makefile
+++ b/docs/Makefile
@@ -125,6 +125,7 @@ endif
 html/%.txt: %.txt
 	$(INSTALL_DIR) $(@D)
 	cp $< $@
+	chmod u+w $@
 
 html/man/%.1.html: man/%.pod.1 Makefile
 	$(INSTALL_DIR) $(@D)

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH] docs: make .txt files writable when building from r/o sources
  2014-07-04 14:43 [PATCH] docs: make .txt files writable when building from r/o sources Jan Beulich
@ 2014-07-04 14:47 ` Andrew Cooper
  2014-07-04 14:51   ` Jan Beulich
  2014-07-25 14:56   ` [PATCH v2] docs: make .txt files over-writable " Jan Beulich
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Cooper @ 2014-07-04 14:47 UTC (permalink / raw)
  To: Jan Beulich, xen-devel

On 04/07/14 15:43, Jan Beulich wrote:
> Otherwise an incremental build will fail to overwrite the destination
> files.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/docs/Makefile
> +++ b/docs/Makefile
> @@ -125,6 +125,7 @@ endif
>  html/%.txt: %.txt
>  	$(INSTALL_DIR) $(@D)
>  	cp $< $@
> +	chmod u+w $@

Perhaps $(INSTALL_DATA) in preference to cp + chmod ?

~Andrew

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

* Re: [PATCH] docs: make .txt files writable when building from r/o sources
  2014-07-04 14:47 ` Andrew Cooper
@ 2014-07-04 14:51   ` Jan Beulich
  2014-07-04 15:04     ` Andrew Cooper
  2014-07-25 14:56   ` [PATCH v2] docs: make .txt files over-writable " Jan Beulich
  1 sibling, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2014-07-04 14:51 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: xen-devel

>>> On 04.07.14 at 16:47, <andrew.cooper3@citrix.com> wrote:
> On 04/07/14 15:43, Jan Beulich wrote:
>> Otherwise an incremental build will fail to overwrite the destination
>> files.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> --- a/docs/Makefile
>> +++ b/docs/Makefile
>> @@ -125,6 +125,7 @@ endif
>>  html/%.txt: %.txt
>>  	$(INSTALL_DIR) $(@D)
>>  	cp $< $@
>> +	chmod u+w $@
> 
> Perhaps $(INSTALL_DATA) in preference to cp + chmod ?

I wasn't certain about the validity of the INSTALL_DIR use in a non-
install rule. If that's indeed fine, then INSTALL_DATA - if it does what
I want - would likely be the better thing.

Jan

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

* Re: [PATCH] docs: make .txt files writable when building from r/o sources
  2014-07-04 14:51   ` Jan Beulich
@ 2014-07-04 15:04     ` Andrew Cooper
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cooper @ 2014-07-04 15:04 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

On 04/07/14 15:51, Jan Beulich wrote:
>>>> On 04.07.14 at 16:47, <andrew.cooper3@citrix.com> wrote:
>> On 04/07/14 15:43, Jan Beulich wrote:
>>> Otherwise an incremental build will fail to overwrite the destination
>>> files.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>>
>>> --- a/docs/Makefile
>>> +++ b/docs/Makefile
>>> @@ -125,6 +125,7 @@ endif
>>>  html/%.txt: %.txt
>>>  	$(INSTALL_DIR) $(@D)
>>>  	cp $< $@
>>> +	chmod u+w $@
>> Perhaps $(INSTALL_DATA) in preference to cp + chmod ?
> I wasn't certain about the validity of the INSTALL_DIR use in a non-
> install rule. If that's indeed fine, then INSTALL_DATA - if it does what
> I want - would likely be the better thing.
>
> Jan
>

Because of the somewhat-backwards way the rules are defined, these are
all implicit install rules.

The 'build' rules take the bits from man/ misc/ and figs/ and creates
appropriate structures under man1/ man5/ html/ txt/ and pdf/, while the
'install' rules merely copies the appropriate built structure into
$(DESTDIR)/$({mandir,docdir})

Given the presence of INSTALL_DIR, I would say INSTALL_DATA is
absolutely fine. (with the concession that INSTALL_DIR isn't exactly
nice in that location, as it a huge number of attempts to create
existing directories, and I haven't had sufficient free time to find a
nice fix)

~Andrew

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

* [PATCH v2] docs: make .txt files over-writable when building from r/o sources
  2014-07-04 14:47 ` Andrew Cooper
  2014-07-04 14:51   ` Jan Beulich
@ 2014-07-25 14:56   ` Jan Beulich
  2014-07-25 15:24     ` Andrew Cooper
  1 sibling, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2014-07-25 14:56 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper

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

Otherwise an incremental build will fail to overwrite the destination
files.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: Use $(INSTALL_DATA) instead of cp+chmod.

--- a/docs/Makefile
+++ b/docs/Makefile
@@ -124,7 +124,7 @@ endif
 
 html/%.txt: %.txt
 	$(INSTALL_DIR) $(@D)
-	cp $< $@
+	$(INSTALL_DATA) $< $@
 
 html/man/%.1.html: man/%.pod.1 Makefile
 	$(INSTALL_DIR) $(@D)




[-- Attachment #2: make-docs-ro-source.patch --]
[-- Type: text/plain, Size: 474 bytes --]

docs: make .txt files over-writable when building from r/o sources

Otherwise an incremental build will fail to overwrite the destination
files.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: Use $(INSTALL_DATA) instead of cp+chmod.

--- a/docs/Makefile
+++ b/docs/Makefile
@@ -124,7 +124,7 @@ endif
 
 html/%.txt: %.txt
 	$(INSTALL_DIR) $(@D)
-	cp $< $@
+	$(INSTALL_DATA) $< $@
 
 html/man/%.1.html: man/%.pod.1 Makefile
 	$(INSTALL_DIR) $(@D)

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH v2] docs: make .txt files over-writable when building from r/o sources
  2014-07-25 14:56   ` [PATCH v2] docs: make .txt files over-writable " Jan Beulich
@ 2014-07-25 15:24     ` Andrew Cooper
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cooper @ 2014-07-25 15:24 UTC (permalink / raw)
  To: Jan Beulich, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 660 bytes --]

On 25/07/14 15:56, Jan Beulich wrote:
> Otherwise an incremental build will fail to overwrite the destination
> files.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
> v2: Use $(INSTALL_DATA) instead of cp+chmod.
>
> --- a/docs/Makefile
> +++ b/docs/Makefile
> @@ -124,7 +124,7 @@ endif
>  
>  html/%.txt: %.txt
>  	$(INSTALL_DIR) $(@D)
> -	cp $< $@
> +	$(INSTALL_DATA) $< $@
>  
>  html/man/%.1.html: man/%.pod.1 Makefile
>  	$(INSTALL_DIR) $(@D)
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel


[-- Attachment #1.2: Type: text/html, Size: 1554 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2014-07-25 15:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-04 14:43 [PATCH] docs: make .txt files writable when building from r/o sources Jan Beulich
2014-07-04 14:47 ` Andrew Cooper
2014-07-04 14:51   ` Jan Beulich
2014-07-04 15:04     ` Andrew Cooper
2014-07-25 14:56   ` [PATCH v2] docs: make .txt files over-writable " Jan Beulich
2014-07-25 15:24     ` Andrew Cooper

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 NNTP newsgroup(s).