From patchwork Tue Apr 26 17:06:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rabin Vincent X-Patchwork-Id: 733342 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3QH5m4A021461 for ; Tue, 26 Apr 2011 17:05:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754356Ab1DZRFr (ORCPT ); Tue, 26 Apr 2011 13:05:47 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:35420 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754205Ab1DZRFr (ORCPT ); Tue, 26 Apr 2011 13:05:47 -0400 Received: by pvg12 with SMTP id 12so561959pvg.19 for ; Tue, 26 Apr 2011 10:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer; bh=LGVFiOKc5qyRWKFzaOanQRaDa1RtxYe68Rj5kQP7AEE=; b=BVuTmmmcPRzdQ1XkCzqCjXsr24Wfj3TDsK0YqaAxF8ZtZPQbPWHUX1409FgJRj9CU0 JezPkeJOJXSC0PAISH84tIGz5F26CiTf0cCC8CRTGZhWL2AZw9UWf7yWpXdQBnadabxi phMkN0XG46U1J2DqSvBkqRuGOD0p80sFrwoxk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=WQ2fsbtzCCi+hvXCtbj5YU2erFmw7SkCxOVNRw9YHMOvEpKYWJly21069Sh9fL33FT HXZjpXGPqVuICzmiwpRAxierAtLSESWQrD/X5Hc1x0szEpcy5gXUIs48qbipnkSrH1S7 PxhN3XUiUlcw5a5yL/lB2yeQEfxeM+aS7iWEQ= Received: by 10.68.48.229 with SMTP id p5mr1140303pbn.259.1303837546394; Tue, 26 Apr 2011 10:05:46 -0700 (PDT) Received: from localhost.localdomain ([59.164.103.253]) by mx.google.com with ESMTPS id k1sm1004434pbd.94.2011.04.26.10.05.39 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Apr 2011 10:05:42 -0700 (PDT) From: Rabin Vincent To: mmarek@suse.cz Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Rabin Vincent Subject: [PATCH] kbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o Date: Tue, 26 Apr 2011 22:36:04 +0530 Message-Id: <1303837564-18062-1-git-send-email-rabin@rab.in> X-Mailer: git-send-email 1.7.4.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 26 Apr 2011 17:05:48 +0000 (UTC) Fix building with KBUILD_NOCMDDEP=1, which currently does not work because it does not build built-in.o with no dependencies: LD fs/notify/built-in.o ld: cannot find fs/notify/dnotify/built-in.o: No such file or directory ld: cannot find fs/notify/inotify/built-in.o: No such file or directory ld: cannot find fs/notify/fanotify/built-in.o: No such file or directory Signed-off-by: Rabin Vincent --- scripts/Kbuild.include | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ed2773e..fd31781 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -187,6 +187,10 @@ ifneq ($(KBUILD_NOCMDDEP),1) # User may override this check using make KBUILD_NOCMDDEP=1 arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ $(filter-out $(cmd_$@), $(cmd_$(1))) ) +else +# Ensure that files with no dependencies are built. +built-check = $(filter $(origin cmd_$@), undefined) +arg-check = $(if $(strip $(obj-y)),,$(built-check)) endif # >'< substitution is for echo to work,