diff --git a/.travis.yml b/.travis.yml index 475aa159a4..51987ab91d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,7 @@ install: "sudo apt-get -qq build-dep ruby1.9.1 2>/dev/null" # like test-all, test-rubyspec. This is because they take too much time, # enough for Travis to shut down the VM as being stalled. before_script: + - "make -f common.mk BASERUBY=ruby srcdir=. update-config_files" - "autoconf" - "./configure --with-gcc=$CC" - "make -sj encs" diff --git a/ChangeLog b/ChangeLog index 86c30e13b5..9c062d8586 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,17 @@ -Fri Jun 14 13:01:49 2013 Nobuyoshi Nakada +Fri Jun 14 13:40:27 2013 Nobuyoshi Nakada + + * .travis.yml (before_script): update config files. + + * common.mk ($(srcdir)/tool/config.{guess,sub}): use get-config_files. + + * tool/config_files.rb: split get-config_files. * common.mk (update-config_files): rule to download config files. * tool/config.guess, tool/config.sub: remove and download from the upstream. - * tool/get-config_files: download config files from GNU. + * tool/config_files.rb: download config files from GNU. Fri Jun 14 12:21:20 2013 Nobuyoshi Nakada diff --git a/common.mk b/common.mk index a1db48b2b0..d21dda81ee 100644 --- a/common.mk +++ b/common.mk @@ -1024,9 +1024,9 @@ up:: update-config_files update-config_files: $(srcdir)/tool/config.guess $(srcdir)/tool/config.sub $(srcdir)/tool/config.guess: - $(Q) $(BASERUBY) -C $(@D) config_files.rb $(@F) + $(Q) $(BASERUBY) -C $(@D) get-config_files $(@F) $(srcdir)/tool/config.sub: - $(Q) $(BASERUBY) -C $(@D) config_files.rb $(@F) + $(Q) $(BASERUBY) -C $(@D) get-config_files $(@F) info: info-program info-libruby_a info-libruby_so info-arch info-program: diff --git a/tool/config_files.rb b/tool/config_files.rb old mode 100755 new mode 100644 index 998b8b72ec..1551589bf9 --- a/tool/config_files.rb +++ b/tool/config_files.rb @@ -1,4 +1,3 @@ -#!/usr/bin/ruby require 'open-uri' ConfigFiles = "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=%s;hb=HEAD" @@ -7,7 +6,3 @@ def ConfigFiles.download(name, dir = nil) file = dir ? File.join(dir, name) : name open(file, "wb", 0755) {|f| f.write(data)} end - -if $0 == __FILE__ - ARGV.each {|n| ConfigFiles.download(n)} -end diff --git a/tool/get-config_files b/tool/get-config_files new file mode 100755 index 0000000000..ea2020bc22 --- /dev/null +++ b/tool/get-config_files @@ -0,0 +1,3 @@ +#!/usr/bin/ruby +require File.expand_path('../config_files', __FILE__) +ARGV.each {|n| ConfigFiles.download(n)}