trenni 3.13.0 → 3.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/ext/trenni/escape.c +2 -0
  3. data/ext/trenni/extconf.rb +0 -0
  4. data/ext/trenni/trenni.c +7 -0
  5. data/lib/trenni/native.rb +1 -1
  6. data/lib/trenni/template.rb +7 -2
  7. data/lib/trenni/version.rb +1 -1
  8. metadata +7 -70
  9. data/ext/Rakefile +0 -19
  10. data/ext/tmp/x86_64-linux/lib/trenni/trenni.so +0 -0
  11. data/ext/tmp/x86_64-linux/trenni/2.4.0/Makefile +0 -263
  12. data/ext/tmp/x86_64-linux/trenni/2.4.0/escape.o +0 -0
  13. data/ext/tmp/x86_64-linux/trenni/2.4.0/markup.o +0 -0
  14. data/ext/tmp/x86_64-linux/trenni/2.4.0/mkmf.log +0 -108
  15. data/ext/tmp/x86_64-linux/trenni/2.4.0/tag.o +0 -0
  16. data/ext/tmp/x86_64-linux/trenni/2.4.0/template.o +0 -0
  17. data/ext/tmp/x86_64-linux/trenni/2.4.0/trenni.o +0 -0
  18. data/ext/tmp/x86_64-linux/trenni/2.4.0/trenni.so +0 -0
  19. data/ext/tmp/x86_64-linux/trenni/2.7.0/Makefile +0 -266
  20. data/ext/tmp/x86_64-linux/trenni/2.7.0/escape.o +0 -0
  21. data/ext/tmp/x86_64-linux/trenni/2.7.0/markup.o +0 -0
  22. data/ext/tmp/x86_64-linux/trenni/2.7.0/mkmf.log +0 -113
  23. data/ext/tmp/x86_64-linux/trenni/2.7.0/query.o +0 -0
  24. data/ext/tmp/x86_64-linux/trenni/2.7.0/tag.o +0 -0
  25. data/ext/tmp/x86_64-linux/trenni/2.7.0/template.o +0 -0
  26. data/ext/tmp/x86_64-linux/trenni/2.7.0/trenni.o +0 -0
  27. data/ext/tmp/x86_64-linux/trenni/2.7.0/trenni.so +0 -0
  28. data/ext/tmp/x86_64-linux/trenni/2.7.1/Makefile +0 -266
  29. data/ext/tmp/x86_64-linux/trenni/2.7.1/escape.o +0 -0
  30. data/ext/tmp/x86_64-linux/trenni/2.7.1/markup.o +0 -0
  31. data/ext/tmp/x86_64-linux/trenni/2.7.1/mkmf.log +0 -113
  32. data/ext/tmp/x86_64-linux/trenni/2.7.1/query.o +0 -0
  33. data/ext/tmp/x86_64-linux/trenni/2.7.1/tag.o +0 -0
  34. data/ext/tmp/x86_64-linux/trenni/2.7.1/template.o +0 -0
  35. data/ext/tmp/x86_64-linux/trenni/2.7.1/trenni.o +0 -0
  36. data/ext/tmp/x86_64-linux/trenni/2.7.1/trenni.so +0 -0
  37. data/lib/trenni/fallback/markup.rl.dot +0 -278
  38. data/lib/trenni/fallback/markup.rl.pdf +0 -0
  39. data/lib/trenni/fallback/query.rl.dot +0 -54
  40. data/lib/trenni/fallback/query.rl.pdf +0 -0
  41. data/lib/trenni/fallback/template.rl.dot +0 -270
  42. data/lib/trenni/fallback/template.rl.pdf +0 -0
  43. data/lib/trenni/trenni.so +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da3b501fe924214fa832ee9d8e66bc162318e20907d8f66e25e82400ed37fb7b
4
- data.tar.gz: ac5611a7572697fe05d1bef571f78c17a3067dc9382362188ce46626a2ca7543
3
+ metadata.gz: 94d07be2c22bb5d35c93cf3feb50e846ce3e840dd30f5a4e6e33206eebdc471a
4
+ data.tar.gz: fc31d594774651abff20965e543e7102627f50aad0984a62f0f139103cbd2245
5
5
  SHA512:
6
- metadata.gz: a4efb7f90d9030a0239e3600f7ae971479183a93b1808694648d86ac7364d142f9a94fd77e673b7fe1e179c5c07549cd9303e8555b22555532b2279427bcadb1
7
- data.tar.gz: 2c3bd0c40aff707e27e8d1287b7bd7b2aa13ac2d5c8f74e3d7d38c7674b53bda6158204eeabb2558237307313aa4e1b1cfce1c4c291b6200e6abcdb7dffeb593
6
+ metadata.gz: 31e1497e7884b60eecf03bbe9a3287ac7b29eb701c922218b4233a897ff6c50d3d11c3728d091e2b9743b5c9cc3c9d25882c97ddfe223d4267df0a3820f559bc
7
+ data.tar.gz: 0b20efedc9098d9d91215b6cf68840f109f1b25a6e7b7594df0b7ba773eacddeb09e4270879529349e3c5a59db78f0394d614fa152f0f63fd2c4d51cc1be42ad
data/ext/trenni/escape.c CHANGED
@@ -137,6 +137,8 @@ VALUE Trenni_Markup_escape_string(VALUE self, VALUE string) {
137
137
 
138
138
  void Init_trenni_escape() {
139
139
  rb_Trenni_MarkupString = rb_define_class_under(rb_Trenni, "MarkupString", rb_cString);
140
+ rb_gc_register_mark_object(rb_Trenni_MarkupString);
141
+
140
142
  rb_include_module(rb_Trenni_MarkupString, rb_Trenni_Markup);
141
143
 
142
144
  rb_undef_method(rb_class_of(rb_Trenni_Markup), "escape_string");
File without changes
data/ext/trenni/trenni.c CHANGED
@@ -48,18 +48,25 @@ void Init_trenni() {
48
48
  id_is_a = rb_intern("is_a?");
49
49
 
50
50
  rb_Trenni = rb_define_module("Trenni");
51
+ rb_gc_register_mark_object(rb_Trenni);
52
+
51
53
  rb_Trenni_Markup = rb_define_module_under(rb_Trenni, "Markup");
54
+ rb_gc_register_mark_object(rb_Trenni_Markup);
55
+
52
56
  rb_Trenni_Native = rb_define_module_under(rb_Trenni, "Native");
57
+ rb_gc_register_mark_object(rb_Trenni_Native);
53
58
 
54
59
  Init_trenni_escape();
55
60
 
56
61
  rb_Trenni_ParseError = rb_const_get_at(rb_Trenni, rb_intern("ParseError"));
62
+ rb_gc_register_mark_object(rb_Trenni_ParseError);
57
63
 
58
64
  rb_define_module_function(rb_Trenni_Native, "parse_markup", Trenni_Native_parse_markup, 3);
59
65
  rb_define_module_function(rb_Trenni_Native, "parse_template", Trenni_Native_parse_template, 2);
60
66
  rb_define_module_function(rb_Trenni_Native, "parse_query", Trenni_Native_parse_query, 2);
61
67
 
62
68
  rb_Trenni_Tag = rb_const_get_at(rb_Trenni, rb_intern("Tag"));
69
+ rb_gc_register_mark_object(rb_Trenni_Tag);
63
70
 
64
71
  Init_trenni_tag();
65
72
  }
data/lib/trenni/native.rb CHANGED
@@ -27,7 +27,7 @@ require_relative 'tag'
27
27
 
28
28
  begin
29
29
  # Load native code:
30
- require_relative 'trenni'
30
+ require 'trenni/trenni'
31
31
  rescue LoadError
32
32
  warn "Could not load native implementation: #{$!}" if $VERBOSE
33
33
  end unless ENV['TRENNI_PREFER_FALLBACK']
@@ -22,6 +22,7 @@
22
22
 
23
23
  require_relative 'parsers'
24
24
  require_relative 'markup'
25
+ require_relative 'buffer'
25
26
 
26
27
  module Trenni
27
28
  # The output variable that will be used in templates:
@@ -85,8 +86,12 @@ module Trenni
85
86
  end
86
87
  end
87
88
 
88
- def self.load_file(path, *args)
89
- self.new(FileBuffer.new(path), *args).freeze
89
+ def self.load_file(path, **options)
90
+ self.new(FileBuffer.new(path), **options).freeze
91
+ end
92
+
93
+ def self.load(string, *arguments, **options)
94
+ self.new(Buffer.new(string), **options).freeze
90
95
  end
91
96
 
92
97
  # @param binding [Binding] The binding in which the template is compiled. e.g. `TOPLEVEL_BINDING`.
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module Trenni
24
- VERSION = "3.13.0"
24
+ VERSION = "3.14.0"
25
25
  end
metadata CHANGED
@@ -1,45 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trenni
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.0
4
+ version: 3.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-17 00:00:00.000000000 Z
11
+ date: 2022-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake-compiler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bake-bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: bake-modernize
14
+ name: bake
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
17
  - - ">="
@@ -98,39 +70,11 @@ description:
98
70
  email:
99
71
  executables: []
100
72
  extensions:
101
- - ext/Rakefile
73
+ - ext/trenni/extconf.rb
102
74
  extra_rdoc_files: []
103
75
  files:
104
76
  - bake/trenni/entities.rb
105
77
  - bake/trenni/parsers.rb
106
- - ext/Rakefile
107
- - ext/tmp/x86_64-linux/lib/trenni/trenni.so
108
- - ext/tmp/x86_64-linux/trenni/2.4.0/Makefile
109
- - ext/tmp/x86_64-linux/trenni/2.4.0/escape.o
110
- - ext/tmp/x86_64-linux/trenni/2.4.0/markup.o
111
- - ext/tmp/x86_64-linux/trenni/2.4.0/mkmf.log
112
- - ext/tmp/x86_64-linux/trenni/2.4.0/tag.o
113
- - ext/tmp/x86_64-linux/trenni/2.4.0/template.o
114
- - ext/tmp/x86_64-linux/trenni/2.4.0/trenni.o
115
- - ext/tmp/x86_64-linux/trenni/2.4.0/trenni.so
116
- - ext/tmp/x86_64-linux/trenni/2.7.0/Makefile
117
- - ext/tmp/x86_64-linux/trenni/2.7.0/escape.o
118
- - ext/tmp/x86_64-linux/trenni/2.7.0/markup.o
119
- - ext/tmp/x86_64-linux/trenni/2.7.0/mkmf.log
120
- - ext/tmp/x86_64-linux/trenni/2.7.0/query.o
121
- - ext/tmp/x86_64-linux/trenni/2.7.0/tag.o
122
- - ext/tmp/x86_64-linux/trenni/2.7.0/template.o
123
- - ext/tmp/x86_64-linux/trenni/2.7.0/trenni.o
124
- - ext/tmp/x86_64-linux/trenni/2.7.0/trenni.so
125
- - ext/tmp/x86_64-linux/trenni/2.7.1/Makefile
126
- - ext/tmp/x86_64-linux/trenni/2.7.1/escape.o
127
- - ext/tmp/x86_64-linux/trenni/2.7.1/markup.o
128
- - ext/tmp/x86_64-linux/trenni/2.7.1/mkmf.log
129
- - ext/tmp/x86_64-linux/trenni/2.7.1/query.o
130
- - ext/tmp/x86_64-linux/trenni/2.7.1/tag.o
131
- - ext/tmp/x86_64-linux/trenni/2.7.1/template.o
132
- - ext/tmp/x86_64-linux/trenni/2.7.1/trenni.o
133
- - ext/tmp/x86_64-linux/trenni/2.7.1/trenni.so
134
78
  - ext/trenni/escape.c
135
79
  - ext/trenni/escape.h
136
80
  - ext/trenni/extconf.rb
@@ -155,16 +99,10 @@ files:
155
99
  - lib/trenni/error.rb
156
100
  - lib/trenni/fallback/markup.rb
157
101
  - lib/trenni/fallback/markup.rl
158
- - lib/trenni/fallback/markup.rl.dot
159
- - lib/trenni/fallback/markup.rl.pdf
160
102
  - lib/trenni/fallback/query.rb
161
103
  - lib/trenni/fallback/query.rl
162
- - lib/trenni/fallback/query.rl.dot
163
- - lib/trenni/fallback/query.rl.pdf
164
104
  - lib/trenni/fallback/template.rb
165
105
  - lib/trenni/fallback/template.rl
166
- - lib/trenni/fallback/template.rl.dot
167
- - lib/trenni/fallback/template.rl.pdf
168
106
  - lib/trenni/markup.rb
169
107
  - lib/trenni/native.rb
170
108
  - lib/trenni/parse_delegate.rb
@@ -174,7 +112,6 @@ files:
174
112
  - lib/trenni/strings.rb
175
113
  - lib/trenni/tag.rb
176
114
  - lib/trenni/template.rb
177
- - lib/trenni/trenni.so
178
115
  - lib/trenni/uri.rb
179
116
  - lib/trenni/version.rb
180
117
  - parsers/trenni/entities.rl
@@ -219,16 +156,16 @@ require_paths:
219
156
  - lib
220
157
  required_ruby_version: !ruby/object:Gem::Requirement
221
158
  requirements:
222
- - - "~>"
159
+ - - ">="
223
160
  - !ruby/object:Gem::Version
224
- version: '2.4'
161
+ version: '2.5'
225
162
  required_rubygems_version: !ruby/object:Gem::Requirement
226
163
  requirements:
227
164
  - - ">="
228
165
  - !ruby/object:Gem::Version
229
166
  version: '0'
230
167
  requirements: []
231
- rubygems_version: 3.1.2
168
+ rubygems_version: 3.3.7
232
169
  signing_key:
233
170
  specification_version: 4
234
171
  summary: A fast native templating system that compiles directly to Ruby code.
data/ext/Rakefile DELETED
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- spec_path = File.expand_path('../trenni.gemspec', Dir.pwd)
4
- spec = Gem::Specification.load(spec_path)
5
-
6
- require "rake/extensiontask"
7
-
8
- unless RUBY_PLATFORM =~ /java/
9
- Rake::ExtensionTask.new("trenni") do |ext|
10
- ext.ext_dir = 'trenni'
11
- ext.lib_dir = '../lib/trenni'
12
- end
13
- else
14
- task :compile do
15
- puts "Nothing to compile for this platform."
16
- end
17
- end
18
-
19
- task :default => :compile
@@ -1,263 +0,0 @@
1
-
2
- SHELL = /bin/sh
3
-
4
- # V=0 quiet, V=1 verbose. other values don't work.
5
- V = 0
6
- Q1 = $(V:1=)
7
- Q = $(Q1:0=@)
8
- ECHO1 = $(V:1=@ :)
9
- ECHO = $(ECHO1:0=@ echo)
10
- NULLCMD = :
11
-
12
- #### Start of system configuration section. ####
13
-
14
- srcdir = ../../../../trenni
15
- topdir = /home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0
16
- hdrdir = $(topdir)
17
- arch_hdrdir = /home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-linux
18
- PATH_SEPARATOR = :
19
- VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
20
- prefix = $(DESTDIR)/home/samuel/.rvm/rubies/ruby-2.4.0
21
- rubysitearchprefix = $(rubylibprefix)/$(sitearch)
22
- rubyarchprefix = $(rubylibprefix)/$(arch)
23
- rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
24
- exec_prefix = $(prefix)
25
- vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
26
- sitearchhdrdir = $(sitehdrdir)/$(sitearch)
27
- rubyarchhdrdir = $(rubyhdrdir)/$(arch)
28
- vendorhdrdir = $(rubyhdrdir)/vendor_ruby
29
- sitehdrdir = $(rubyhdrdir)/site_ruby
30
- rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
- vendorarchdir = $(vendorlibdir)/$(sitearch)
32
- vendorlibdir = $(vendordir)/$(ruby_version)
33
- vendordir = $(rubylibprefix)/vendor_ruby
34
- sitearchdir = $(sitelibdir)/$(sitearch)
35
- sitelibdir = $(sitedir)/$(ruby_version)
36
- sitedir = $(rubylibprefix)/site_ruby
37
- rubyarchdir = $(rubylibdir)/$(arch)
38
- rubylibdir = $(rubylibprefix)/$(ruby_version)
39
- sitearchincludedir = $(includedir)/$(sitearch)
40
- archincludedir = $(includedir)/$(arch)
41
- sitearchlibdir = $(libdir)/$(sitearch)
42
- archlibdir = $(libdir)/$(arch)
43
- ridir = $(datarootdir)/$(RI_BASE_NAME)
44
- mandir = $(datarootdir)/man
45
- localedir = $(datarootdir)/locale
46
- libdir = $(exec_prefix)/lib
47
- psdir = $(docdir)
48
- pdfdir = $(docdir)
49
- dvidir = $(docdir)
50
- htmldir = $(docdir)
51
- infodir = $(datarootdir)/info
52
- docdir = $(datarootdir)/doc/$(PACKAGE)
53
- oldincludedir = $(DESTDIR)/usr/include
54
- includedir = $(prefix)/include
55
- localstatedir = $(prefix)/var
56
- sharedstatedir = $(prefix)/com
57
- sysconfdir = $(prefix)/etc
58
- datadir = $(datarootdir)
59
- datarootdir = $(prefix)/share
60
- libexecdir = $(exec_prefix)/libexec
61
- sbindir = $(exec_prefix)/sbin
62
- bindir = $(exec_prefix)/bin
63
- archdir = $(rubyarchdir)
64
-
65
-
66
- CC = gcc
67
- CXX = g++
68
- LIBRUBY = $(LIBRUBY_SO)
69
- LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
70
- LIBRUBYARG_SHARED = -Wl,-R$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)
71
- LIBRUBYARG_STATIC = -Wl,-R$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static
72
- empty =
73
- OUTFLAG = -o $(empty)
74
- COUTFLAG = -o $(empty)
75
- CSRCFLAG = $(empty)
76
-
77
- RUBY_EXTCONF_H =
78
- cflags = $(optflags) $(debugflags) $(warnflags)
79
- cxxflags = $(optflags) $(debugflags) $(warnflags)
80
- optflags = -O3 -fno-fast-math
81
- debugflags = -ggdb3
82
- warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized
83
- CCDLFLAGS = -fPIC
84
- CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC -O3 -std=c99 $(ARCH_FLAG)
85
- INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
86
- DEFS =
87
- CPPFLAGS = -DHAVE_RB_SYM2STR -DHAVE_RB_STR_CAT_CSTR $(DEFS) $(cppflags)
88
- CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
89
- ldflags = -L. -fstack-protector -rdynamic -Wl,-export-dynamic
90
- dldflags = -Wl,--compress-debug-sections=zlib
91
- ARCH_FLAG =
92
- DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
93
- LDSHARED = $(CC) -shared
94
- LDSHAREDXX = $(CXX) -shared
95
- AR = ar
96
- EXEEXT =
97
-
98
- RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
99
- RUBY_SO_NAME = ruby
100
- RUBYW_INSTALL_NAME =
101
- RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
102
- RUBYW_BASE_NAME = rubyw
103
- RUBY_BASE_NAME = ruby
104
-
105
- arch = x86_64-linux
106
- sitearch = $(arch)
107
- ruby_version = 2.4.0
108
- ruby = $(bindir)/$(RUBY_BASE_NAME)
109
- RUBY = $(ruby)
110
- ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
111
-
112
- RM = rm -f
113
- RM_RF = $(RUBY) -run -e rm -- -rf
114
- RMDIRS = rmdir --ignore-fail-on-non-empty -p
115
- MAKEDIRS = /usr/bin/mkdir -p
116
- INSTALL = /usr/bin/install -c
117
- INSTALL_PROG = $(INSTALL) -m 0755
118
- INSTALL_DATA = $(INSTALL) -m 644
119
- COPY = cp
120
- TOUCH = exit >
121
-
122
- #### End of system configuration section. ####
123
-
124
- preload =
125
- libpath = . $(libdir)
126
- LIBPATH = -L. -L$(libdir) -Wl,-R$(libdir)
127
- DEFFILE =
128
-
129
- CLEANFILES = mkmf.log
130
- DISTCLEANFILES =
131
- DISTCLEANDIRS =
132
-
133
- extout =
134
- extout_prefix =
135
- target_prefix = /trenni
136
- LOCAL_LIBS =
137
- LIBS = $(LIBRUBYARG_SHARED) -lpthread -lgmp -ldl -lcrypt -lm -lc
138
- ORIG_SRCS = escape.c markup.c tag.c template.c trenni.c
139
- SRCS = $(ORIG_SRCS)
140
- OBJS = escape.o markup.o tag.o template.o trenni.o
141
- HDRS = $(srcdir)/tag.h $(srcdir)/trenni.h $(srcdir)/markup.h $(srcdir)/escape.h $(srcdir)/template.h
142
- LOCAL_HDRS =
143
- TARGET = trenni
144
- TARGET_NAME = trenni
145
- TARGET_ENTRY = Init_$(TARGET_NAME)
146
- DLLIB = $(TARGET).so
147
- EXTSTATIC =
148
- STATIC_LIB =
149
-
150
- TIMESTAMP_DIR = .
151
- BINDIR = $(bindir)
152
- RUBYCOMMONDIR = $(sitedir)$(target_prefix)
153
- RUBYLIBDIR = $(sitelibdir)$(target_prefix)
154
- RUBYARCHDIR = $(sitearchdir)$(target_prefix)
155
- HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
156
- ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
157
- TARGET_SO_DIR =
158
- TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
159
- CLEANLIBS = $(TARGET_SO)
160
- CLEANOBJS = *.o *.bak
161
-
162
- all: $(DLLIB)
163
- static: $(STATIC_LIB) install-rb
164
- .PHONY: all install static install-so install-rb
165
- .PHONY: clean clean-so clean-static clean-rb
166
-
167
- clean-static::
168
- clean-rb-default::
169
- clean-rb::
170
- clean-so::
171
- clean: clean-so clean-static clean-rb-default clean-rb
172
- -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
173
-
174
- distclean-rb-default::
175
- distclean-rb::
176
- distclean-so::
177
- distclean-static::
178
- distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
179
- -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
180
- -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
181
- -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
182
-
183
- realclean: distclean
184
- install: install-so install-rb
185
-
186
- install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.-.trenni.time
187
- $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
188
- clean-static::
189
- -$(Q)$(RM) $(STATIC_LIB)
190
- install-rb: pre-install-rb do-install-rb install-rb-default
191
- install-rb-default: pre-install-rb-default do-install-rb-default
192
- pre-install-rb: Makefile
193
- pre-install-rb-default: Makefile
194
- do-install-rb:
195
- do-install-rb-default:
196
- pre-install-rb-default:
197
- @$(NULLCMD)
198
- $(TIMESTAMP_DIR)/.sitearchdir.-.trenni.time:
199
- $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
200
- $(Q) $(TOUCH) $@
201
-
202
- site-install: site-install-so site-install-rb
203
- site-install-so: install-so
204
- site-install-rb: install-rb
205
-
206
- .SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
207
-
208
- .cc.o:
209
- $(ECHO) compiling $(<)
210
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
211
-
212
- .cc.S:
213
- $(ECHO) translating $(<)
214
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
215
-
216
- .mm.o:
217
- $(ECHO) compiling $(<)
218
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
219
-
220
- .mm.S:
221
- $(ECHO) translating $(<)
222
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
223
-
224
- .cxx.o:
225
- $(ECHO) compiling $(<)
226
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
227
-
228
- .cxx.S:
229
- $(ECHO) translating $(<)
230
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
231
-
232
- .cpp.o:
233
- $(ECHO) compiling $(<)
234
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
235
-
236
- .cpp.S:
237
- $(ECHO) translating $(<)
238
- $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
239
-
240
- .c.o:
241
- $(ECHO) compiling $(<)
242
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
243
-
244
- .c.S:
245
- $(ECHO) translating $(<)
246
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
247
-
248
- .m.o:
249
- $(ECHO) compiling $(<)
250
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
251
-
252
- .m.S:
253
- $(ECHO) translating $(<)
254
- $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
255
-
256
- $(TARGET_SO): $(OBJS) Makefile
257
- $(ECHO) linking shared-object trenni/$(DLLIB)
258
- -$(Q)$(RM) $(@)
259
- $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
260
-
261
-
262
-
263
- $(OBJS): $(HDRS) $(ruby_headers)
@@ -1,108 +0,0 @@
1
- have_func: checking for rb_sym2str()... -------------------- yes
2
-
3
- "gcc -o conftest -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-linux -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/backward -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0 -I../../../../trenni -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized -fPIC -O3 -std=c99 conftest.c -L. -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc"
4
- checked program was:
5
- /* begin */
6
- 1: #include "ruby.h"
7
- 2:
8
- 3: int main(int argc, char **argv)
9
- 4: {
10
- 5: return 0;
11
- 6: }
12
- /* end */
13
-
14
- "gcc -o conftest -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-linux -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/backward -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0 -I../../../../trenni -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized -fPIC -O3 -std=c99 conftest.c -L. -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc"
15
- checked program was:
16
- /* begin */
17
- 1: #include "ruby.h"
18
- 2:
19
- 3: /*top*/
20
- 4: extern int t(void);
21
- 5: int main(int argc, char **argv)
22
- 6: {
23
- 7: if (argc > 1000000) {
24
- 8: printf("%p", &t);
25
- 9: }
26
- 10:
27
- 11: return 0;
28
- 12: }
29
- 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_sym2str; return !p; }
30
- /* end */
31
-
32
- --------------------
33
-
34
- have_func: checking for rb_str_cat_cstr()... -------------------- yes
35
-
36
- "gcc -o conftest -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-linux -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/backward -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0 -I../../../../trenni -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized -fPIC -O3 -std=c99 conftest.c -L. -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc"
37
- checked program was:
38
- /* begin */
39
- 1: #include "ruby.h"
40
- 2:
41
- 3: /*top*/
42
- 4: extern int t(void);
43
- 5: int main(int argc, char **argv)
44
- 6: {
45
- 7: if (argc > 1000000) {
46
- 8: printf("%p", &t);
47
- 9: }
48
- 10:
49
- 11: return 0;
50
- 12: }
51
- 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_cat_cstr; return !p; }
52
- /* end */
53
-
54
- --------------------
55
-
56
- have_func: checking for rb_str_reserve()... -------------------- no
57
-
58
- "gcc -o conftest -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-linux -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/backward -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0 -I../../../../trenni -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized -fPIC -O3 -std=c99 conftest.c -L. -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc"
59
- conftest.c: In function ‘t’:
60
- conftest.c:13:57: error: ‘rb_str_reserve’ undeclared (first use in this function)
61
- int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_reserve; return !p; }
62
- ^~~~~~~~~~~~~~
63
- conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
64
- conftest.c: At top level:
65
- cc1: warning: unrecognized command line option ‘-Wno-self-assign’
66
- cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
67
- cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
68
- checked program was:
69
- /* begin */
70
- 1: #include "ruby.h"
71
- 2:
72
- 3: /*top*/
73
- 4: extern int t(void);
74
- 5: int main(int argc, char **argv)
75
- 6: {
76
- 7: if (argc > 1000000) {
77
- 8: printf("%p", &t);
78
- 9: }
79
- 10:
80
- 11: return 0;
81
- 12: }
82
- 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_reserve; return !p; }
83
- /* end */
84
-
85
- "gcc -o conftest -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/x86_64-linux -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/backward -I/home/samuel/.rvm/rubies/ruby-2.4.0/include/ruby-2.4.0 -I../../../../trenni -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized -fPIC -O3 -std=c99 conftest.c -L. -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/samuel/.rvm/rubies/ruby-2.4.0/lib -L/home/samuel/.rvm/rubies/ruby-2.4.0/lib -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc"
86
- /tmp/ccpH7HyN.o: In function `t':
87
- /home/samuel/Documents/Programming/ioquatix/trenni/ext/tmp/x86_64-linux/trenni/2.4.0/conftest.c:14: undefined reference to `rb_str_reserve'
88
- collect2: error: ld returned 1 exit status
89
- checked program was:
90
- /* begin */
91
- 1: #include "ruby.h"
92
- 2:
93
- 3: /*top*/
94
- 4: extern int t(void);
95
- 5: int main(int argc, char **argv)
96
- 6: {
97
- 7: if (argc > 1000000) {
98
- 8: printf("%p", &t);
99
- 9: }
100
- 10:
101
- 11: return 0;
102
- 12: }
103
- 13: extern void rb_str_reserve();
104
- 14: int t(void) { rb_str_reserve(); return 0; }
105
- /* end */
106
-
107
- --------------------
108
-