Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

improve modalias building

For one, there's no point in the respective pieces to be rebuilt
unconditionally on each and every rebuild.

Second there's no need to invent a custom rule for generating the .s
file from the .c source - we can simply use the generic rule here.

And finally, $(obj) should be used to refer to files in the build tree
(rather than spelling out the subdirectory).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

authored by

Jan Beulich and committed by
Michal Marek
bd701343 f82935eb

+3 -8
+3 -8
scripts/mod/Makefile
··· 29 29 echo "#endif" ) > $@ 30 30 endef 31 31 32 - # We use internal kbuild rules to avoid the "is up to date" message from make 33 - scripts/mod/devicetable-offsets.s: scripts/mod/devicetable-offsets.c FORCE 34 - $(Q)mkdir -p $(dir $@) 35 - $(call if_changed_dep,cc_s_c) 32 + $(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s 33 + $(call if_changed,offsets) 36 34 37 - $(obj)/$(devicetable-offsets-file): scripts/mod/devicetable-offsets.s 38 - $(call cmd,offsets) 39 - 40 - targets += $(devicetable-offsets-file) 35 + targets += $(devicetable-offsets-file) devicetable-offsets.s 41 36 42 37 # dependencies on generated files need to be listed explicitly 43 38