Package: automake
Version: 1:1.14.1-4
Severity: important
Tags: upstream patch
By default Debian dh passes --disable-dependacy-tracking when building.
If the package rules also adds --builddirectory to use out of source builds
(eg. "dh $@ --builddirectory=build --parallel --with autoreconf"), and the
package happens to be using subdir-objects automake option and generated source
files from lex/yacc then the build will fail.
Eg.
mkdir build
../configure --disable-dependency-tracking --disable-silent-rules
make
/bin/bash ../ylwrap ../src/scanner.ll lex.yy.c src/scanner.cc -- flex
../ylwrap: line 206: ../src/scanner.cc: No such file or directory
Makefile:422: recipe for target 'src/scanner.cc' failed
make: *** [src/scanner.cc] Error 1
A simple patch to lex.am and yacc.am fixes this.
This broken in both Jessie and Stretch/Sid. It would be good to see it fixed in
all.
-- System Information:
Debian Release: 8.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable'), (1, 'experimental'),
(1, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.1.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages automake depends on:
ii autoconf 2.69-8
ii autotools-dev 20140911.1
automake recommends no packages.
automake suggests no packages.
-- no debconf information
>From bd6971224f304c8f5951afca620f33c25248b446 Mon Sep 17 00:00:00 2001
From: Nicholas Brown
Date: Fri, 4 Dec 2015 10:49:18 +
Subject: [PATCH] yacc and lex built objects without dependancy tracking
---
lib/am/lex.am | 1 +
lib/am/yacc.am | 1 +
2 files changed, 2 insertions(+)
diff --git a/lib/am/lex.am b/lib/am/lex.am
index d7ddc77..6357507 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -23,6 +23,7 @@ endif %?MAINTAINER-MODE%
?GENERIC?%EXT%%DERIVED-EXT%:
?!GENERIC?%OBJ%: %SOURCE%
+?SUBDIROBJ? %SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@)
?GENERIC? %VERBOSE%$(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
?!GENERIC? %VERBOSE% \
?!GENERIC??DIST_SOURCE? $(am__skiplex) \
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index 2b3f92a..2c33023 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -43,6 +43,7 @@ endif %?FIRST%
?GENERIC?%EXT%%DERIVED-EXT%:
?!GENERIC?%OBJ%: %SOURCE%
+?SUBDIROBJ? %SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@)
?GENERIC? %VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
?!GENERIC? %VERBOSE% \
?!GENERIC??DIST_SOURCE? $(am__skipyacc) \
--
2.1.4