Package: debhelper
Version: 9.20131104
Severity: normal
Tags: patch

Dear Maintainer,

I tried to quickly package make 4.0 with dh_make, to test it, and found that the
packaging worked with GNU Make 3.81, but was broken when using the new 4.0 
version.

Here is the end of the  output of `LANG=C debuild -b' :

make[1]: Leaving directory '/home/user/src/make-4.0'
   dh_auto_test
        make -j1 test
make[1]: Entering directory '/home/user/src/make-4.0'
make[1]: *** No rule to make target 'test'.  Stop.
make[1]: Leaving directory '/home/user/src/make-4.0'
dh_auto_test: make -j1 test returned exit code 2
debian/rules:8: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1361:
dpkg-buildpackage -rfakeroot -D -us -uc -b failed


dh_auto_test parses the output of make  to check if a Makefile provides the test
target.

In version 4.0 of make, the output changed from 

  make: *** No rule to make target `test'.  Stop.

to

  make: *** No rule to make target 'test'.  Stop.


Even if make 4.0 is not part of debian yet, I hope it will be soon.

The simple patch attached (hopefully) resolves the bug for me.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages debhelper depends on:
ii  binutils    2.23.90.20131017-1
ii  dpkg        1.17.1
ii  dpkg-dev    1.17.1
ii  file        1:5.14-2
ii  man-db      2.6.5-2
ii  perl        5.18.1-4
ii  po-debconf  1.0.16+nmu2

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make  0.63

-- no debconf information
diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm
index dcc5da8..2c68a83 100644
--- a/Debian/Debhelper/Buildsystem/makefile.pm
+++ b/Debian/Debhelper/Buildsystem/makefile.pm
@@ -61,7 +61,7 @@ sub exists_make_target {
 
 	return defined $output
 		&& length $output
-		&& $output !~ /\*\*\* No rule to make target `\Q$target\E'/;
+		&& $output !~ /\*\*\* No rule to make target (`|')\Q$target\E'/;
 }
 
 sub do_make {

Reply via email to