For the record: The problem was that the Makefiles not managed by
autotools were missing the "distclean" target.

Therefore, dh_auto_clean was falling back to `make clean` (when it
actually wanted to run `make distclean`), which skipped the removal of
a bunch of files generated by `configure`:

- Makefile
- config.log
- config.status
- libtool
- src/common/Makefile
- src/usr/Makefile
- src/usr/argp/Makefile
- src/usr/joold/Makefile
- src/usr/nat64/Makefile
- src/usr/nl/Makefile
- src/usr/siit/Makefile
- src/usr/util/Makefile

And this made dpkg-source think the workspace was damaged.

I'm explaining this because Kbuild Makefile samples aren't terribly
keen on referencing GNU targets [1] they don't immediately need, so I
suspect lots of novice kernel module coders will run into this problem
eventually.

[1] 
https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets

Reply via email to