build: generic top-level rule to build individual files
authorJan Beulich <jbeulich@suse.com>
Tue, 29 Mar 2022 13:48:15 +0000 (15:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Mar 2022 13:48:15 +0000 (15:48 +0200)
commit8eec96b7b8d937d40e2e7988edb8bbd08598c715
treef579ba876ec3db884b16a117bfa0db14e000561d
parent8ebee382b99e451ba1aad025f77a82bd5427efdf
build: generic top-level rule to build individual files

In particular when cross-compiling or having in place other tool chain
overrides, invoking make to build individual files (e.g. object,
preprocessed, or assembly ones) so far involves putting the various
overrides on the command line instead of simply getting them from
./.config.

Furthermore this helps working around a yet unaddressed make quirk [1]:
Variables put on the command line are invisible to $(shell ...), unless
invoked from a recursive make: During the recursive invocation such
variables are put in the recursive make's environment and hence become
"visible".

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
[1] https://savannah.gnu.org/bugs/?10593
Makefile