Bug#775501: noweb: does not fail to build when it should

2015-04-01 Thread James Cowgill
On Tue, 2015-03-31 at 16:13 -0400, Hubert Chathi wrote:
 On Fri, 16 Jan 2015 13:14:53 +, James Cowgill james...@cowgill.org.uk 
 said:
 
  When building noweb on mips64el, I encountered an error when compiling
  the noweave (the error itself turned out to be a bug on my end).
  for i in shell lib xdoc tex; do (cd $i; make all); done make[2]:
  Entering directory '/«PKGBUILDDIR»/src/shell' notangle -Rnoweave
  noweave.nw  noweave /bin/sh: 1: notangle: not found make[2]: ***
  [noweave] Error 127 Makefile:21: recipe for target 'noweave' failed
  make[2]: Leaving directory '/«PKGBUILDDIR»/src/shell' make[2]:
  Entering directory '/«PKGBUILDDIR»/src/lib'
 
  However after that happened, the build continued on successfully and I
  got an empty noweave executable. The only reason I realised was that
  nbibtex then failed to build because of it.
 
 [...]
 
 FYI, I've created a new package to fix your other bug, but I will leave
 this bug unfixed for now, since it would involve bigger changes to the
 package and more investigation.  I'll get it fixed before jessie+1,
 though.

Thanks

  Or even better, rewrite the code to use make implicit make rules so
  that parallel compilation works on it. The same suggestions also apply
  to the other for loops in that makefile.
 
 My make-fu is weak right now.  Can you explain more, or point me in the
 right direction?

I think this is just an opinion of mine - I don't really like recursive
makefiles since they're hard to make parallelable. Also it isn't
implicit rules that you want (I should have looked up some stuff before
writing that).

So for instance, instead of writing this which can't be parallelized and
is broken on failures:
 clean:
   for i in c shell lib xdoc icon awk tex; do (cd $$i; make clean); done

You could do this which fixes those problems (although is more verbose):
 SUBDIRS = shell lib xdoc icon awk tex
 SUBDIRS-CLEAN = $(SUBDIRS:%=clean-%)

 clean: $(SUBDIRS-CLEAN)
 $(SUBDIRS-CLEAN):
   $(MAKE) -C $(@:clean-%=%) clean

But anyway, I don't know how active upstream is to make this worth it (I
wouldn't consider doing this just for the Debian package).

Thanks,
James


signature.asc
Description: This is a digitally signed message part


Bug#775501: noweb: does not fail to build when it should

2015-04-01 Thread Hubert Chathi
On Wed, 01 Apr 2015 10:14:54 +0100, James Cowgill james...@cowgill.org.uk 
said:

[...]
 You could do this which fixes those problems (although is more
 verbose):
 SUBDIRS = shell lib xdoc icon awk tex
 SUBDIRS-CLEAN = $(SUBDIRS:%=clean-%)
 
 clean: $(SUBDIRS-CLEAN)
 $(SUBDIRS-CLEAN):
  $(MAKE) -C $(@:clean-%=%) clean

 But anyway, I don't know how active upstream is to make this worth it
 (I wouldn't consider doing this just for the Debian package).

Thanks.  That makes sense.  I'm not sure how much of a big change is
worthwhile, but I'll look into it.

-- 
Hubert Chathi uho...@debian.org -- Jabber: hub...@uhoreg.ca
PGP/GnuPG key: 1024D/124B61FA http://www.uhoreg.ca/
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#775501: noweb: does not fail to build when it should

2015-03-31 Thread Hubert Chathi
On Fri, 16 Jan 2015 13:14:53 +, James Cowgill james...@cowgill.org.uk 
said:

 When building noweb on mips64el, I encountered an error when compiling
 the noweave (the error itself turned out to be a bug on my end).
 for i in shell lib xdoc tex; do (cd $i; make all); done make[2]:
 Entering directory '/«PKGBUILDDIR»/src/shell' notangle -Rnoweave
 noweave.nw  noweave /bin/sh: 1: notangle: not found make[2]: ***
 [noweave] Error 127 Makefile:21: recipe for target 'noweave' failed
 make[2]: Leaving directory '/«PKGBUILDDIR»/src/shell' make[2]:
 Entering directory '/«PKGBUILDDIR»/src/lib'

 However after that happened, the build continued on successfully and I
 got an empty noweave executable. The only reason I realised was that
 nbibtex then failed to build because of it.

[...]

FYI, I've created a new package to fix your other bug, but I will leave
this bug unfixed for now, since it would involve bigger changes to the
package and more investigation.  I'll get it fixed before jessie+1,
though.

 Or even better, rewrite the code to use make implicit make rules so
 that parallel compilation works on it. The same suggestions also apply
 to the other for loops in that makefile.

My make-fu is weak right now.  Can you explain more, or point me in the
right direction?

-- 
Hubert Chathi uho...@debian.org -- Jabber: hub...@uhoreg.ca
PGP/GnuPG key: 1024D/124B61FA http://www.uhoreg.ca/
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#775501: noweb: does not fail to build when it should

2015-01-16 Thread James Cowgill
Source: noweb
Version: 2.11b-8
Severity: normal

Hi,

When building noweb on mips64el, I encountered an error when compiling
the noweave (the error itself turned out to be a bug on my end).
 for i in shell lib xdoc tex; do (cd $i; make all); done
 make[2]: Entering directory '/«PKGBUILDDIR»/src/shell'
 notangle -Rnoweave noweave.nw  noweave
 /bin/sh: 1: notangle: not found
 make[2]: *** [noweave] Error 127
 Makefile:21: recipe for target 'noweave' failed
 make[2]: Leaving directory '/«PKGBUILDDIR»/src/shell'
 make[2]: Entering directory '/«PKGBUILDDIR»/src/lib'

However after that happened, the build continued on successfully and I
got an empty noweave executable. The only reason I realised was that
nbibtex then failed to build because of it.

This seems to be caused by the for loop the in the Makefile in src/
which doesn't handle any errors returned from make.

Instead of:
 for i in shell lib xdoc tex; do (cd $$i; make all); done

It should read something like:
 for i in shell lib xdoc tex; do (cd $$i; make all || exit 1); done

Or even better, rewrite the code to use make implicit make rules so that
parallel compilation works on it. The same suggestions also apply to the
other for loops in that makefile.

Thanks,
James


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org