From unknown Wed Jun 18 23:09:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9933: ylwrap bug Resent-From: Stefano Lattarini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Tue, 01 Nov 2011 16:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9933 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 9933@debbugs.gnu.org Cc: Bruce Korb , automake@gnu.org X-Debbugs-Original-To: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132016473810099 (code B ref -1); Tue, 01 Nov 2011 16:26:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Nov 2011 16:25: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 1RLH9d-0002co-T6 for submit@debbugs.gnu.org; Tue, 01 Nov 2011 12:25:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RLH9b-0002ch-W3 for submit@debbugs.gnu.org; Tue, 01 Nov 2011 12:25:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLH7J-0001XH-Uh for submit@debbugs.gnu.org; Tue, 01 Nov 2011 12:23:18 -0400 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]:49239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLH7J-0001X1-GQ for submit@debbugs.gnu.org; Tue, 01 Nov 2011 12:23:13 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLH7F-0001Mv-GE for bug-automake@gnu.org; Tue, 01 Nov 2011 12:23:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLH7D-0001Vv-KG for bug-automake@gnu.org; Tue, 01 Nov 2011 12:23:09 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:64953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLH7D-0001VI-AF; Tue, 01 Nov 2011 12:23:07 -0400 Received: by wyg24 with SMTP id 24so2411204wyg.0 for ; Tue, 01 Nov 2011 09:23:06 -0700 (PDT) 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=zxNG1chuIHFJXqQZsI7t/Em2ZTZuwy93oAqRzPU/ymo=; b=P2NiFYN8jiGdNjr3d7wnOIsPOJAzy++mpJgt43Srf7PCQAFF97FelX587bsD5hzG3R Ot6baCiwphdQsoKIGHk7FQDXy0wf+ygo65Sx2iIpe+RLS3cOsNutisP2GBjUgUtz/IuL ppmwaUAW5ExGiXl9kWy7iekmcMxiFVvCk/QQA= Received: by 10.227.202.149 with SMTP id fe21mr284868wbb.15.1320164586065; Tue, 01 Nov 2011 09:23:06 -0700 (PDT) Received: from bigio.localnet (host195-102-dynamic.2-87-r.retail.telecomitalia.it. [87.2.102.195]) by mx.google.com with ESMTPS id fy13sm39192572wbb.18.2011.11.01.09.23.04 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Nov 2011 09:23:04 -0700 (PDT) From: Stefano Lattarini Date: Tue, 1 Nov 2011 17:22:56 +0100 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) References: <4EB01626.6030109@gnu.org> In-Reply-To: <4EB01626.6030109@gnu.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201111011722.56803.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.2 (-----) 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.2 (-----) [CC:ing bug-automake] [replies can drop the automake list] Hi Bruce. In the future, please send bug reports to bug-automake, so that our bug tracker will keep track of them. Thanks. On Tuesday 01 November 2011, Bruce Korb wrote: > PING: > > The bison accepts the option, --header-file=whatever.h > "ylwrap" is a wrapper script meant to canonicalize the invocation > of yacc and bison. True enough, if you use --header-file you > had better be using bison, but here is the problem: > > I am working on a project that will only build in a GNU tools environment. > Therefore, I know that the .l -> .c transformation tool is flex, not > POSIX lex. The code I am working with presumes that it can use this: > AM_LFLAGS = @LEX_FL@ --header-file=$(LEX_HEADER) -DYY_NO_INPUT=1 > So ylwrap fires off the flex program and it runs just fine, the tiny > problem is that it also removes the temporary directory before I can > salvage the generated header. This is inconvenient. > Long-standing bug/limitation. There are a couple of (dormant) branches in the automake repository that try to tackle similar issues for yacc (see also automake bug#7648): `yacc-work' and `ylwrap-refactor'. But even if these branches will be finally completed and merged, the changes they introduce will only appear in automake 1.12. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 01 12:27:58 2011 Received: (at control) by debbugs.gnu.org; 1 Nov 2011 16:27:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RLHBt-0002gD-Td for submit@debbugs.gnu.org; Tue, 01 Nov 2011 12:27:58 -0400 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RLHBr-0002g5-QP for control@debbugs.gnu.org; Tue, 01 Nov 2011 12:27:56 -0400 Received: by wyg30 with SMTP id 30so2153814wyg.3 for ; Tue, 01 Nov 2011 09:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id; bh=bDrRq4ITRIAf1iO2McTHzJSSswHJN3ZuA4huuEnY3FE=; b=vJV/xOuQI5+vYaRoeVIWA3gb4Pj3wS6KuNuvlJGq+a6kAs+rs6XP9/p9raf8n907f/ Cykcb7MyCQR9Ldtepq0EIPKMg6bU3Z19hlrAO8nksbthgIFugEerg3if5jYeXZdw0Hg0 qyZMgUEyHWFWw12ukGfY6SG8MHERBuOwLbVi8= Received: by 10.216.71.205 with SMTP id r55mr4635899wed.73.1320164736916; Tue, 01 Nov 2011 09:25:36 -0700 (PDT) Received: from bigio.localnet (host195-102-dynamic.2-87-r.retail.telecomitalia.it. [87.2.102.195]) by mx.google.com with ESMTPS id fw16sm39215049wbb.13.2011.11.01.09.25.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Nov 2011 09:25:34 -0700 (PDT) From: Stefano Lattarini To: control@debbugs.gnu.org Subject: foo Date: Tue, 1 Nov 2011 17:25:24 +0100 User-Agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201111011725.25180.stefano.lattarini@gmail.com> X-Spam-Score: -4.0 (----) 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: -4.0 (----) submitter 9933 Bruce Korb thanks From unknown Wed Jun 18 23:09:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9933: ylwrap bug Resent-From: Bruce Korb Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Tue, 01 Nov 2011 18:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9933 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: Stefano Lattarini Cc: 9933@debbugs.gnu.org X-Debbugs-Original-Cc: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132017243327199 (code B ref -1); Tue, 01 Nov 2011 18:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Nov 2011 18:33:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RLJ9k-00074b-M7 for submit@debbugs.gnu.org; Tue, 01 Nov 2011 14:33:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RLHgI-0004AZ-BP for submit@debbugs.gnu.org; Tue, 01 Nov 2011 12:59:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLHe0-0001py-Er for submit@debbugs.gnu.org; Tue, 01 Nov 2011 12:57:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:59299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLHe0-0001pu-88 for submit@debbugs.gnu.org; Tue, 01 Nov 2011 12:57:00 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLHdz-0003Ek-3D for bug-automake@gnu.org; Tue, 01 Nov 2011 12:56:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLHdx-0001pX-Jn for bug-automake@gnu.org; Tue, 01 Nov 2011 12:56:59 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:46685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLHdx-0001pT-IG for bug-automake@gnu.org; Tue, 01 Nov 2011 12:56:57 -0400 Received: from adsl-75-0-189-57.dsl.pltn13.sbcglobal.net ([75.0.189.57]:52501 helo=[10.0.0.2]) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RLHdx-0006W2-AF; Tue, 01 Nov 2011 12:56:57 -0400 Message-ID: <4EB024D7.7010503@gnu.org> Date: Tue, 01 Nov 2011 09:56:55 -0700 From: Bruce Korb User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 MIME-Version: 1.0 References: <4EB01626.6030109@gnu.org> <201111011722.56803.stefano.lattarini@gmail.com> In-Reply-To: <201111011722.56803.stefano.lattarini@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: -6.6 (------) X-Mailman-Approved-At: Tue, 01 Nov 2011 14:33:49 -0400 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: -6.6 (------) On 11/01/11 09:22, Stefano Lattarini wrote: >> AM_LFLAGS = @LEX_FL@ --header-file=$(LEX_HEADER) -DYY_NO_INPUT=1 >> So ylwrap fires off the flex program and it runs just fine, the tiny >> problem is that it also removes the temporary directory before I can >> salvage the generated header. This is inconvenient. >> > Long-standing bug/limitation. [...] the changes > [... might] only appear in automake 1.12. Excellent! I cannot expect any better. I'll just need to know what text to look for in ylwrap to indicate a proper fix so I can disable that sed hackery that wiggles around the problem. :) Thank you so much! Regards, Bruce From unknown Wed Jun 18 23:09:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9933: ylwrap bug Resent-From: Stefano Lattarini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Mon, 23 Jul 2012 10:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9933 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: Bruce Korb Cc: 9933@debbugs.gnu.org Received: via spool by 9933-submit@debbugs.gnu.org id=B9933.134303775421329 (code B ref 9933); Mon, 23 Jul 2012 10:03:02 +0000 Received: (at 9933) by debbugs.gnu.org; 23 Jul 2012 10:02:34 +0000 Received: from localhost ([127.0.0.1]:59136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StFTF-0005Xx-L3 for submit@debbugs.gnu.org; Mon, 23 Jul 2012 06:02:33 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:61087) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1StFTD-0005Xm-BS; Mon, 23 Jul 2012 06:02:32 -0400 Received: by lbbgo11 with SMTP id go11so7681933lbb.3 for ; Mon, 23 Jul 2012 02:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=5D/weLc3+zKkTgfMqYeQSXb2e2Q0PYsuZfCEKnb50UM=; b=uvjE75uLfQyoSSdD2aW+LXopku0YBqrBsyP7FHGPRNxdZspZZI7rQBDVBMMytdyYmU /qG4hwRykENHGyPkM7r9UkpoG0qgCCN4hSQRyS6b2cjN2jfnmTWX/hBGGVlT8xvZEAww Rd1MoRPP2bA82mKJpM2JzHKvdoJXa82hObN+530hzWGwKuPyMc9eNwKMq8CKaKCCOKNn JSZdT7tL38UJPFV3z7WJLc25UfjEfHzSkwPLNZxYAdHc0N7TV5HGvRELn5lZSEo9ELBw M3bfMbWSPpj69kLRgSfOM1lhX/pHS1kOPN3ZR4ms7wboAOxOudyl6IiwOgWgMJ5enwJ9 FXmw== Received: by 10.112.36.42 with SMTP id n10mr7366820lbj.7.1343037357094; Mon, 23 Jul 2012 02:55:57 -0700 (PDT) Received: from [192.168.178.21] (host105-96-dynamic.4-87-r.retail.telecomitalia.it. [87.4.96.105]) by mx.google.com with ESMTPS id pe8sm12950908lab.17.2012.07.23.02.55.55 (version=SSLv3 cipher=OTHER); Mon, 23 Jul 2012 02:55:56 -0700 (PDT) Message-ID: <500D1FA9.6020805@gmail.com> Date: Mon, 23 Jul 2012 11:55:53 +0200 From: Stefano Lattarini MIME-Version: 1.0 References: <4EB01626.6030109@gnu.org> <201111011722.56803.stefano.lattarini@gmail.com> <4EB024D7.7010503@gnu.org> In-Reply-To: <4EB024D7.7010503@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -2.6 (--) tags 9933 + moreinfo thanks Hi Bruce, sorry for the delay. On 11/01/2011 05:56 PM, Bruce Korb wrote: > On 11/01/11 09:22, Stefano Lattarini wrote: >>> AM_LFLAGS = @LEX_FL@ --header-file=$(LEX_HEADER) -DYY_NO_INPUT=1 >>> So ylwrap fires off the flex program and it runs just fine, the tiny >>> problem is that it also removes the temporary directory before I can >>> salvage the generated header. This is inconvenient. >>> >> Long-standing bug/limitation. [...] the changes >> [... might] only appear in automake 1.12. > > Excellent! I cannot expect any better. I'll just need to know what > text to look for in ylwrap to indicate a proper fix so I can disable > that sed hackery that wiggles around the problem. :) > The recent flurry of ylwrap patches from Akim Demaille should have solved your problem as well. Could you give a try to the development version of ylwrap: and see if it works correctly in your use case? Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 26 12:43:10 2012 Received: (at control) by debbugs.gnu.org; 26 Aug 2012 16:43:10 +0000 Received: from localhost ([127.0.0.1]:50946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T5fva-0007jN-4M for submit@debbugs.gnu.org; Sun, 26 Aug 2012 12:43:10 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:65475) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T5fvY-0007jG-5k for control@debbugs.gnu.org; Sun, 26 Aug 2012 12:43:08 -0400 Received: by bkty12 with SMTP id y12so925772bkt.3 for ; Sun, 26 Aug 2012 09:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=HPcKxAmCyWB5y0t7vzhFc0AREY2XLQyZgGEeLzrInws=; b=M4KmeH7y4slSu+Afum1EYbmv+TpLXF1PbiptdPfUCY16OQA/8wswZgSWr5izCCfTZQ TDBzFrGgmTLgW8RcaJ8Ya3OfoGgz+EzZKWLF/cye4Lfts1OgD9LSPnmkJa2ey9IB3rOz ue4cnmjLI6eAar4h6HxuVgcmHNxW09Y0YjOFgrqqfG2GCmJtbD2glX4DvsnUGRd85zAf LmOH1dM8vAU88RUNpkUScX7LhdoTOXb+sUz5Wa0T/B3K3X82LEyDgbArvovd1oifQRIq oyoGth20yFwKitEL/Sr/da/iuG7oyfsbmEBZLdc1as3QiEw0dN3mnOzo8blgI45PaQS2 /eRA== Received: by 10.205.126.15 with SMTP id gu15mr3151206bkc.134.1345999339080; Sun, 26 Aug 2012 09:42:19 -0700 (PDT) Received: from [192.168.178.21] (host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42]) by mx.google.com with ESMTPS id hs2sm9111044bkc.1.2012.08.26.09.42.16 (version=SSLv3 cipher=OTHER); Sun, 26 Aug 2012 09:42:17 -0700 (PDT) Message-ID: <503A51DF.8090506@gmail.com> Date: Sun, 26 Aug 2012 18:42:07 +0200 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: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -2.6 (--) forcemerge 8844 9933 thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 26 12:48:44 2012 Received: (at control) by debbugs.gnu.org; 26 Aug 2012 16:48:44 +0000 Received: from localhost ([127.0.0.1]:50954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T5g0y-0000GK-4j for submit@debbugs.gnu.org; Sun, 26 Aug 2012 12:48:44 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:49717) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T5g0v-0000GD-Tt for control@debbugs.gnu.org; Sun, 26 Aug 2012 12:48:42 -0400 Received: by bkty12 with SMTP id y12so926937bkt.3 for ; Sun, 26 Aug 2012 09:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=5SShKcejfHIG5thcOu1dI71HSbdrxbr4/aXTyZT+TNE=; b=KYenmh0WW7ws9NWWycbQTHpTikEDPVzLzQ8nXbWdtegcUUouefMeO4aZQmHNgln2gw AqQ1HahJwju1HDvfiaAQoPpmhLGDqmRwP7tCTSZgWUFtq8KNm5/ISzxIe1QBPVsRLk8t 0iy+1g66pRIuxgbp9W7D48eTeBZqY4g3khmGMcKjSx9feHYEfbraO2vcdibkBluUeRvp XqnPrHIoQaGo6ovWfrb0gdMijbmufRXomJ65V0JVP4DqpJ6ONcQUrdGMdmhqedTvP7Vj MIYOeyoLLaKpq3sZ7O2ic3uG3aD/wDZ2GLGBI1ZhSd3nDIGU8CbbRvMGWtJ4c5CAAf1a BOXw== Received: by 10.204.145.82 with SMTP id c18mr3179579bkv.133.1345999673139; Sun, 26 Aug 2012 09:47:53 -0700 (PDT) Received: from [192.168.178.21] (host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42]) by mx.google.com with ESMTPS id fu8sm9117009bkc.5.2012.08.26.09.47.51 (version=SSLv3 cipher=OTHER); Sun, 26 Aug 2012 09:47:52 -0700 (PDT) Message-ID: <503A5333.30605@gmail.com> Date: Sun, 26 Aug 2012 18:47:47 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: z Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -2.6 (--) tags 8844 - moreinfo tags 9933 - moreinfo thanks From unknown Wed Jun 18 23:09:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9933: Flex header files Resent-From: Stefano Lattarini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Sun, 26 Aug 2012 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9933 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: "automake-patches@gnu.org" Cc: 9933@debbugs.gnu.org, Pippijn van Steenhoven , Bruce Korb , 8844@debbugs.gnu.org Received: via spool by 9933-submit@debbugs.gnu.org id=B9933.134600237111224 (code B ref 9933); Sun, 26 Aug 2012 17:33:02 +0000 Received: (at 9933) by debbugs.gnu.org; 26 Aug 2012 17:32:51 +0000 Received: from localhost ([127.0.0.1]:50999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T5ghe-0002ut-Kg for submit@debbugs.gnu.org; Sun, 26 Aug 2012 13:32:51 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:58887) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T5ghb-0002uc-6N; Sun, 26 Aug 2012 13:32:48 -0400 Received: by bkty12 with SMTP id y12so937415bkt.3 for ; Sun, 26 Aug 2012 10:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=TcawtLq4kO4LriWz1oWPGb33AJ/mWHGs3SwWkQhi6Uk=; b=Jf4VuEdBkIIuSLUfPG85nb1uW2M91lYQw+W43SpoWZ3eb4umkrobtUgYJIvmGf8rh9 RXcynCS6G10kdHu+PNvQBZZw1A1QOIfvtOogasBXJ1fnRX04uwxqaxuCVdadc5LjIL2u kYQ9i9wQdPtAIS/163INOI0sw5rMLmYchuZcF/U6v8AO6vN07Cng2doaoZnU/UQkBPQW p4Jfjb3aHh49VkGDLvXhL9O4rbeOT/sRPqGXUMAnGXip0IWg21cIHdmKu18FPAoo/i2s j2x6jb/JEOGY0CghO3LSh7OG78ksIoCYIa3fn8JHrjHM23oNB5Vuk7elKbSOwftvKDOK aBbg== Received: by 10.205.135.6 with SMTP id ie6mr3167577bkc.139.1346002317848; Sun, 26 Aug 2012 10:31:57 -0700 (PDT) Received: from [192.168.178.21] (host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42]) by mx.google.com with ESMTPS id 14sm9163495bkq.12.2012.08.26.10.31.56 (version=SSLv3 cipher=OTHER); Sun, 26 Aug 2012 10:31:57 -0700 (PDT) Message-ID: <503A5D87.1050402@gmail.com> Date: Sun, 26 Aug 2012 19:31:51 +0200 From: Stefano Lattarini MIME-Version: 1.0 References: <20110612224230.GV21380@xinutec.org> <201106130932.20332.stefano.lattarini@gmail.com> In-Reply-To: <201106130932.20332.stefano.lattarini@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -2.6 (--) retitle 8844 Flex header files retitle 9933 Flex header files close 8844 close 9933 thanks Replying to two old bug reports: =========================================================================== > On Monday 13 June 2011, Pippijn van Steenhoven wrote: > >> Hi, >> >> in some of my projects, I use (reentrant) flex with the header-file >> option. This causes flex to generate a .h file in addition to the usual >> lex.yy.c file. However, ylwrap doesn't know about this. What would be the >> correct way to use flex with header files? >> > I see two ways out, not mutually exclusive: > > 1. Introduce a new automake option `no-ylwrap', instructing automake not > to use ylwrap to process Yacc and Lex files; this should assume that > bison and flex can be used, so that we know no problem with concurrent > make will arise (we can use the `--output' option for both tools). > Then you can manually add some rules about the header on your > Makefile.am, without ylwrap getting in your way. > > 2. Improve ylwrap and automake Lex support to recognize the `--header' > Lex option, similarly to what is done for the `-d' Yacc option, and > emit code handling the header creation, dependencies, etc. > > Regards, > Stefano > ========================================================================== On Tuesday 01 November 2011, Bruce Korb wrote: > > The bison accepts the option, --header-file=whatever.h > "ylwrap" is a wrapper script meant to canonicalize the invocation > of yacc and bison. True enough, if you use --header-file you > had better be using bison, but here is the problem: > > I am working on a project that will only build in a GNU tools environment. > Therefore, I know that the .l -> .c transformation tool is flex, not > POSIX lex. The code I am working with presumes that it can use this: > AM_LFLAGS = @LEX_FL@ --header-file=$(LEX_HEADER) -DYY_NO_INPUT=1 > So ylwrap fires off the flex program and it runs just fine, the tiny > problem is that it also removes the temporary directory before I can > salvage the generated header. This is inconvenient. > ========================================================================== These issues have been fixed thanks to the recent work done by Akim Demaille on ylwrap. I've checking in the test case below to ensure we won't regress on this use case. And I'm finally closing these bug reports. Thanks, Stefano -----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----- >From 9557b2f89263c8ffe00106430fca8758f6118438 Mon Sep 17 00:00:00 2001 Message-Id: <9557b2f89263c8ffe00106430fca8758f6118438.1346001914.git.stefano.lattarini@gmail.com> From: Stefano Lattarini Date: Sun, 26 Aug 2012 19:25:02 +0200 Subject: [PATCH] coverage: bugs #8844 and #9933 (already fixed by Akim's work on ylwrap) * t/flex-header.sh: New test, show that automake bug#8844 and have already been fixed by the recent-ish improvements to ylwrap (merged with commit v1.12.2-27-gec5cb49 of 2012-07-16, "Merge branch 'yacc-work' into maint"). * t/list-of-tests.mk: Update. Signed-off-by: Stefano Lattarini --- t/lex-header.sh | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ t/list-of-tests.mk | 1 + 2 files changed, 86 insertions(+) create mode 100755 t/lex-header.sh diff --git a/t/lex-header.sh b/t/lex-header.sh new file mode 100755 index 0000000..06c8561 --- /dev/null +++ b/t/lex-header.sh @@ -0,0 +1,85 @@ +#! /bin/sh +# Copyright (C) 2011-2012 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Automake lex support can work with flex '--header' option (see +# bugs #8844 and #9933). + +required='cc flex' +. ./defs || exit 1 + +cat >> configure.ac << 'END' +AC_PROG_CC +AC_PROG_LEX +AC_OUTPUT +END + +cat > Makefile.am << 'END' +bin_PROGRAMS = foo +foo_SOURCES = lexer.l main.c mylex.h +foo_LFLAGS = --header-file=mylex.h +BUILT_SOURCES = mylex.h +# Recover from removal of header. +mylex.h: foo-lexer.c + test -f $@ || rm -f foo-lexer.c + test -f $@ || $(MAKE) $(AM_MAKEFLAGS) foo-lexer.c +END + +cat > lexer.l << 'END' +%option noyywrap +%{ +#define YY_NO_UNISTD_H 1 +%} +%% +"GOOD" return EOF; +. +%% +END + +cat > main.c <<'END' +#include "mylex.h" +int main (void) +{ + /* We don't use a 'while' loop here (like a real lexer would do) + to avoid possible hangs. */ + if (yylex () == EOF) + return 0; + else + return 1; +} +END + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +./configure + +# Program should build and run. +$MAKE +if ! cross_compiling; then + echo GOOD | ./foo + echo BAD | ./foo && exit 1 + : For shells with busted 'set -e'. +fi + +# Recovering from header removal. +rm -f mylexer.h +$MAKE + +# Sanity check on distribution. +yl_distcheck + +: diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index f72a6fa..ff4448e 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -566,6 +566,7 @@ t/lex5.sh \ t/lexcpp.sh \ t/lexvpath.sh \ t/lex-subobj-nodep.sh \ +t/lex-header.sh \ t/lex-lib.sh \ t/lex-lib-external.sh \ t/lex-libobj.sh \ -- 1.7.12