From patchwork Fri Mar 23 13:04:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10304669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7A42160385 for ; Fri, 23 Mar 2018 13:08:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 698EF2873E for ; Fri, 23 Mar 2018 13:08:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E52228E63; Fri, 23 Mar 2018 13:08:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED5752873E for ; Fri, 23 Mar 2018 13:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753182AbeCWNGJ (ORCPT ); Fri, 23 Mar 2018 09:06:09 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:52680 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753147AbeCWNGA (ORCPT ); Fri, 23 Mar 2018 09:06:00 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w2ND4mgY011418; Fri, 23 Mar 2018 22:04:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w2ND4mgY011418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1521810298; bh=Hp1i9iAGEMGOo4yWhdbFlj9tPSN5pQ5G9trHOeMOb1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ybyBlK6HZxOUIxrMY1cNeyRmA2QaReht5w9REDL3G15ljjSH61ICx9klZf3swmeIf 69LMBoUGEr0inEvUS0FHij+OLoGxPyZjLUKlTW6W9gVbHuStwppSDuu6M24HX3FVpr RDRHUiUC8aoCFoDn8L0WEtYUhNsAfvDxi3i7kR5dN35xiWDgrcc7nHjsFMK08lj1SM fc84wpYQAx9EOS54rdCeN9SGekmgfkTe+/dsFFop1r3eRrw/pjEJPG3npI3kksRipK qY6vYcfcDpM1wNPO7r4y5PhYDahfBsRkkdOdYB8gaKAdO87E207y9MdNs2lMV5u7wM cKTkr9pUXo6Yg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Michal Marek , linux-kernel@vger.kernel.org, Arnd Bergmann , Laurent Pinchart , Frank Rowand , Geert Uytterhoeven , Masahiro Yamada Subject: [PATCH 02/10] kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile Date: Fri, 23 Mar 2018 22:04:31 +0900 Message-Id: <1521810279-6282-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521810279-6282-1-git-send-email-yamada.masahiro@socionext.com> References: <1521810279-6282-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Files suffixed by .lex.c, .tab.[ch] are generated lexers, parsers, respectively. Clean them up globally from the top Makefile. Some of the final host programs they are linked into are needed for building external modules, but those intermediates are unneeded. They can be cleaned away by 'make clean' instead of 'make mrproper'. Signed-off-by: Masahiro Yamada Acked-by: Frank Rowand --- Makefile | 1 + scripts/dtc/Makefile | 6 ++---- scripts/genksyms/Makefile | 2 -- scripts/kconfig/Makefile | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 493e267..168432e 100644 --- a/Makefile +++ b/Makefile @@ -1613,6 +1613,7 @@ clean: $(clean-dirs) -o -name '*.dwo' -o -name '*.lst' \ -o -name '*.su' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ + -o -name '*.lex.c' -o -name '*.tab.[ch]' \ -o -name '*.symtypes' -o -name 'modules.order' \ -o -name modules.builtin -o -name '.tmp_*.o.*' \ -o -name .cache.mk \ diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index a88b8c9..d17ba64 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc/Makefile @@ -28,7 +28,5 @@ HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC) # dependencies on generated files need to be listed explicitly $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h -# generated files need to include *.cmd and be cleaned explicitly -generated-files := dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h -targets := $(generated-files) -clean-files := $(generated-files) +# generated files need to include *.cmd +targets := dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile index 34d6ab1..0ccac51 100644 --- a/scripts/genksyms/Makefile +++ b/scripts/genksyms/Makefile @@ -11,5 +11,3 @@ HOSTCFLAGS_lex.lex.o := -I$(src) # dependencies on generated files need to be listed explicitly $(obj)/lex.lex.o: $(obj)/parse.tab.h - -clean-files := lex.lex.c parse.tab.c parse.tab.h diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index f9bdd02..1dcd797 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -209,7 +209,7 @@ hostprogs-y := conf nconf mconf kxgettext qconf gconf targets += zconf.tab.c zconf.lex.c clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck -clean-files += zconf.tab.c zconf.lex.c gconf.glade.h +clean-files += gconf.glade.h clean-files += config.pot linux.pot # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)