From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 10:45:24 2011 Received: (at submit) by debbugs.gnu.org; 28 Nov 2011 15:45:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RV3OU-0005cY-8m for submit@debbugs.gnu.org; Mon, 28 Nov 2011 10:45:23 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RUxR3-0004KG-RE for submit@debbugs.gnu.org; Mon, 28 Nov 2011 04:23:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUxPA-0007Bo-Mx for submit@debbugs.gnu.org; Mon, 28 Nov 2011 04:21:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:58832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUxPA-0007Bk-Hp for submit@debbugs.gnu.org; Mon, 28 Nov 2011 04:21:40 -0500 Received: from eggs.gnu.org ([140.186.70.92]:33313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUxP4-0006Bx-Vs for bug-automake@gnu.org; Mon, 28 Nov 2011 04:21:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUxOy-00079Y-QH for bug-automake@gnu.org; Mon, 28 Nov 2011 04:21:34 -0500 Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:34406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUxOy-000797-JY for bug-automake@gnu.org; Mon, 28 Nov 2011 04:21:28 -0500 Received: by lamb11 with SMTP id b11so637684lam.0 for ; Mon, 28 Nov 2011 01:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=yOjytej0jB0+mdD3UxJJXJGI2vraHoRIOvtbOb7DK4I=; b=BTZg8gHmk6ZyuOGl7Hx40LoN2tyefqXbnl+9dcbqgcOsCPmfChbXy2JGm+++l9poAe MiKMPtYvvpatcOoge/aX4VTKwgUZ11k9FGQ/15Wn1B7NSfwcXRHjeUNXoklKyMqZsU5D 5x1kvvZieU9ZHT0KinmWLnMRjuy9OHe44fzQ4= MIME-Version: 1.0 Received: by 10.152.109.198 with SMTP id hu6mr27763320lab.11.1322472086024; Mon, 28 Nov 2011 01:21:26 -0800 (PST) Received: by 10.152.26.204 with HTTP; Mon, 28 Nov 2011 01:21:25 -0800 (PST) Date: Mon, 28 Nov 2011 02:21:25 -0700 Message-ID: Subject: ylwrap error: From: Joe Chen To: bug-automake@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 28 Nov 2011 10:45:20 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hi, I am using automake for compile flex input file. The flex command line option --prefix= or -P works with the direct invoking of flex, buy ylwrap gets error all the time for me: /bin/bash ../build-aux/ylwrap configf_lexer.l lex.yy.c configf_lexer.c -- flex --case-insensitive --prefix=configf_yy make[4]: *** [configf_lexer.c] Error 1 Is this a known issue? -- You can see the version info of the automake I am using : jchen200@ubuntu:~/joe-work/joe-ccp-hgw-git-joe-clone$ ./build-aux/ylwrap --help Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . jchen200@ubuntu:~/joe-work/joe-ccp-hgw-git-joe-clone$ automake --version automake (GNU automake) 1.11.1 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Tom Tromey and Alexandre Duret-Lutz . jchen200@ubuntu:~/joe-work/joe-ccp-hgw-git-joe-clone$ -- Joe Chen From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 14:35:14 2011 Received: (at submit) by debbugs.gnu.org; 28 Nov 2011 19:35:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RV6yw-0003Sf-D0 for submit@debbugs.gnu.org; Mon, 28 Nov 2011 14:35:14 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RV6yu-0003SY-TU for submit@debbugs.gnu.org; Mon, 28 Nov 2011 14:35:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RV6x2-00047K-7p for submit@debbugs.gnu.org; Mon, 28 Nov 2011 14:33:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:52445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV6x2-00047C-6D for submit@debbugs.gnu.org; Mon, 28 Nov 2011 14:33:16 -0500 Received: from eggs.gnu.org ([140.186.70.92]:50046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV6x0-0003Y7-TO for bug-automake@gnu.org; Mon, 28 Nov 2011 14:33:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RV6ww-000431-J2 for bug-automake@gnu.org; Mon, 28 Nov 2011 14:33:14 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:55259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV6ww-00042E-6Z for bug-automake@gnu.org; Mon, 28 Nov 2011 14:33:10 -0500 Received: by eeaq46 with SMTP id q46so790697eea.0 for ; Mon, 28 Nov 2011 11:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=nXjjHCVphRANfTg8KOjppRgWPd4OC1AyvXPpDymTAU0=; b=uuzTSlv2RVn9KRlbR9/YgPBBacYdRt0aCFMth/vds7ep73gCVWt8FaynFrpnNbZXns 3V3EG7xUWKfT+s7gzUzpnNzMfFvA9u+ru89dLdiMqWMvOrgKA3dKLtEMLTo/5G/1XHYc gzo0pBq5rWZd/NI+rUydGv+SVkWDawF8VOGvM= Received: by 10.181.13.140 with SMTP id ey12mr30238203wid.7.1322508789167; Mon, 28 Nov 2011 11:33:09 -0800 (PST) Received: from bigio.localnet (host32-99-dynamic.20-79-r.retail.telecomitalia.it. [79.20.99.32]) by mx.google.com with ESMTPS id w8sm13917474wiz.4.2011.11.28.11.33.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Nov 2011 11:33:08 -0800 (PST) From: Stefano Lattarini To: bug-automake@gnu.org Subject: Re: bug#10154: ylwrap error: Date: Mon, 28 Nov 2011 20:32:59 +0100 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201111282033.00574.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit Cc: 10154@debbugs.gnu.org, Joe Chen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) tags 10154 notabug thanks On Monday 28 November 2011, Joe Chen wrote: > Hi, > Hi Joe, thanks for the report. > I am using automake for compile flex input file. The flex command > line option --prefix= or -P works with the direct > invoking of flex, buy ylwrap gets error all the time for me: > > /bin/bash ../build-aux/ylwrap configf_lexer.l lex.yy.c configf_lexer.c > -- flex --case-insensitive --prefix=configf_yy > make[4]: *** [configf_lexer.c] Error 1 > > > Is this a known issue? > This is not an issue in ylwrap, but rather and usage error. Let's see again the help screen from ylwrap: Usage: ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. This suggests that, instead of using `--prefix' to modify the name of the generated `.c' file, you should simply use the DESIRED argument: ylwrap configf_lexer.l lex.yy.c configf_lexer.c \ -- flex --case-insensitive Or, if you have other reasons to want to stick with the `--prefix' option (whose exact effects and semantics I don't pretend to know), you must inform `ylwrap' of the different expected OUTPUT filename: ylwrap configf_lexer.l lex.configf_yy.c configf_lexer.c \ -- flex --case-insensitive --prefix=configf_yy HTH, Stefano From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 17:19:38 2011 Received: (at submit) by debbugs.gnu.org; 28 Nov 2011 22:19:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RV9Y1-0000fu-N0 for submit@debbugs.gnu.org; Mon, 28 Nov 2011 17:19:38 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RV9Xy-0000fl-Pf for submit@debbugs.gnu.org; Mon, 28 Nov 2011 17:19:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RV9W4-0005FM-Tx for submit@debbugs.gnu.org; Mon, 28 Nov 2011 17:17:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:54935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV9W4-0005FF-SN for submit@debbugs.gnu.org; Mon, 28 Nov 2011 17:17:36 -0500 Received: from eggs.gnu.org ([140.186.70.92]:46421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV9W3-0001it-V3 for bug-automake@gnu.org; Mon, 28 Nov 2011 17:17:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RV9Vw-00059s-OL for bug-automake@gnu.org; Mon, 28 Nov 2011 17:17:30 -0500 Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:55762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV9Vv-00054U-S6 for bug-automake@gnu.org; Mon, 28 Nov 2011 17:17:28 -0500 Received: by lamb11 with SMTP id b11so887736lam.0 for ; Mon, 28 Nov 2011 14:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=B9BlYIXcqBK4MEWC4aSFfq6NYUqMypdwtoFsD4LWzSA=; b=M2O5XLo5k79Nxelg89iL+j01d1av3vnp+m8N8DRPokqKNS0IAyUOj2VQZHXUpfnxq9 I6KRGlXS7A6Jsv0Do4wlkBnvaF0WYMtlQqk2kDKvqbD4OJOLCMyNB+JGosxW+NpAhI2p HKYHzrDd5oLAt07U0QVKjOm2w/Sbdna/80JGg= MIME-Version: 1.0 Received: by 10.152.105.132 with SMTP id gm4mr29382600lab.39.1322518641299; Mon, 28 Nov 2011 14:17:21 -0800 (PST) Received: by 10.152.26.204 with HTTP; Mon, 28 Nov 2011 14:17:21 -0800 (PST) In-Reply-To: <201111282033.00574.stefano.lattarini@gmail.com> References: <201111282033.00574.stefano.lattarini@gmail.com> Date: Mon, 28 Nov 2011 15:17:21 -0700 Message-ID: Subject: Re: bug#10154: ylwrap error: From: Joe Chen To: Stefano Lattarini Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit Cc: 10154@debbugs.gnu.org, bug-automake@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) On Mon, Nov 28, 2011 at 12:32 PM, Stefano Lattarini wrote: > tags 10154 notabug > thanks > > On Monday 28 November 2011, Joe Chen wrote: >> Hi, >> > Hi Joe, thanks for the report. > >> I am using automake for compile flex input file. =A0The flex command >> line option --prefix=3D or -P works with the direct >> invoking of flex, buy ylwrap gets error all the time for me: >> >> /bin/bash ../build-aux/ylwrap configf_lexer.l lex.yy.c configf_lexer.c >> -- flex =A0--case-insensitive --prefix=3Dconfigf_yy >> make[4]: *** [configf_lexer.c] Error 1 >> >> >> Is this a known issue? >> > This is not an issue in ylwrap, but rather and usage error. =A0Let's see > again the help screen from ylwrap: > > =A0Usage: ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... > > =A0Wrapper for lex/yacc invocations, renaming files as desired. > > =A0 INPUT is the input file > =A0 OUTPUT is one file PROG generates > =A0 DESIRED is the file we actually want instead of OUTPUT > =A0 PROGRAM is program to run > =A0 ARGS are passed to PROG > > =A0Any number of OUTPUT,DESIRED pairs may be used. > > This suggests that, instead of using `--prefix' to modify the name of > the generated `.c' file, you should simply use the DESIRED argument: > > =A0ylwrap configf_lexer.l lex.yy.c configf_lexer.c \ > =A0 =A0 =A0 =A0-- flex --case-insensitive > > Or, if you have other reasons to want to stick with the `--prefix' > option (whose exact effects and semantics I don't pretend to know), > you must inform `ylwrap' of the different expected OUTPUT filename: > > =A0ylwrap configf_lexer.l lex.configf_yy.c configf_lexer.c \ > =A0 =A0 =A0 =A0-- flex --case-insensitive --prefix=3Dconfigf_yy THANKS! This format of ylwrap no longer gets the error, and works for my purpose: > =A0ylwrap configf_lexer.l lex.configf_yy.c configf_lexer.c \> =A0 =A0 =A0= =A0-- flex --case-insensitive --prefix=3Dconfigf_yy Could you point to me how to compose my files of "configure.ac" and/or "Makefile.am" to let "ylwrap" takes the exact OUTPUT and DESIRED that I want? Very often, I have multiple pairs of *.y and *.l files to be linked together and this --prefix=3D makes it possible. And thus I have a need to flexibly specify the OUTPUT and DESIRED as needed. BTW, --prefix=3D lets flex to generate "text" in place of "yytext" in the generated file. -- Joe ---------------------------------- Joseph Chen From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 20:17:59 2011 Received: (at submit) by debbugs.gnu.org; 29 Nov 2011 01:17:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVCKd-0004p6-49 for submit@debbugs.gnu.org; Mon, 28 Nov 2011 20:17:59 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVCKZ-0004ov-MF for submit@debbugs.gnu.org; Mon, 28 Nov 2011 20:17:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVCIf-0000gW-7n for submit@debbugs.gnu.org; Mon, 28 Nov 2011 20:15:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:33745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVCIf-0000gS-6J for submit@debbugs.gnu.org; Mon, 28 Nov 2011 20:15:57 -0500 Received: from eggs.gnu.org ([140.186.70.92]:60236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVCIa-0007n8-8C for bug-automake@gnu.org; Mon, 28 Nov 2011 20:15:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVCIY-0000ax-Vm for bug-automake@gnu.org; Mon, 28 Nov 2011 20:15:52 -0500 Received: from lo.gmane.org ([80.91.229.12]:36226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVCIY-0000aR-Qj for bug-automake@gnu.org; Mon, 28 Nov 2011 20:15:50 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RVCIW-0004KP-Rb for bug-automake@gnu.org; Tue, 29 Nov 2011 02:15:48 +0100 Received: from f054055250.adsl.alicedsl.de ([78.54.55.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Nov 2011 02:15:48 +0100 Received: from tim by f054055250.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Nov 2011 02:15:48 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-automake@gnu.org To: bug-automake@gnu.org From: Tim Landscheidt Subject: Re: bug#10154: ylwrap error: Date: Tue, 29 Nov 2011 01:15:36 +0000 Organization: Lines: 23 Message-ID: References: <201111282033.00574.stefano.lattarini@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: f054055250.adsl.alicedsl.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:vZMEjsZnGzWLH7bJ6JomFaG2/VI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Joe Chen wrote: > [...] > THANKS! This format of ylwrap no longer gets the error, and works for > my purpose: >>  ylwrap configf_lexer.l lex.configf_yy.c configf_lexer.c \>        -- flex --case-insensitive --prefix=configf_yy > Could you point to me how to compose my files of "configure.ac" and/or > "Makefile.am" to let "ylwrap" takes the exact OUTPUT and DESIRED that > I want? > Very often, I have multiple pairs of *.y and *.l files to be linked > together and this --prefix= makes it possible. And thus I > have a need to flexibly specify the OUTPUT and DESIRED as needed. > BTW, --prefix= lets flex to generate "text" in place > of "yytext" in the generated file. You didn't post an excerpt of your makefile, but usually in- tegrating the flex command line options as "%option"s and adding an 'outfile="lex.yy.c"' to them should work as re- quired. Tim From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 06:36:43 2011 Received: (at submit) by debbugs.gnu.org; 1 Dec 2011 11:36:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW4wV-0005nv-00 for submit@debbugs.gnu.org; Thu, 01 Dec 2011 06:36:43 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW4wS-0005nm-TE for submit@debbugs.gnu.org; Thu, 01 Dec 2011 06:36:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RW4wE-0000Jk-PP for submit@debbugs.gnu.org; Thu, 01 Dec 2011 06:36:32 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, URIBL_BLACK autolearn=no version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:54902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW4wE-0000Jg-Nr for submit@debbugs.gnu.org; Thu, 01 Dec 2011 06:36:26 -0500 Received: from eggs.gnu.org ([140.186.70.92]:59614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW4wD-0000Mx-Lr for bug-automake@gnu.org; Thu, 01 Dec 2011 06:36:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RW4wC-0000Is-NT for bug-automake@gnu.org; Thu, 01 Dec 2011 06:36:25 -0500 Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:50134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW4wC-0000HQ-BE for bug-automake@gnu.org; Thu, 01 Dec 2011 06:36:24 -0500 Received: by lahi5 with SMTP id i5so818031lah.0 for ; Thu, 01 Dec 2011 03:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=/P7FsRvsfl4xdaIpRBTHU1Zu5Qxn2r1U/ugMBYvNSgY=; b=ScRBbBazNIsBf6tDY4hRrrLwKLBDxiTDK6In/Jtuel53VIAx6v5Xz2x5+M5+VEcKrp fBG89tBH/J6TEll4DcOduVEVJWqHTnpOG+gATybYaU+74sewr7PU3BvsJBcRnKbN4v0D ZZB+IOruelMgcBxKFywfu5igOTpVvdbRyN/38= Received: by 10.152.106.115 with SMTP id gt19mr4303079lab.27.1322739377518; Thu, 01 Dec 2011 03:36:17 -0800 (PST) Received: from bigio.localnet (host167-37-dynamic.56-82-r.retail.telecomitalia.it. [82.56.37.167]) by mx.google.com with ESMTPS id iy5sm4807453lab.16.2011.12.01.03.36.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Dec 2011 03:36:15 -0800 (PST) From: Stefano Lattarini To: Joe Chen Subject: Re: bug#10154: ylwrap error: Date: Thu, 1 Dec 2011 12:35:58 +0100 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: <201111282033.00574.stefano.lattarini@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112011235.58741.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit Cc: 10154@debbugs.gnu.org, bug-automake@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) On Monday 28 November 2011, Joe Chen wrote: > On Mon, Nov 28, 2011 at 12:32 PM, Stefano Lattarini > > > > On Monday 28 November 2011, Joe Chen wrote: > >> > >> I am using automake for compile flex input file. The flex command > >> line option --prefix= or -P works with the direct > >> invoking of flex, buy ylwrap gets error all the time for me: > >> > >> /bin/bash ../build-aux/ylwrap configf_lexer.l lex.yy.c configf_lexer.c > >> -- flex --case-insensitive --prefix=configf_yy > >> make[4]: *** [configf_lexer.c] Error 1 > >> > >> > >> Is this a known issue? > >> > > This is not an issue in ylwrap, but rather and usage error. Let's see > > again the help screen from ylwrap: > > > > Usage: ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... > > > > Wrapper for lex/yacc invocations, renaming files as desired. > > > > INPUT is the input file > > OUTPUT is one file PROG generates > > DESIRED is the file we actually want instead of OUTPUT > > PROGRAM is program to run > > ARGS are passed to PROG > > > > Any number of OUTPUT,DESIRED pairs may be used. > > > > This suggests that, instead of using `--prefix' to modify the name of > > the generated `.c' file, you should simply use the DESIRED argument: > > > > ylwrap configf_lexer.l lex.yy.c configf_lexer.c \ > > -- flex --case-insensitive > > > > Or, if you have other reasons to want to stick with the `--prefix' > > option (whose exact effects and semantics I don't pretend to know), > > you must inform `ylwrap' of the different expected OUTPUT filename: > > > > ylwrap configf_lexer.l lex.configf_yy.c configf_lexer.c \ > > -- flex --case-insensitive --prefix=configf_yy > > THANKS! This format of ylwrap no longer gets the error, and works for > my purpose: > > ylwrap configf_lexer.l lex.configf_yy.c configf_lexer.c \ > > -- flex --case-insensitive --prefix=configf_yy > Could you point to me how to compose my files of "configure.ac" and/or > "Makefile.am" to let "ylwrap" takes the exact OUTPUT and DESIRED that > I want? > The simpler way I can think of is to provide, in your Makefile.am, hand-written rules to build `.c' files from your `.l' files, and to distribute said `.l' files explicitly; something like this perhaps (warning: untested!): configf_lexer.c: configf_lexer.l $(SHELL) $(top_srcdir)/ylwrap \ configf_lexer.l lex.configf_yy.c configf_lexer.c \ -- $(LEX) $(LFLAGS) --case-insensitive --prefix=configf_yy EXTRA_DIST = ... configf_lexer.l ... bin_PROGRAMS = foo foo_SOURCES = main.c ... configf_lexer.c ... Still, note that the main purpose of `ylwrap' is to allow parallel builds when multiple `.l' files are to be processed in the same Makefile; but if you follow the route of requiring flex and ensuring that the output files for different `.l' files all have different names, you can dispense with the use of ylwrap altogether, as in (again, warning: untested!): configf_lexer.c: configf_lexer.l $(LEX) $(LFLAGS) --case-insensitive --prefix=configf_yy \ --output configf_lexer.c configf_lexer.l EXTRA_DIST = ... configf_lexer.l ... bin_PROGRAMS = foo foo_SOURCES = main.c ... configf_lexer.c ... > Very often, I have multiple pairs of *.y and *.l files to be linked > together and this --prefix= makes it possible. And thus I > have a need to flexibly specify the OUTPUT and DESIRED as needed. > > BTW, --prefix= lets flex to generate "text" in place > of "yytext" in the generated file. > Ah, ok, now I see why you want to use the `--prefix' option. But it looks strange that this option also changes the name of the default output file ... There isn't a way to avoid this? If yes, you won't have to use the workarounds I described above, but will be able to just rely on the automake-provided Lex support. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 26 15:56:27 2011 Received: (at control) by debbugs.gnu.org; 26 Dec 2011 20:56:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RfHas-0002c5-M0 for submit@debbugs.gnu.org; Mon, 26 Dec 2011 15:56:27 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RfHaq-0002bw-I4 for control@debbugs.gnu.org; Mon, 26 Dec 2011 15:56:25 -0500 Received: by eekc14 with SMTP id c14so11714429eek.3 for ; Mon, 26 Dec 2011 12:53:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=0bbXf4n0cLNU+ZFLb86iTZQPaWgPXU5lWj3GItD2bxc=; b=GMLncxgod16LybCEFagg9TB4+kCzmDEabV/vgr+3eSK4fNjSJUio0dYD67SLRcFs6e Z72MrLrP+G32MfSNj7sgJqx/JHzdDgpOAMyYHayXaGl6LNYdIgdjkWLaba5KTaXbTy8o OdcZxdFst5aG+Uaw38K58y7tGMkSVvckzKaP8= Received: by 10.213.114.13 with SMTP id c13mr2993781ebq.147.1324932829259; Mon, 26 Dec 2011 12:53:49 -0800 (PST) Received: from [87.2.103.80] (host80-103-dynamic.2-87-r.retail.telecomitalia.it. [87.2.103.80]) by mx.google.com with ESMTPS id u53sm48966621eeu.6.2011.12.26.12.53.48 (version=SSLv3 cipher=OTHER); Mon, 26 Dec 2011 12:53:48 -0800 (PST) Message-ID: <4EF8DEDA.3070302@gmail.com> Date: Mon, 26 Dec 2011 21:53:46 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) close 10154 thanks From unknown Sun Aug 17 22:09:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 24 Jan 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator