summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2009-06-29 15:02:48 +0200
committerAkim Demaille <demaille@gostai.com>2009-06-29 20:40:02 +0200
commit80d653fd3009223775dbf7c75fb8fdfb0407b968 (patch)
tree95e21efd52f4f8f5deb7e40e4f4915d8a6e63e26 /examples
parent0210a4bf5eaa64a761d1bb45f1a3e84b115a31c6 (diff)
downloadbison-80d653fd3009223775dbf7c75fb8fdfb0407b968.tar.gz
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.
Diffstat (limited to 'examples')
-rw-r--r--examples/calc++/Makefile.am8
1 files changed, 6 insertions, 2 deletions
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. ##