Skip to contentSkip to conversation

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

PATCH Superseded Jan Beulich 2 participants 6 messages Jul 4, 2014 – Jul 25, 2014

lore
Share & tools
lore
#0 lore raw

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

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

docs/Makefile +1 -0
@@ -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)

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

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

docs/Makefile +1 -0
@@ -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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw

docs/Makefile endif · line 128

Quoted 12 lines · Jan Beulich

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

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

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

~Andrew

#2 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 04.07.14 at 16:47, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich

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

Quoted 9 lines

docs/Makefile endif · line 128

Quoted 7 lines
docs/Makefile +1 -0
@@ -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

#3 lore raw
Quoted 15 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 04.07.14 at 16:47, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich

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

Quoted 8 lines

docs/Makefile endif · line 128

Quoted 7 lines
docs/Makefile +1 -0
@@ -125,6 +125,7 @@ endif
 html/%.txt: %.txt
 	$(INSTALL_DIR) $(@D)
 	cp $< $@
+	chmod u+w $@

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

Quoted 6 lines

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

#4 lore raw

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

In reply to Andrew Cooper

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

---
v2: Use $(INSTALL_DATA) instead of cp+chmod.

docs/Makefile +1 -1
@@ -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)

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

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

---
v2: Use $(INSTALL_DATA) instead of cp+chmod.

docs/Makefile +1 -1
@@ -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
[email protected]
http://lists.xen.org/xen-devel

Reviewed-by on v2 1/1
#5 lore raw

Re: [PATCH v2] docs: make .txt files over-writable when building from r/o sources

Quoted 4 lines · Jan Beulich

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

Quoted 19 lines

---
v2: Use $(INSTALL_DATA) instead of cp+chmod.

docs/Makefile +1 -1
@@ -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)
Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel