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.