From patchwork Fri Jul 1 23:31:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 939562 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p61NWRS9008108 for ; Fri, 1 Jul 2011 23:32:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757689Ab1GAXcR (ORCPT ); Fri, 1 Jul 2011 19:32:17 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:50397 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758117Ab1GAXbg (ORCPT ); Fri, 1 Jul 2011 19:31:36 -0400 Received: by mail-iw0-f174.google.com with SMTP id 6so3171521iwn.19 for ; Fri, 01 Jul 2011 16:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=VUTOwM7Hs/DN7mkN0yQHmEwDPQKE/P73ngDonQzFbhQ=; b=LxpXQ2OwtofjdZljyDZSG3lh+m3xoarpcfmjSS8TW2SOxPcbnKpUwzc+9V83EwsIij ZiwwwhzYJ6+gxEA87+3DStsgt9wDDZjBlNAQvAEWsaZ6r2GuzsV1VweByyMEv+d1cfMb jUP7i5mGVuW2/iWoZUrcvkFP3Gibwp03dPOSo= Received: by 10.42.164.129 with SMTP id g1mr4087005icy.175.1309563095924; Fri, 01 Jul 2011 16:31:35 -0700 (PDT) Received: from localhost.localdomain (69-165-144-226.dsl.teksavvy.com [69.165.144.226]) by mx.google.com with ESMTPS id hp8sm3820881icc.11.2011.07.01.16.31.34 (version=SSLv3 cipher=OTHER); Fri, 01 Jul 2011 16:31:35 -0700 (PDT) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michal Marek , Arnaud Lacombe , Steven Rostedt Subject: [RFC 4/4] kconfig/streamline_config.pl: move config generation to script Date: Fri, 1 Jul 2011 19:31:16 -0400 Message-Id: <1309563076-5050-5-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.3.4.574.g608b.dirty In-Reply-To: <1309563076-5050-1-git-send-email-lacombar@gmail.com> References: <1309563076-5050-1-git-send-email-lacombar@gmail.com> 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]); Fri, 01 Jul 2011 23:32:53 +0000 (UTC) This avoid having to deals with multiline shell command in the Makefile and increase readability. Cc: Steven Rostedt --- scripts/kconfig/Makefile | 14 +------------- scripts/kconfig/localconfig.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 13 deletions(-) create mode 100755 scripts/kconfig/localconfig.sh diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 8a59adf..d48ddc9 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -34,19 +34,7 @@ silentoldconfig: $(obj)/conf $< --$@ $(Kconfig) localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf - $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config - $(Q)if [ -f .config ]; then \ - cmp -s .tmp.config .config || \ - (mv -f .config .config.old.1; \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - mv -f .config.old.1 .config.old) \ - else \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - fi - $(Q)rm -f .tmp.config + $(Q)$(src)/localconfig.sh # Create new linux.pot file # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files diff --git a/scripts/kconfig/localconfig.sh b/scripts/kconfig/localconfig.sh new file mode 100755 index 0000000..64dd295 --- /dev/null +++ b/scripts/kconfig/localconfig.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# + +mkdir -p include/generated + +perl "${srctree}/scripts/kconfig/streamline_config.pl" ${srctree}/ ${Kconfig} $1 > .tmp.config + +if [ -f .config ]; then + if ! cmp -s .tmp.config .config; then + mv -f .config .config.old.1 + mv -f .tmp.config .config + ${obj}/conf --silentoldconfig ${Kconfig} + mv -f .config.old.1 .config.old + fi +else + mv -f .tmp.config .config + ${obj}/conf --silentoldconfig ${Kconfig} +fi + +rm -f .tmp.config