From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q3SXm-0006B4-4i for garchives@archives.gentoo.org; Sat, 26 Mar 2011 12:24:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 616801C006; Sat, 26 Mar 2011 12:24:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1CAD71C006 for ; Sat, 26 Mar 2011 12:24:11 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 757D21B410D for ; Sat, 26 Mar 2011 12:24:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E52CD8006E for ; Sat, 26 Mar 2011 12:24:09 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: Subject: [gentoo-commits] proj/libbash:master commit in: / X-VCS-Repository: proj/libbash X-VCS-Files: Makefile.am X-VCS-Directories: / X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: f3acc74012a9f4d97c8705d7c332b1605474a451 Date: Sat, 26 Mar 2011 12:24:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 3dfd68f42dc05266b7992885f06c3008 commit: f3acc74012a9f4d97c8705d7c332b1605474a451 Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Fri Mar 25 18:39:07 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Fri Mar 25 21:11:07 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Df3acc740 Improve antlr grammar rules The generated .run files should have older timestamps than the files the rules generate to avoid possible rebuilds later. The .run files now also have distinctive names. --- Makefile.am | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index e5b850d..59657ad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -94,8 +94,8 @@ CLEANFILES =3D $(GENERATED_PARSER_C) \ bashast.tokens \ bashast/bashast.tokens \ bashwalker.tokens \ - bashast/grammar.run \ - grammar.run \ + bashast/javagrammar.run \ + cgrammar.run \ walker.run =20 lib_LTLIBRARIES =3D libcppbash.la @@ -122,29 +122,31 @@ EXTRA_DIST =3D bashast/bashast.g \ coding_standard.pdf: coding_standard/coding_standard.tex @PDFLATEX@ coding_standard/coding_standard.tex 2&>1 > /dev/null =20 -grammar.run: bashast.g +cgrammar.run: bashast.g + touch $@.tmp @JAVA@ -classpath @antlr_cp@ -Xmx1024m org.antlr.Tool -Xconversiontimeo= ut 20000 -fo . $< - touch $@ + mv $@.tmp $@ =20 bashast.g: bashast/bashast.g sed -e 's/CommonTree/pANTLR3_BASE_TREE/g' -e 's/Java/C/g' $< > $@ =20 +# Avoid initializing C++ type to NULL by sed, variables whose name +# starts with libbash_ will be stripped walker.run: bashast/bashwalker.g + touch $@.tmp @JAVA@ -classpath @antlr_cp@ -Xmx1024m org.antlr.Tool -Xconversiontimeo= ut 20000 bashast.g -fo . $< - touch $@ + sed -i -e 's/\(libbash_.*\) =3D NULL/\1/' bashwalker.c + mv $@.tmp $@ =20 -$(GENERATED_PARSER_C): grammar.run -$(GENERATED_PARSER_H): grammar.run +$(GENERATED_PARSER_C): cgrammar.run +$(GENERATED_PARSER_H): cgrammar.run =20 -# Avoid initializing C++ type to NULL by sed, variables whose name -# starts with libbash_ will be stripped $(GENERATED_WALKER_C): walker.run - sed -i -e 's/\(libbash_.*\) =3D NULL/\1/' $@ - $(GENERATED_WALKER_H): walker.run =20 -bashast/grammar.run: bashast/bashast.g +bashast/javagrammar.run: bashast/bashast.g + touch $@.tmp @JAVA@ -classpath @antlr_cp@ -Xmx1024m org.antlr.Tool -Xconversiontimeo= ut 20000 -fo bashast $< - touch $@ + mv $@.tmp $@ =20 -$(check_JAVA): bashast/grammar.run +$(check_JAVA): bashast/javagrammar.run