From patchwork Sun Nov 4 07:32:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Lee X-Patchwork-Id: 1693461 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 B60883FCDF for ; Sun, 4 Nov 2012 07:32:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150Ab2KDHcw (ORCPT ); Sun, 4 Nov 2012 02:32:52 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:58494 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752128Ab2KDHcv (ORCPT ); Sun, 4 Nov 2012 02:32:51 -0500 Received: by mail-da0-f46.google.com with SMTP id n41so2234815dak.19 for ; Sun, 04 Nov 2012 00:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=cOpbDSAveYP3JnvncJRd1sznxUnjnY4k3WL5bGhx+Yw=; b=zNlxQAadyCIge2DS7PrybHJw05YkCeMJDz7wrM0bkktrBJsaHLY7n2h2vxjLosZYXn 581Qyc1jSYDi6q3enVnxLzF2wFLaD/T65lInyoXkZFEI4uR+zWC4pY/UBuqFFEvlMZRP MDF33twGJ36W/OSQ1QM4IDVZVJf55hJHR2LqrGzL12PlZPPM7r7MszF5FO/rlKLHuBGi o/hecqckeh9a9vS30/ayNiPCseKdo+5Rqx3Q9u08RylAZ49oLk+hho5d/6HFrm+DFVS9 1zIEugG1pqzWndwfKh6pLzgbF8R1LjRXJq68+6G9VF2fL1pRPSDYUdfwSYXX/CGEYZJt vsZQ== Received: by 10.68.235.2 with SMTP id ui2mr20243582pbc.163.1352014370689; Sun, 04 Nov 2012 00:32:50 -0700 (PDT) Received: from localhost ([123.116.118.10]) by mx.google.com with ESMTPS id ok3sm8563757pbb.11.2012.11.04.00.32.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Nov 2012 00:32:49 -0700 (PDT) From: Adam Lee To: linux-kernel@vger.kernel.org Cc: Michal Marek (maintainer:KERNEL BUILD + fi...), linux-kbuild@vger.kernel.org (open list:KERNEL BUILD + fi...) Subject: [PATCH] kconfig: fix the failure of `make rpm-pkg` after localversion file changed Date: Sun, 4 Nov 2012 15:32:41 +0800 Message-Id: <1352014361-21159-1-git-send-email-adam8157@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org `make rpm-pkg` and `make binrpm-pkg` will write $KERNELRELEASE into rpm spec files which don't depend on localversion file now. So, the unchanged spec files will cause failure after localversion file changed. I added the localversion file into the dependencies of spec files. Because that file is not necessary, I made it a empty target, so its last-modification time will be checked by Make only when it exists. Signed-off-by: Adam Lee --- scripts/package/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 87bf080..a7c1f59 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -30,9 +30,12 @@ KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) MKSPEC := $(srctree)/scripts/package/mkspec PREV := set -e; cd -P ..; +# localversion, its last-modification time will be checked only when it exists +localversion: + # rpm-pkg # --------------------------------------------------------------------------- -$(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile +$(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile localversion $(CONFIG_SHELL) $(MKSPEC) > $@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE @@ -60,7 +63,7 @@ clean-files := $(objtree)/kernel.spec # binrpm-pkg # --------------------------------------------------------------------------- -$(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile +$(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile localversion $(CONFIG_SHELL) $(MKSPEC) prebuilt > $@ binrpm-pkg: $(objtree)/binkernel.spec FORCE