From patchwork Wed May 29 12:18:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 2629561 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 5FB4540077 for ; Wed, 29 May 2013 12:19:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965745Ab3E2MTB (ORCPT ); Wed, 29 May 2013 08:19:01 -0400 Received: from nat28.tlf.novell.com ([130.57.49.28]:47922 "EHLO nat28.tlf.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965495Ab3E2MTA convert rfc822-to-8bit (ORCPT ); Wed, 29 May 2013 08:19:00 -0400 Received: from EMEA1-MTA by nat28.tlf.novell.com with Novell_GroupWise; Wed, 29 May 2013 13:19:20 +0100 Message-Id: <51A60E5002000078000D9978@nat28.tlf.novell.com> X-Mailer: Novell GroupWise Internet Agent 12.0.2 Date: Wed, 29 May 2013 13:18:56 +0100 From: "Jan Beulich" To: "Michal Marek" Cc: , Subject: [PATCH] improve modalias building Mime-Version: 1.0 Content-Disposition: inline Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 --- 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 --- 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