diff mbox

improve modalias building

Message ID 51A60E5002000078000D9978@nat28.tlf.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich May 29, 2013, 12:18 p.m. UTC
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>

---
 scripts/mod/Makefile |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)




--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Michal Marek June 27, 2013, 11:05 p.m. UTC | #1
Dne 29.5.2013 14:18, Jan Beulich napsal(a):
> 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>

Applied to kbuild.git#kbuild.

Thanks,
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 3.10-rc3/scripts/mod/Makefile
+++ 3.10-rc3-file2alias-rebuild/scripts/mod/Makefile
@@ -29,15 +29,10 @@  define cmd_offsets
 	 echo "#endif" ) > $@
 endef
 
-# We use internal kbuild rules to avoid the "is up to date" message from make
-scripts/mod/devicetable-offsets.s: scripts/mod/devicetable-offsets.c FORCE
-	$(Q)mkdir -p $(dir $@)
-	$(call if_changed_dep,cc_s_c)
+$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s
+	$(call if_changed,offsets)
 
-$(obj)/$(devicetable-offsets-file): scripts/mod/devicetable-offsets.s
-	$(call cmd,offsets)
-
-targets += $(devicetable-offsets-file)
+targets += $(devicetable-offsets-file) devicetable-offsets.s
 
 # dependencies on generated files need to be listed explicitly