build system: fix generated files' perms

It is more convenient for developers if all the generated files
have the same permissions as their .in ancestors. It's a not a big
deal per se because 'make install' takes care about proper permissions.

Use chmod --reference to do that, and ignore the error if it doesn't work
(for example when 'chmod' don't understand '--reference' option).

Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed