Граф коммитов

21 Коммитов

Автор SHA1 Сообщение Дата
k0kubun 3406c5d613 Refactor ERB version checking for keyword arguments
Improving code like r62590. See r62529 for details.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27 11:12:23 +00:00
naruse b81538d259 Judge ERB version not RUBY_VERSION but ERB.version
On cross compilation, ruby command uses fake RUBY_VERSION.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-24 02:58:41 +00:00
k0kubun cc777d09f4 erb.rb: deprecate safe_level of ERB.new
Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments
(trim_mode, eoutvar) are changed to keyword arguments.
Old ways to specify arguments are deprecated and warned now.

bin/erb: deprecate -S option.

We'll remove all of deprecated ones at Ruby 2.7+.

enc/make_encmake.rb: stopped using deprecated interface
ext/etc/mkconstants.rb: ditto
ext/socket/mkconstants.rb: ditto
sample/ripper/ruby2html.rb: ditto
spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto
spec/ruby/library/erb/new_spec.rb: ditto
test/erb/test_erb.rb: ditto
test/erb/test_erb_command.rb: ditto
tool/generic_erb.rb: ditto
tool/ruby_vm/helpers/dumper.rb: ditto
tool/transcode-tblgen.rb: ditto
lib/rdoc/erbio.rb: ditto
lib/rdoc/generator/darkfish.rb: ditto

[Feature #14256]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22 13:28:25 +00:00
nobu 542e1d8bc4 make_encmake.rb: expand srcdir
* enc/make_encmake.rb: @srcdir@ in enc/Makefile.in needs to be
  expanded.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-05 15:32:20 +00:00
mame e4fa17a9b9 * enc/make_encmake.rb: the list of encoding extension libraries must
not include encinit.c itself.  It caused "undefined reference to
  Init_encinit".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-19 19:02:45 +00:00
mame e8ce2a92d3 * enc/make_encmake.rb: added --transes and --no-transes options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18 14:03:51 +00:00
nobu cf44e74092 make_encmake.rb: mandatory dbs
* enc/make_encmake.rb (target_transcoders, target_encodings):
  encdb and transdb are always mandatory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18 13:30:44 +00:00
nobu 8299027f2e make_encmake.rb: fix typo
* enc/make_encmake.rb: fix typo, and use real read filename.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 16:21:51 +00:00
nobu fb2e6803b0 enc: fix dependencies
* enc/depend (ENCOBJS): add dependencies.
* enc/make_encmake.rb (target_encodings): extract dependencies.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21 03:11:28 +00:00
yugui 3fa3f9abb9 Supports static linking of extensions and encodings again.
Fixes --with-static-linked-ext.

Patch by Google Inc. [ruby-core:45073].

* Makefile.in (ENCOBJS, EXTOBJS): New variables to specify static
  linked libraries. Also reintroduces extinit.o, introduces encinit.o
  introduces encinit.o

* common.mk: Builds static libraries rather than shared objects if
  specified.

* configure.in (LD): new substitution. 
  Avoids PIE if s

* enc/depend: Supports static linked libraries
  (libencs, libenc, libtrans): New target.

* enc/encinit.c.erb: new template to generate the initialization of
  statically linked encodings.

* enc/make_encmake.rb (--module): new flag to specify whether static
  or dynamic.

* transcode_data.h (TRANS_INIT): New macro to get rid of the name
  collision of encoding initializers and transcoder initializers.

* ext/extmk.rb: Fixes the behavior on $extstatic is true.

* lib/mkmf.rb (clean-static): new target to clean up static linked
  libraries.

* ruby.c (process_options): New initializes statically linked
  encodings here.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-16 05:39:06 +00:00
nobu 023eab5201 * win32/Makefile.sub (MAKEDIRS): should not include silent flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-17 09:38:38 +00:00
nobu a0136f4f27 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-07 13:29:44 +00:00
akr 2c78899641 * configure.in (BUILTIN_TRANSSRCS): defined.
(BUILTIN_TRANSOBJS): defined.

* enc/Makefile.in (BUILTIN_TRANSES): defined.

* enc/make_encmake.rb (BUILTIN_TRANSES): defined.

* enc/depend: don't generate rules for builtin transcoders.

* common.mk (COMMONOBJS): add BUILTIN_TRANSOBJS.
  (enc.mk): pass BUILTIN_TRANSOBJS.
  (newline.c): new rule.
  (newline.$(OBJEXT)): new ru.e
  (srcs): newline.c added.

* Makefile.in (BUILTIN_TRANSSRCS): defined.
  (BUILTIN_TRANSOBJS): defined.

* transcode.c (Init_transcode): call Init_newline.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24 15:58:43 +00:00
nobu 13f1418d54 * enc/Makefile.in (.SUFFIXES): renamed to .trans.
* enc/make_encmake.rb: added --encs and --no-encs options.

* enc/depend (TRANSVPATH): fix for nmake.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:25:14 +00:00
nobu 9d014dc254 * ext/extmk.rb, enc/make_encmake.rb: load current mkmf.rb even if
cross-compiling.

* ext/extmk.rb, enc/make_encmake.rb, lib/mkmf.rb: need to be 1.8
  compatible for cross-compiling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26 18:56:00 +00:00
nobu 8d292a08df * Makefile.in, configure.in, lib/mkmf.rb, */Makefile.sub: specify
compiled output file name explicitly.

* enc/Makefile.in, enc/depend: now makes compiler to put generated
  files under directories corresnponding to the each source.
  enc/trans supported.

* enc/make_encmake.rb: evaluates depend file before Makefile.in so
  that the former can influence to CONFIG.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 03:49:56 +00:00
nobu cd42707d86 * enc/depend, enc/make_encmake.rb: use erb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 18:35:53 +00:00
nobu dc4d4b3923 * common.mk (enc.mk): depends on rbconfig.rb.
* regenc.h (OnigEncodingDefine): external encoding definition macro.

* enc/Makefile.in: fix for linking.

* enc/depend, enc/make_encmake.rb: fix for Windows.


* enc/{ascii,euc_jp,sjis,utf8,iso_8859_{1..16}}.c: renamed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20 08:07:56 +00:00
nobu c611b6d0cc * configure.in (BUILTIN_ENCS): removed.
* common.mk (enc.mk): pass BUILTIN_ENCS from command line.

* enc/depend: ditto.

* enc/make_encmake.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17 17:30:57 +00:00
nobu 6ed9bdd463 * common.mk (encs): added dependencies.
* enc/Makefile.in, enc/depend, enc/make_encmake.rb: moved serb code.

* lib/mkmf.rb (depend_rules): now takes content string, not file name.

* win32/enc-setup.mak: overrides default target.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17 16:15:46 +00:00
nobu b2d9f1e9d0 * common.mk (encs): new target to compile external encodings.
* enc/Makefile.in: became a serb template.

* enc/make_encmake.rb: creates enc.mk from enc/Makefile.in using serb.

* lib/mkmf.rb (relative_from): moved from ext/extmk.rb.

* lib/mkmf.rb ($extmk): true if under to top source directory, not
  only ext.

* lib/mkmf.rb (depend_rules): extracted from create_makefile.

* tool/serb.rb (serb): splitted from tool/compile_prelude.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17 08:47:28 +00:00