summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-11 07:56:30 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-11 07:56:30 +0000
commitd77f313b19ae1c6225bd95b2e3f7a07cc4a47158 (patch)
treed9e722697699ca9b0115889744360e188e980b7d
parentd6f62a835cd834f49d4c79f2c40f46386ccb2218 (diff)
downloadruby-d77f313b19ae1c6225bd95b2e3f7a07cc4a47158.tar.gz
ruby-d77f313b19ae1c6225bd95b2e3f7a07cc4a47158.tar.xz
ruby-d77f313b19ae1c6225bd95b2e3f7a07cc4a47158.zip
* lex.c: renamed from lex.c.blt.
* Makefile.in (lex.c): use find command to check mtime. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in17
-rw-r--r--lex.c (renamed from lex.c.blt)0
3 files changed, 17 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index aa8638dde..a16468854 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Nov 11 16:54:25 2007 Tanaka Akira <akr@fsij.org>
+
+ * lex.c: renamed from lex.c.blt.
+
+ * Makefile.in (lex.c): use find command to check mtime.
+
Sun Nov 11 05:34:13 2007 Eric Hodel <drbrain@segment7.net>
* bin/gem: Add forgotten gem command.
diff --git a/Makefile.in b/Makefile.in
index 30c82771d..8287dc1c6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -161,13 +161,18 @@ config.status: $(srcdir)/configure
$(srcdir)/configure: $(srcdir)/configure.in
cd $(srcdir) && $(AUTOCONF)
+# Things which should be considered:
+# * with gperf v.s. without gperf
+# * ./configure v.s. ../ruby/configure
+# * GNU make v.s. HP-UX make # HP-UX make invokes the action if lex.c and keywords has same mtime.
lex.c: keywords
- ( \
- gperf --output-file=$@.tmp -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? && \
- cp $@.tmp $@ && \
- mv $@.tmp "$(srcdir)/$@.blt" \
- ) || \
- cp "$(srcdir)/$@.blt" $@
+ if test -f $@ && test -z "`find $? -newer $@ -print`"; then \
+ touch $@; \
+ elif test -f $(srcdir)/lex.c && test -z "`find $? -newer $(srcdir)/lex.c -print`"; then \
+ cp $(srcdir)/lex.c $@; \
+ else \
+ gperf --output-file=$@.tmp -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? && cp $@.tmp $@; \
+ fi
.y.c:
$(YACC) $(YFLAGS) -o $@ $<
diff --git a/lex.c.blt b/lex.c
index 7292404db..7292404db 100644
--- a/lex.c.blt
+++ b/lex.c