Index: ChangeLog
from Benoît Perrot <benoit(a)lrde.epita.fr>
* src/parse/Makefile.am:
Use time stamp trick for bison generated files.
2004-09-28 Benoît Perrot <benoit(a)lrde.epita.fr>
Index: src/parse/Makefile.am
--- src/parse/Makefile.am (revision 131)
+++ src/parse/Makefile.am (revision 132)
@@ -30,8 +30,19 @@
@mv -f $@.tmp $@
asm-parse.yy: parse-asm-parse.stamp
-$(FROM_ASM_PARSE_YY): $(srcdir)/asm-parse.yy
- bison -S lalr1.cc -d -ra $(srcdir)/asm-parse.yy -o asm-parse.cc
+bison.stamp: asm-parse.yy
+ @rm -rf $@.tmp
+ @touch $@.tmp
+ bison -S lalr1.cc -d -ra asm-parse.yy -o asm-parse.cc
+ @mv -f $@.tmp $@
+
+# Run bison if a file that can be created by it is missing:
+
+asm-parse.cc $(FROM_ASM_PARSE_YY): bison.stamp
+ @if test ! -f $@; then \
+ @rm -f bison.stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) bison.stamp; \
+ fi
MAINTAINERCLEANFILES = asm-scan.ll asm-scan.yy $(FROM_ASM_PARSE_YY)