summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-12 03:45:59 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-12 03:45:59 +0000
commit5c07f0fa4dedf5a4337e1ff70d7161701cb71ad9 (patch)
tree1a9b134dc4ef7b73410f909b613ec12912b7003e
parent01b0b42333771dca4c59a755376f7eaa23628b1e (diff)
* Makefile.in (lex.c): don't remove lex.c at first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.in9
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 260a5d0..5b213fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Nov 12 12:38:31 2007 Tanaka Akira <akr@fsij.org>
+
+ * Makefile.in (lex.c): don't remove lex.c at first.
+
Fri Nov 9 07:26:04 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* random.c: update MT URL.[ruby-core:13305].
diff --git a/Makefile.in b/Makefile.in
index 314e1ed..567b85d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -155,9 +155,12 @@ $(srcdir)/configure: $(srcdir)/configure.in
cd $(srcdir) && $(AUTOCONF)
lex.c: keywords
- @-$(RM) $@
- gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@ || \
- cp "$(srcdir)/$@" .
+ ( gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@.tmp && mv $@.tmp $@ ) || \
+ if test -f $@; then \
+ touch $@ && echo $@ touched.; \
+ else \
+ cp $(srcdir)/lex.c $@ && echo $@ copied.; \
+ fi
.y.c:
$(YACC) $<