diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-22 06:14:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-22 06:14:50 +0000 |
commit | 333fccd1985af686b2c51a8ca451a4ecb375f8c9 (patch) | |
tree | 8e14d160816e959172bcbb3db6e9660b009394df /tool/make-snapshot | |
parent | 0cdbc9fce1e367a7ea78e10a7212f4ff3f20b0a8 (diff) | |
download | ruby-333fccd1985af686b2c51a8ca451a4ecb375f8c9.tar.gz ruby-333fccd1985af686b2c51a8ca451a4ecb375f8c9.tar.xz ruby-333fccd1985af686b2c51a8ca451a4ecb375f8c9.zip |
* common.mk (encs, ext/ripper/ripper.c): needs MFLAGS.
* configure.in (STRINGIZE): stringizing macro.
* include/ruby/defines.h (STRINGIZE): fallback.
* tool/make-snapshot: new file.
* version.c (ruby_description, ruby_copyright): string constants for
-v option.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-x | tool/make-snapshot | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot new file mode 100755 index 000000000..b86e13e81 --- /dev/null +++ b/tool/make-snapshot @@ -0,0 +1,31 @@ +#!/bin/bash + +LC_ALL=C LANG=C +SVNURL=http://svn.ruby-lang.org/repos/ruby/trunk +export LC_ALL LANG +: ${VPATH=include/ruby} ${YACC=bison} ${BASERUBY=ruby} ${RUBY=ruby} ${MV=mv} +export VPATH YACC BASERUBY RUBY MV + +[ -d "$1" ] || mkdir "$1" || exit 1 +dest=`cd "$1"; pwd` + +tmp=${TMP_DIR-/tmp}/ #ruby-snapshot-$$ +mkdir -p "$tmp" +cd "$tmp" +revision=`svn export $SVNURL ruby | sed -n '$s/.*\([0-9]+\).*/\1/p'` +[ $revision ] || revision=`svn info $SVNURL | sed -n 's/Revision: //p'` +echo "#define RUBY_REVISION $revision" > ruby/revision.h +v=ruby-r$revision +mv ruby $v +(cd $v; sed 's/{[^{}]*}//g' common.mk | make -f - prereq srcdir=.) + +for cmd in "bzip tarball.tar.bz2 tar cjf" "gzip tarball.tar.gz tar czf" "zip archive.zip zip -qr"; do + mesg="${cmd%%.*}" cmd="${cmd#*.}" + ext="${cmd%% *}" cmd="${cmd#* }" + echo -n creating $mesg... $dest/$v.$ext + if $cmd $dest/$v.$ext $v; then + echo " done" + else + echo " failed" + fi +done |