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 1QVJUt-0005Ke-4o for garchives@archives.gentoo.org; Sat, 11 Jun 2011 08:24:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E5381C049; Sat, 11 Jun 2011 08:24:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id F0C461C049 for ; Sat, 11 Jun 2011 08:24:29 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 74FFE1B403B for ; Sat, 11 Jun 2011 08:24:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BA3DF8004B for ; Sat, 11 Jun 2011 08:24:28 +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: <4e4605d4324daf9e000a1432ba1698977fe3d95b.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: / X-VCS-Repository: proj/libbash X-VCS-Files: .gitignore Makefile.am X-VCS-Directories: / X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 4e4605d4324daf9e000a1432ba1698977fe3d95b Date: Sat, 11 Jun 2011 08:24:28 +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: f34b00582ffe74d74eda58c4d7b7258e commit: 4e4605d4324daf9e000a1432ba1698977fe3d95b Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Thu Jun 9 21:37:22 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Fri Jun 10 14:51:44 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D4e4605d4 Build: rebuild libbashWalker.g less often libbashWalker.g must be rebuild only when the set of tokens changes. Now we use a md5 trick to check if the tokens file has really changed instead of relying on modification times. --- .gitignore | 1 + Makefile.am | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/.gitignore b/.gitignore index db37cad..4c665a8 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ long.sh massif.out libbash.g libbash.tokens +libbash.tokens.md5 bashast.tokens bashast/.DS_Store bashast/*.ebuild diff --git a/Makefile.am b/Makefile.am index 15d4b65..826970a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -163,6 +163,7 @@ CLEANFILES =3D $(GENERATED_PARSER_C) \ $(check_JAVA) \ libbash.g \ libbash.tokens \ + libbash.tokens.md5 \ bashast/bashast.tokens \ libbashWalker.tokens \ javagrammar.run \ @@ -277,9 +278,13 @@ libbash.g: bashast/bashast.g -e 's/language =3D Java;/language =3D C;/g' \ -e 's/grammar bashast;/grammar libbash;/g' $< > $@ =20 +# http://www.kolpackov.net/pipermail/notes/2004-September.txt +libbash.tokens.md5: libbash.tokens + $(AM_V_at)md5sum $< | cmp -s $@ -; if test $$? -ne 0; then md5sum $< > = $@; fi + # Avoid initializing C++ type to NULL by sed, variables whose name # starts with libbash_ will be stripped -walker.run: bashast/libbashWalker.g cgrammar.run +walker.run: bashast/libbashWalker.g libbash.tokens.md5 $(AM_V_at)touch $@.tmp $(AM_V_GEN)$(ANTLR) -fo . $< $(AM_V_at)sed -i -e 's/\(libbash_.*\) =3D NULL/\1/' libbashWalker.c @@ -288,6 +293,7 @@ walker.run: bashast/libbashWalker.g cgrammar.run =20 $(GENERATED_PARSER_C): cgrammar.run $(GENERATED_PARSER_H): cgrammar.run +libbash.tokens: cgrammar.run =20 $(GENERATED_WALKER_CPP): walker.run $(GENERATED_WALKER_H): walker.run