From patchwork Tue Sep 17 23:08:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Santos X-Patchwork-Id: 2904261 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5DB809F1E1 for ; Tue, 17 Sep 2013 23:15:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7812A202EB for ; Tue, 17 Sep 2013 23:15:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D2B220256 for ; Tue, 17 Sep 2013 23:15:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753921Ab3IQXPA (ORCPT ); Tue, 17 Sep 2013 19:15:00 -0400 Received: from nm6-vm6.access.bullet.mail.gq1.yahoo.com ([216.39.63.154]:38027 "EHLO nm6-vm6.access.bullet.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753490Ab3IQXPA (ORCPT ); Tue, 17 Sep 2013 19:15:00 -0400 Received: from [216.39.60.173] by nm6.access.bullet.mail.gq1.yahoo.com with NNFMP; 17 Sep 2013 23:08:28 -0000 Received: from [67.195.23.145] by tm9.access.bullet.mail.gq1.yahoo.com with NNFMP; 17 Sep 2013 23:08:28 -0000 Received: from [127.0.0.1] by smtp117.sbc.mail.gq1.yahoo.com with NNFMP; 17 Sep 2013 23:08:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1379459308; bh=iVryVc09NthXyollMeTvEoR61dX14eEo/Mfn5Zee+hA=; h=X-Yahoo-Newman-Id:X-Rocket-Received:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References:Reply-To; b=suaXnI6h/4S51mIcptZWY3vZyjSpZhJk4TLc5DUbKUtYtGjVlp+C42tFEV0s6Pb+vEUH7TC94mi+uWwl9SPGYLj5Jp0g1sYbkXJbzpgt5A9cRUrQS6BMwZIuiG7UqPCaYlDGvfLIBey06nxQVLeFTRGTK8d8yh9WyQfCDIgbkJI= X-Yahoo-Newman-Id: 697273.3357.bm@smtp117.sbc.mail.gq1.yahoo.com X-Rocket-Received: from localhost.localdomain (danielfsantos@99.70.244.137 with ) by smtp117.sbc.mail.gq1.yahoo.com with SMTP; 17 Sep 2013 23:08:28 +0000 UTC X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: sOTvZyEVM1mwWjCWgYzqeyf6.DBxU9mHDwSapnCkvpvMq68 t60QXGcCIwRX.l5oFuLlQ06oP4Ld65dV8fu5xHJ7gU5cZN_wsx3P58B0mTH6 .R7xD0t6tQp_lh.feEv1mMprn_zZ7a8HQPoNY6Dq_0KVLRJeLgn3Bdm3ZGOJ RBI.Ur6sk6iK4UOUGvrsPihQa1Ce0_KZAkJ184ipOWcAwXHh96ITEfMmtuF1 kUd_w31VJRk_q8fN2QXGatWSWM3RYyjWad.aJJsq_2tO08Yau1cmZ23Dwn0l bHYvao6pEH2i7Ekb.YtCexjgqD0KtH1MrUmNBi5F1yyuagnaBy027EvaTGNH g92i.Oto69rRo8iGaCxYbXjfkrKOliu6PfjaEFad7BoDhPRYGu9StqXp5J7z nln5rbG8nMtvxZh4P72Y6FgmT_HP5K58ebluZ8iqlUw6lX81hzAJ0iiQUo1e lD4o5eNgpeJTNNgPzQ7Fuz1bRcrU2.voonX3Y.6FsuQoi2kYH5SsqGjvDIt. 1mg4nMWsV2rHi8hGbUvWe84qGchNgUVx4lXu3qqxw7yJj.Ch4p5PxbB4lxWv OQo5bZu9S5weKmb94dukMqTUlPWMny4E900RhTao- X-Yahoo-SMTP: xXkkXk6swBBAi.5wfkIWFW3ugxbrqyhyk_b4Z25Sfu.XGQ-- From: danielfsantos@att.net To: linux-kbuild , LKML , Michal Marek , Andrew Morton , "Paul E. McKenney" , David Howells , Thomas Gleixner , Michael Kerrisk , Dave Hansen , George Spelvin Cc: Daniel Santos Subject: [PATCH 3/5] Makefile: Generate error_strings.h Date: Tue, 17 Sep 2013 18:08:35 -0500 Message-Id: <1379459317-13046-4-git-send-email-daniel.santos@pobox.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1379459317-13046-1-git-send-email-daniel.santos@pobox.com> References: <1379459317-13046-1-git-send-email-daniel.santos@pobox.com> Reply-To: Daniel Santos Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is an initial attempt and needs improvement. Ideally, error_strings.h should only be generated when STRERROR or STRERROR_NAME are enabled. This implementation also fails to remake error_strings.h when arch-specific dependencies change. Also, I've noticed that this implementation fails to output a message when it's running, so help with this would be appreciated. Signed-off-by: Daniel Santos --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8243a23..38049ca 100644 --- a/Makefile +++ b/Makefile @@ -835,7 +835,7 @@ endif prepare2: prepare3 outputmakefile asm-generic prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ - include/config/auto.conf + include/config/auto.conf include/generated/error_strings.h $(cmd_crmodverdir) archprepare: archheaders archscripts prepare1 scripts_basic @@ -873,6 +873,13 @@ $(version_h): $(srctree)/Makefile FORCE include/generated/utsrelease.h: include/config/kernel.release FORCE $(call filechk,utsrelease.h) +include/generated/error_strings.h: include/uapi/asm-generic/errno-base.h \ + include/uapi/asm-generic/errno.h \ + include/uapi/linux/errno.h \ + include/linux/errno.h + $(shell ARCH=$(ARCH) $(srctree)/scripts/mkstrerror.sh \ + > $(srctree)/include/generated/error_strings.h) + PHONY += headerdep headerdep: $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \