From patchwork Sat Dec 9 16:02:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10103735 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 27A2C60325 for ; Sat, 9 Dec 2017 16:03:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 186F429113 for ; Sat, 9 Dec 2017 16:03:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D07629155; Sat, 9 Dec 2017 16:03:52 +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=ham 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 EBCFC29113 for ; Sat, 9 Dec 2017 16:03:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751115AbdLIQDu (ORCPT ); Sat, 9 Dec 2017 11:03:50 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:35549 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073AbdLIQDt (ORCPT ); Sat, 9 Dec 2017 11:03:49 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-11.nifty.com with ESMTP id vB9G2gjZ027275; Sun, 10 Dec 2017 01:02:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com vB9G2gjZ027275 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1512835365; bh=Hbrd5Too+QSsr2Z16+35vt3zAezEeifFnIWfkn8jtKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xcWXFN3nmBT9I1eCEdI+YBbIqmSBhULj/bey64i4eVlSey6/in0vy0zanRguQDpGN S4YcSj6/VpmtnQCUoIQVQPbGfWIOTjv4k0nDvexW+USeEWxgTWvErxvs92v7QrZxQN sDEU6P8aJ1KngL7Ick0YJplIYs07KJ7t8mjM3xGLI5jqXv8lKYkKuyhRkmIs1POM9g DWxNMGUm4a/5W4mUH546vQaf9VZ4zRKt4Fx7tbDESZemJqjVzpROQMm4nnRkh9xHKz ugTbqSszVCZzaNNdXbllOxSqrVAlBvEMxAZpM37wraWEgMKH6AYifPkKLdWVl31DtM MxJZ+ty1qrajw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ulf Magnusson , Sam Ravnborg , Linus Torvalds , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] kbuild: add LEX and YACC variables Date: Sun, 10 Dec 2017 01:02:28 +0900 Message-Id: <1512835350-8646-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512835350-8646-1-git-send-email-yamada.masahiro@socionext.com> References: <1512835350-8646-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 Allow users to use their favorite lexer / parser generators. This is useful for me to test various flex and bison versions. Signed-off-by: Masahiro Yamada --- Makefile | 4 +++- scripts/Makefile.lib | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c988e46..83209d6 100644 --- a/Makefile +++ b/Makefile @@ -377,6 +377,8 @@ NM = $(CROSS_COMPILE)nm STRIP = $(CROSS_COMPILE)strip OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump +LEX = flex +YACC = bison AWK = awk GENKSYMS = scripts/genksyms/genksyms INSTALLKERNEL := installkernel @@ -428,7 +430,7 @@ GCC_PLUGINS_CFLAGS := export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES -export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE +export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1ca4dcd..ee528e3 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -193,7 +193,7 @@ ifdef REGENERATE_PARSERS LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy) quiet_cmd_flex = LEX $@ - cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $< + cmd_flex = $(LEX) -o$@ -L -P $(LEX_PREFIX) $< .PRECIOUS: $(src)/%.lex.c_shipped $(src)/%.lex.c_shipped: $(src)/%.l @@ -204,7 +204,7 @@ $(src)/%.lex.c_shipped: $(src)/%.l YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy) quiet_cmd_bison = YACC $@ - cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $< + cmd_bison = $(YACC) -o$@ -t -l -p $(YACC_PREFIX) $< .PRECIOUS: $(src)/%.tab.c_shipped $(src)/%.tab.c_shipped: $(src)/%.y