kbuild: fix header installation under fakechroot environment
authorRichard Genoud <richard.genoud@gmail.com>
Thu, 15 Jun 2017 08:36:22 +0000 (10:36 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 21 Jun 2017 23:34:34 +0000 (08:34 +0900)
commit2f263d145140ea4b9f5762b15886ae26195a764a
treefbb4a327a457a37dbedb5e0632f022b81408194d
parentff85a1a80e00349dc7783c8dc4d6233d9a709283
kbuild: fix header installation under fakechroot environment

Since commit fcc8487d477a ("uapi: export all headers under uapi
directories") fakechroot make bindeb-pkg fails, mismatching files for
directories:
touch: cannot touch 'usr/include/video/uvesafb.h/.install': Not a
directory

This due to a bug in fakechroot:
when using the function $(wildcard $(srcdir)/*/.) in a makefile, under a
fakechroot environment, not only directories but also files are
returned.

To circumvent that, we are using the functions:
$(sort $(dir $(wildcard $(srcdir)/*/))))

Fixes: fcc8487d477a ("uapi: export all headers under uapi directories")
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/Makefile.headersinst