Bug#542129: release-notes: etch Makefile builds regardless of the source status

View: New views
3 Messages — Rating Filter:   Alert me  

Bug#542129: release-notes: etch Makefile builds regardless of the source status

by Simon Paillard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Package: release-notes

As noticed on www-master.d.o and reproduced locally, the Etch
release-notes Makefile unconditionnaly rebuilds all the files everytime.

This takes a huge amount of time to build all languages then.

Same with PHONY targets commented.

--
Simon Paillard



--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Bug#542129: release-notes: etch Makefile builds regardless of the source status

by Simon Paillard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Aug 18, 2009 at 02:20:38AM +0200, Simon Paillard wrote:
> Package: release-notes
>
> As noticed on www-master.d.o and reproduced locally, the Etch
> release-notes Makefile unconditionnaly rebuilds all the files everytime.
>
> This takes a huge amount of time to build all languages then.
>
> Same with PHONY targets commented.

Makefile partially reworked to build only if necessary:
* only a arch specific entity file triggers a new build
* output files names are now tagged with the arch

See patch attached, will be commited soon, if someone with more makefile
skills can review it (though tested sucessfully, except pdf/ps build
that I did not test).

--
Simon Paillard


Index: Makefile.common
===================================================================
--- Makefile.common (révision 6929)
+++ Makefile.common (copie de travail)
@@ -16,7 +16,7 @@
 # this can and will be overriden by a higher level makefile
 PUBLISHDIR := /org/www.debian.org/www/releases/$(release)
 
-sources := $(manual).$(currentlang).sgml ../$(manual).ent ../dynamic.ent
+sources := $(manual).$(currentlang).sgml ../$(manual).ent ../dynamic_$(architecture).ent
 
 export LANG=C
 # stupid debiandoc stuff uses strings in another language otherwise
@@ -68,28 +68,32 @@
 validate: $(manual).$(currentlang).sgml
  nsgmls -ges -wall $(manual).$(currentlang).sgml
 
-html: $(manual).$(currentlang).html/index.$(currentlangcn).html
-$(manual).$(currentlang).html/index.$(currentlangcn).html: $(sources)
+html: $(manual).$(currentlang).$(architecture).html/index.$(currentlangcn).html
+$(manual).$(currentlang).$(architecture).html/index.$(currentlangcn).html: $(sources)
 # debiandoc-sgml v1.2.8 supports -C (not installed on build host)
- debiandoc2html -c -l $(ddencoding) $< && \
-  for i in $(manual).$(currentlang).html/*.html; do \
+ ln -sf dynamic_$(architecture).ent ../dynamic.ent
+ debiandoc2html -b $(manual).$(currentlang).$(architecture) -c -l $(ddencoding) $< && \
+  for i in $(manual).$(currentlang).$(architecture).html/*.html; do \
     sed 's/.utf-8.html/.html/' $$i > $$i.tmp && rm $$i && \
     mv $$i.tmp $$(echo $$i | sed 's/.utf-8//'); \
   done
 
-text: $(manual).$(currentlang).txt
-$(manual).$(currentlang).txt: $(sources)
- debiandoc2text -l $(ddencoding) $<
+text: $(manual).$(currentlang).$(architecture).txt
+$(manual).$(currentlang).$(architecture).txt: $(sources)
+ ln -sf dynamic_$(architecture).ent ../dynamic.ent
+ debiandoc2text -b $(manual).$(currentlang).$(architecture) -l $(ddencoding) $<
 
-$(manual).$(currentlang).info: $(sources)
- debiandoc2info -l $(ddencoding) $<
+$(manual).$(currentlang).$(architecture).info: $(sources)
+ ln -sf dynamic_$(architecture).ent ../dynamic.ent
+ debiandoc2info -b $(manual).$(currentlang).$(architecture) -l $(ddencoding) $<
 # TODO: rename to .$(currentlang).info?
 
-$(manual).$(currentlang).ps $(manual).$(currentlang).dvi $(manual).$(currentlang).pdf: \
-  $(manual).$(currentlang).%: $(sources)
- debiandoc2latex$* -l $(ddencoding) $<
+$(manual).$(currentlang).$(architecture).ps $(manual).$(currentlang).$(architecture).dvi $(manual).$(currentlang).$(architecture).pdf: \
+  $(manual).$(currentlang).$(architecture).%: $(sources)
+ ln -sf dynamic_$(architecture).ent ../dynamic.ent
+ debiandoc2latex$* -b $(manual).$(currentlang).$(architecture) -l $(ddencoding) $<
 
-ps dvi pdf info: %: $(manual).$(currentlang).%
+ps dvi pdf info: %: $(manual).$(currentlang).$(architecture).%
 
 # generate entities which are dynamically defined by the settings of this
 # build run
@@ -102,13 +106,9 @@
  echo "<!entity architecture     \"$(architecture)\">" >> $@
  echo "<!entity % $(architecture) \"INCLUDE\">" >> $@
 
-.PHONY: ../dynamic.ent
-../dynamic.ent: ../dynamic_$(architecture).ent
- rm -f $@
- ln -s $(notdir $<) $@
 
 clean distclean:
- rm -rf $(manual)*.$(currentlang).html
+ rm -rf $(manual)*.$(currentlang).*html
  for ext in txt ps dvi pdf out tex-in info\* aux log man tex toc sasp\* tpt; do rm -f $(manual)*.$$ext; done
  rm -f head.tmp body.tmp
  rm -f *~ .*~ core tsa* $(patsubst %.po,%.sgml,$(wildcard *.??*.po))
Index: Makefile
===================================================================
--- Makefile (révision 6929)
+++ Makefile (copie de travail)
@@ -41,13 +41,13 @@
   $(makedir) release-notes-$$arch; \
   for lang in $(LANGUAGES); do \
     $(makedir) release-notes-$$arch/$$lang; \
-            $(install_file) $$lang/release-notes.$$lang.html/* $(PUBLISHDIR)/$$arch/release-notes/; \
-            $(install_file) $$lang/release-notes.$$lang.txt $(PUBLISHDIR)/$$arch/; \
-            $(install_file) $$lang/release-notes.$$lang.pdf $(PUBLISHDIR)/$$arch/; \
-            $(install_file) $$lang/release-notes.$$lang.ps $(PUBLISHDIR)/$$arch/; \
-            $(install_file) $$lang/release-notes.$$lang.html/* release-notes-$$arch/$$lang; \
-            $(install_file) $$lang/release-notes.$$lang.txt release-notes-$$arch/$$lang; \
-            $(install_file) $$lang/release-notes.$$lang.pdf release-notes-$$arch/$$lang; \
+            $(install_file) $$lang/release-notes.$$lang.$$arch.html/* $(PUBLISHDIR)/$$arch/release-notes/; \
+            $(install_file) $$lang/release-notes.$$lang.$$arch.txt $(PUBLISHDIR)/$$arch/release-notes.$$lang.txt; \
+            $(install_file) $$lang/release-notes.$$lang.$$arch.pdf $(PUBLISHDIR)/$$arch/release-notes.$$lang.pdf; \
+            $(install_file) $$lang/release-notes.$$lang.$$arch.ps $(PUBLISHDIR)/$$arch/release-notes.$$lang.ps; \
+            $(install_file) $$lang/release-notes.$$lang.$$arch.html/* release-notes-$$arch/$$lang; \
+            $(install_file) $$lang/release-notes.$$lang.$$arch.txt release-notes-$$arch/$$lang/release-notes.$$lang.txt; \
+            $(install_file) $$lang/release-notes.$$lang.$$arch.pdf release-notes-$$arch/$$lang/release-notes.$$lang.txt; \
   done; \
           for i in $(PUBLISHDIR)/$$arch/release-notes/*.en.html; do \
             ln -sf `basename $$i` $${i%.en.html}.html; \
@@ -61,9 +61,9 @@
   $(MAKE) architecture=$$arch; \
   $(makedir) upgrade-$$arch; \
   for lang in $(LANGUAGES); do \
-    $(install_file) $$lang/release-notes.$$lang.html/* upgrade-$$arch; \
-    $(install_file) $$lang/release-notes.$$lang.txt upgrade-$$arch; \
-    $(install_file) $$lang/release-notes.$$lang.pdf upgrade-$$arch; \
+    $(install_file) $$lang/release-notes.$$lang.$$arch.html/* upgrade-$$arch; \
+    $(install_file) $$lang/release-notes.$$lang.$$arch.txt upgrade-$$arch/release-notes.$$lang.txt; \
+    $(install_file) $$lang/release-notes.$$lang.$$arch.pdf upgrade-$$arch/release-notes.$$lang.pdf; \
   done; \
   ln -sf index.en.html upgrade-$$arch/index.html; \
   ln -sf release-notes.en.txt upgrade-$$arch/Release-Notes; \


Bug#542129: marked as done (release-notes: etch Makefile builds regardless of the source status)

by Debian Bug Tracking System :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Your message dated Tue, 15 Sep 2009 19:32:59 +0200
with message-id <20090915173259.GB17947@...>
and subject line Re: Bug#542129: release-notes: etch Makefile builds regardless of the source status
has caused the Debian Bug report #542129,
regarding release-notes: etch Makefile builds regardless of the source status
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@...
immediately.)


--
542129: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542129
Debian Bug Tracking System
Contact owner@... with problems

Package: release-notes

As noticed on www-master.d.o and reproduced locally, the Etch
release-notes Makefile unconditionnaly rebuilds all the files everytime.

This takes a huge amount of time to build all languages then.

Same with PHONY targets commented.

--
Simon Paillard



On Thu, Sep 10, 2009 at 12:41:06AM +0200, Simon Paillard wrote:

> On Tue, Aug 18, 2009 at 02:20:38AM +0200, Simon Paillard wrote:
> > Package: release-notes
> >
> > As noticed on www-master.d.o and reproduced locally, the Etch
> > release-notes Makefile unconditionnaly rebuilds all the files everytime.
> [..]
> Makefile partially reworked to build only if necessary:
> * only a arch specific entity file triggers a new build
> * output files names are now tagged with the arch
>
> See patch attached, will be commited soon, if someone with more makefile
> skills can review it (though tested sucessfully, except pdf/ps build
> that I did not test).
Commited (r6941), together with removing clean from the publish target (r6942)
http://www-master.debian.org/build-logs/webwml/release-notes.log

Etch RN were not rebuild on last website build, as expected given the
source kept the same.

--
Simon Paillard