[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh: Unknown sequence /usr/share/dpkg/buildflags.mk (was : pre-build target skipped)



Mathieu Malaterre <mathieu.malaterre@gmail.com> writes:

> dpkg-source: info: applying fix_alphacomp.patch
>  fakeroot debian/rules clean
> dh /usr/share/dpkg/buildflags.mk --buildsystem=cmake --parallel
> dh: Unknown sequence /usr/share/dpkg/buildflags.mk (choose from:
> binary binary-arch binary-indep build build-arch build-indep clean
> install install-arch install-indep)
> dh clean --buildsystem=cmake --parallel
> ...
>
>
> Does anyone spot the typo in my rules file ?

The problem is that if /usr/share/dpkg/buildflags.mk does not exist,
make will try to remake it (if you're curious why, and if you want to
verify my assumption), and when it tries to remake it, it will trigger
the catch-all target (%) in debian/rules, and things break horribly.

Simple example to trigger the same issue:

-include /this/file/does/not/exist.mk
%:
	echo $@

Place this into a makefile, and do a make all: it will echo the missing
filename, and will echo make all aswell.

The solution is to build-depend on an appropriately versioned dpkg and
include the file unconditionally. Or, if you want to support building
with older dpkgs aswell, add an /usr/share/dpkg/buildflags.mk target
that does nothing.

But this latter is horrible and you really do not want to do that.

Ain't make fun?

-- 
|8]


Reply to: