From 9e408f848dcecd5f9f53fe79ae09ab2237d53252 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 29 Jun 2009 15:02:48 +0200 Subject: [PATCH] build: avoid concurrent extraction of calc++. * examples/calc++/Makefile.am (calc.stamp): New. Depend on it to create the sources of calc++ so that concurrent builds don't launch several "extexi" in parallel. Not only this is inefficient, this also builds incorrect sources with several extractions mixed together. Cherry-picked from 5ece73eaa19c79d5dd40b36a2a7d38cb397c2fcd. --- ChangeLog | 9 +++++++++ examples/calc++/Makefile.am | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78bab291..bf0f1744 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-06-29 Akim Demaille + + build: avoid concurrent extraction of calc++. + * examples/calc++/Makefile.am (calc.stamp): New. + Depend on it to create the sources of calc++ so that concurrent + builds don't launch several "extexi" in parallel. + Not only this is inefficient, this also builds incorrect sources + with several extractions mixed together. + 2009-06-25 Akim Demaille hash: check insertion for memory exhaustion. diff --git a/examples/calc++/Makefile.am b/examples/calc++/Makefile.am index 60467384..1f825056 100644 --- a/examples/calc++/Makefile.am +++ b/examples/calc++/Makefile.am @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -*-Makefile-*- -## Copyright (C) 2005, 2006 Free Software Foundation, Inc. +## Copyright (C) 2005, 2006, 2009 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 @@ -31,12 +31,16 @@ $(BISON): $(BISON_IN) doc = $(top_srcdir)/doc/bison.texinfo extexi = $(top_srcdir)/examples/extexi # Extract in src. -$(calc_extracted): $(doc) $(extexi) +calc.stamp: $(doc) $(extexi) + rm -f $@ $@.tmp + touch $@.tmp cd $(srcdir) && \ $(AWK) -f ../extexi -v VERSION="$(VERSION)" \ ../../doc/bison.texinfo -- calc++-parser.yy \ calc++-scanner.ll calc++.cc calc++-driver.hh calc++-driver.cc + mv $@.tmp $@ +$(calc_extracted): calc.stamp ## ------------------- ## ## Parser generation. ## -- 2.45.2