* include/ruby/encoding.h (rb_econv_check_error): declared.
[ruby-svn.git] / common.mk
blobd18642cb6b36e0a575e1ef6ba94eb7a1f232d575
1 bin: $(PROGRAM) $(WPROGRAM)
2 lib: $(LIBRUBY)
3 dll: $(LIBRUBY_SO)
5 .SUFFIXES: .inc .h .c .y
7 RUBYLIB = -
8 RUBYOPT = -
10 SPEC_GIT_BASE = git://github.com/rubyspec
11 MSPEC_GIT_URL = $(SPEC_GIT_BASE)/mspec.git
12 RUBYSPEC_GIT_URL = $(SPEC_GIT_BASE)/rubyspec.git
14 STATIC_RUBY = static-ruby
16 EXTCONF = extconf.rb
17 RBCONFIG = ./.rbconfig.time
18 LIBRUBY_EXTS = ./.libruby-with-ext.time
19 RDOCOUT = $(EXTOUT)/rdoc
21 DMYEXT = dmyext.$(OBJEXT)
22 NORMALMAINOBJ = main.$(OBJEXT)
23 MAINOBJ = $(NORMALMAINOBJ)
24 EXTOBJS =
25 DLDOBJS = $(DMYEXT)
26 MINIOBJS = $(ARCHMINIOBJS) dmyencoding.$(OBJEXT) miniprelude.$(OBJEXT)
28 COMMONOBJS = array.$(OBJEXT) \
29 bignum.$(OBJEXT) \
30 class.$(OBJEXT) \
31 compar.$(OBJEXT) \
32 complex.$(OBJEXT) \
33 dir.$(OBJEXT) \
34 enum.$(OBJEXT) \
35 enumerator.$(OBJEXT) \
36 error.$(OBJEXT) \
37 eval.$(OBJEXT) \
38 load.$(OBJEXT) \
39 proc.$(OBJEXT) \
40 file.$(OBJEXT) \
41 gc.$(OBJEXT) \
42 hash.$(OBJEXT) \
43 inits.$(OBJEXT) \
44 io.$(OBJEXT) \
45 marshal.$(OBJEXT) \
46 math.$(OBJEXT) \
47 numeric.$(OBJEXT) \
48 object.$(OBJEXT) \
49 pack.$(OBJEXT) \
50 parse.$(OBJEXT) \
51 process.$(OBJEXT) \
52 prec.$(OBJEXT) \
53 random.$(OBJEXT) \
54 range.$(OBJEXT) \
55 rational.$(OBJEXT) \
56 re.$(OBJEXT) \
57 regcomp.$(OBJEXT) \
58 regenc.$(OBJEXT) \
59 regerror.$(OBJEXT) \
60 regexec.$(OBJEXT) \
61 regparse.$(OBJEXT) \
62 regsyntax.$(OBJEXT) \
63 ruby.$(OBJEXT) \
64 signal.$(OBJEXT) \
65 sprintf.$(OBJEXT) \
66 st.$(OBJEXT) \
67 string.$(OBJEXT) \
68 struct.$(OBJEXT) \
69 time.$(OBJEXT) \
70 transcode.$(OBJEXT) \
71 util.$(OBJEXT) \
72 variable.$(OBJEXT) \
73 version.$(OBJEXT) \
74 blockinlining.$(OBJEXT) \
75 compile.$(OBJEXT) \
76 debug.$(OBJEXT) \
77 iseq.$(OBJEXT) \
78 vm.$(OBJEXT) \
79 vm_dump.$(OBJEXT) \
80 thread.$(OBJEXT) \
81 cont.$(OBJEXT) \
82 $(BUILTIN_ENCOBJS) \
83 $(MISSING)
85 OBJS = dln.$(OBJEXT) \
86 encoding.$(OBJEXT) \
87 prelude.$(OBJEXT) \
88 $(COMMONOBJS)
90 GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
92 PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(srcdir)/gem_prelude.rb
93 PRELUDES = prelude.c miniprelude.c golf_prelude.c
95 SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
96 --extout="$(EXTOUT)" \
97 --mflags="$(MFLAGS)" \
98 --make-flags="$(MAKEFLAGS)"
99 EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) --
100 INSTRUBY_ARGS = $(SCRIPT_ARGS) \
101 --data-mode=$(INSTALL_DATA_MODE) \
102 --prog-mode=$(INSTALL_PROG_MODE) \
103 --installed-list $(INSTALLED_LIST)
104 INSTALL_PROG_MODE = 0755
105 INSTALL_DATA_MODE = 0644
107 PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.unlink(ARGV[0]) rescue nil' -- \
108 $(LIBRUBY_EXTS) $(LIBRUBY_SO_UPDATE)
110 TESTSDIR = $(srcdir)/test
111 TESTWORKDIR = testwork
113 BOOTSTRAPRUBY = $(BASERUBY)
115 COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) -rrbconfig $(srcdir)/tool/compile_prelude.rb
117 VCS = svn
119 all: $(MKFILES) incs $(PREP) $(RBCONFIG) $(LIBRUBY) encs
120 @$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" $(EXTMK_ARGS)
121 prog: $(PROGRAM) $(WPROGRAM)
123 loadpath: $(PREP)
124 $(MINIRUBY) -e 'p $$:'
126 $(PREP): $(MKFILES)
128 miniruby$(EXEEXT): config.status $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(ARCHFILE)
130 GORUBY = go$(RUBY_INSTALL_NAME)
131 golf: $(LIBRUBY) $(GOLFOBJS)
132 $(MAKE) $(MFLAGS) MAINOBJ="$(GOLFOBJS)" PROGRAM=$(GORUBY)$(EXEEXT) program
134 program: $(PROGRAM)
136 $(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
138 $(LIBRUBY_A): $(OBJS) $(DMYEXT) $(ARCHFILE)
140 $(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE) $(BUILTIN_ENCOBJS)
142 $(LIBRUBY_EXTS):
143 @exit > $@
145 $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
146 @$(RM) $@
147 $(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS)
149 ruby.imp: $(COMMONOBJS)
150 @$(NM) -Pgp $(COMMONOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
152 install: install-nodoc $(RDOCTARGET)
153 install-all: install-nodoc install-doc
155 install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
156 pre-install-nodoc:: pre-install-local pre-install-ext
157 do-install-nodoc: $(PREP)
158 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --mantype="$(MANTYPE)"
159 post-install-nodoc:: post-install-local post-install-ext
161 install-local: pre-install-local do-install-local post-install-local
162 pre-install-local:: pre-install-bin pre-install-lib pre-install-man
163 do-install-local: $(PREP)
164 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local --mantype="$(MANTYPE)"
165 post-install-local:: post-install-bin post-install-lib post-install-man
167 install-ext: pre-install-ext do-install-ext post-install-ext
168 pre-install-ext:: pre-install-ext-arch pre-install-ext-comm
169 do-install-ext: $(PREP)
170 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext
171 post-install-ext:: post-install-ext-arch post-install-ext-comm
173 install-arch: pre-install-arch do-install-arch post-install-arch
174 pre-install-arch:: pre-install-bin pre-install-ext-arch
175 do-install-arch: $(PREP)
176 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch
177 post-install-arch:: post-install-bin post-install-ext-arch
179 install-comm: pre-install-comm do-install-comm post-install-comm
180 pre-install-comm:: pre-install-lib pre-install-ext-comm pre-install-man
181 do-install-comm: $(PREP)
182 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man
183 post-install-comm:: post-install-lib post-install-ext-comm post-install-man
185 install-bin: pre-install-bin do-install-bin post-install-bin
186 pre-install-bin:: install-prereq
187 do-install-bin: $(PREP)
188 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin
189 post-install-bin::
190 @$(NULLCMD)
192 install-lib: pre-install-lib do-install-lib post-install-lib
193 pre-install-lib:: install-prereq
194 do-install-lib: $(PREP)
195 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib
196 post-install-lib::
197 @$(NULLCMD)
199 install-ext-comm: pre-install-ext-comm do-install-ext-comm post-install-ext-comm
200 pre-install-ext-comm:: install-prereq
201 do-install-ext-comm: $(PREP)
202 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm
203 post-install-ext-comm::
204 @$(NULLCMD)
206 install-ext-arch: pre-install-ext-arch do-install-ext-arch post-install-ext-arch
207 pre-install-ext-arch:: install-prereq
208 do-install-ext-arch: $(PREP)
209 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch
210 post-install-ext-arch::
211 @$(NULLCMD)
213 install-man: pre-install-man do-install-man post-install-man
214 pre-install-man:: install-prereq
215 do-install-man: $(PREP)
216 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man --mantype="$(MANTYPE)"
217 post-install-man::
218 @$(NULLCMD)
220 what-where: no-install
221 no-install: no-install-nodoc no-install-doc
222 what-where-all: no-install-all
223 no-install-all: no-install-nodoc
225 what-where-nodoc: no-install-nodoc
226 no-install-nodoc: pre-no-install-nodoc dont-install-nodoc post-no-install-nodoc
227 pre-no-install-nodoc:: pre-no-install-local pre-no-install-ext
228 dont-install-nodoc: $(PREP)
229 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --mantype="$(MANTYPE)"
230 post-no-install-nodoc:: post-no-install-local post-no-install-ext
232 what-where-local: no-install-local
233 no-install-local: pre-no-install-local dont-install-local post-no-install-local
234 pre-no-install-local:: pre-no-install-bin pre-no-install-lib pre-no-install-man
235 dont-install-local: $(PREP)
236 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=local --mantype="$(MANTYPE)"
237 post-no-install-local:: post-no-install-bin post-no-install-lib post-no-install-man
239 what-where-ext: no-install-ext
240 no-install-ext: pre-no-install-ext dont-install-ext post-no-install-ext
241 pre-no-install-ext:: pre-no-install-ext-arch pre-no-install-ext-comm
242 dont-install-ext: $(PREP)
243 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext
244 post-no-install-ext:: post-no-install-ext-arch post-no-install-ext-comm
246 what-where-arch: no-install-arch
247 no-install-arch: pre-no-install-arch dont-install-arch post-no-install-arch
248 pre-no-install-arch:: pre-no-install-bin pre-no-install-ext-arch
249 dont-install-arch: $(PREP)
250 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch
251 post-no-install-arch:: post-no-install-lib post-no-install-man post-no-install-ext-arch
253 what-where-comm: no-install-comm
254 no-install-comm: pre-no-install-comm dont-install-comm post-no-install-comm
255 pre-no-install-comm:: pre-no-install-lib pre-no-install-ext-comm pre-no-install-man
256 dont-install-comm: $(PREP)
257 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib --install=ext-comm --install=man
258 post-no-install-comm:: post-no-install-lib post-no-install-ext-comm post-no-install-man
260 what-where-bin: no-install-bin
261 no-install-bin: pre-no-install-bin dont-install-bin post-no-install-bin
262 pre-no-install-bin:: install-prereq
263 dont-install-bin: $(PREP)
264 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin
265 post-no-install-bin::
266 @$(NULLCMD)
268 what-where-lib: no-install-lib
269 no-install-lib: pre-no-install-lib dont-install-lib post-no-install-lib
270 pre-no-install-lib:: install-prereq
271 dont-install-lib: $(PREP)
272 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=lib
273 post-no-install-lib::
274 @$(NULLCMD)
276 what-where-ext-comm: no-install-ext-comm
277 no-install-ext-comm: pre-no-install-ext-comm dont-install-ext-comm post-no-install-ext-comm
278 pre-no-install-ext-comm:: install-prereq
279 dont-install-ext-comm: $(PREP)
280 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-comm
281 post-no-install-ext-comm::
282 @$(NULLCMD)
284 what-where-ext-arch: no-install-ext-arch
285 no-install-ext-arch: pre-no-install-ext-arch dont-install-ext-arch post-no-install-ext-arch
286 pre-no-install-ext-arch:: install-prereq
287 dont-install-ext-arch: $(PREP)
288 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=ext-arch
289 post-no-install-ext-arch::
290 @$(NULLCMD)
292 what-where-man: no-install-man
293 no-install-man: pre-no-install-man dont-install-man post-no-install-man
294 pre-no-install-man:: install-prereq
295 dont-install-man: $(PREP)
296 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=man --mantype="$(MANTYPE)"
297 post-no-install-man::
298 @$(NULLCMD)
300 install-doc: rdoc pre-install-doc do-install-doc post-install-doc
301 pre-install-doc:: install-prereq
302 do-install-doc: $(PROGRAM)
303 $(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
304 post-install-doc::
305 @$(NULLCMD)
307 rdoc: $(PROGRAM) PHONY
308 @echo Generating RDoc documentation
309 $(RUNRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" "$(srcdir)"
311 what-where-doc: no-install-doc
312 no-install-doc: pre-no-install-doc dont-install-doc post-no-install-doc
313 pre-no-install-doc:: install-prereq
314 dont-install-doc:: $(PREP)
315 $(MINIRUBY) $(srcdir)/instruby.rb -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
316 post-no-install-doc::
317 @$(NULLCMD)
319 CLEAR_INSTALLED_LIST = clear-installed-list
321 install-prereq: $(CLEAR_INSTALLED_LIST)
323 clear-installed-list:
324 @exit > $(INSTALLED_LIST)
326 clean: clean-ext clean-local clean-enc
327 clean-local::
328 @$(RM) $(OBJS) $(MINIOBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES)
329 @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time
330 @$(RM) *.inc $(GOLFOBJS) y.tab.c y.output encdb.h transdb.h
331 clean-ext::
332 clean-enc:
333 @-$(MAKE) -f enc.mk $(MFLAGS) clean
335 distclean: distclean-ext distclean-local distclean-enc
336 distclean-local:: clean-local
337 @$(RM) $(MKFILES) $(arch_hdrdir)/ruby/config.h rbconfig.rb yasmdata.rb encdb.h
338 @$(RM) config.cache config.log config.status config.status.lineno $(PRELUDES)
339 @$(RM) *~ *.bak *.stackdump core *.core gmon.out $(PREP)
340 distclean-ext::
341 distclean-enc: clean-enc
342 @-$(MAKE) -f enc.mk $(MFLAGS) distclean
344 realclean:: realclean-ext realclean-local realclean-enc
345 realclean-local:: distclean-local
346 @$(RM) parse.c parse.h lex.c revision.h
347 realclean-ext::
348 realclean-enc:: distclean-enc
350 check: test test-all
352 btest: miniruby$(EXEEXT) PHONY
353 $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(MINIRUBY)" $(OPTS)
355 btest-miniruby: miniruby$(EXEEXT) $(RBCONFIG) $(PROGRAM) PHONY
356 @$(MINIRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(MINIRUBY)" -q
358 test-sample: miniruby$(EXEEXT) $(RBCONFIG) $(PROGRAM) PHONY
359 @$(MINIRUBY) $(srcdir)/rubytest.rb
361 test-knownbug: miniruby$(EXEEXT) $(PROGRAM) PHONY
362 $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM)" $(OPTS) $(srcdir)/KNOWNBUGS.rb
364 test: test-sample btest-miniruby test-knownbug
366 test-all:
367 $(RUNRUBY) "$(srcdir)/test/runner.rb" --basedir="$(TESTSDIR)" --runner=$(TESTUI) $(TESTS)
369 extconf: $(PREP)
370 $(MAKEDIRS) "$(EXTCONFDIR)"
371 $(RUNRUBY) -C "$(EXTCONFDIR)" $(EXTCONF) $(EXTCONFARGS)
373 $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP)
374 @$(MINIRUBY) $(srcdir)/mkconfig.rb -timestamp=$@ \
375 -install_name=$(RUBY_INSTALL_NAME) \
376 -so_name=$(RUBY_SO_NAME) rbconfig.rb
378 encs: enc.mk $(LIBRUBY) $(PREP) transdb.h
379 $(MAKE) -f enc.mk MINIRUBY="$(MINIRUBY)" $(MFLAGS)
381 enc.mk: $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
382 $(srcdir)/lib/mkmf.rb $(RBCONFIG)
383 $(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" $@ $(ENCS)
385 .PRECIOUS: $(MKFILES)
387 .PHONY: test install install-nodoc install-doc dist
389 PHONY:
391 {$(VPATH)}parse.c: {$(VPATH)}parse.y $(srcdir)/tool/ytab.sed
392 parse.h {$(VPATH)}parse.h: {$(VPATH)}parse.c
394 {$(srcdir)}.y.c:
395 $(YACC) -d $(YFLAGS) -o y.tab.c $(<:\\=/)
396 sed -f $(srcdir)/tool/ytab.sed -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
397 @$(MV) $@.new $@
398 sed -e "/^#/s!y\.tab\.h!$(@:.c=.h)!" y.tab.h > $(@:.c=.h).new
399 @$(IFCHANGE) $(@:.c=.h) $(@:.c=.h).new
400 @$(RM) y.tab.c y.tab.h
402 acosh.$(OBJEXT): {$(VPATH)}acosh.c
403 alloca.$(OBJEXT): {$(VPATH)}alloca.c {$(VPATH)}config.h
404 crypt.$(OBJEXT): {$(VPATH)}crypt.c
405 dup2.$(OBJEXT): {$(VPATH)}dup2.c
406 erf.$(OBJEXT): {$(VPATH)}erf.c
407 finite.$(OBJEXT): {$(VPATH)}finite.c
408 flock.$(OBJEXT): {$(VPATH)}flock.c
409 memcmp.$(OBJEXT): {$(VPATH)}memcmp.c
410 memmove.$(OBJEXT): {$(VPATH)}memmove.c
411 mkdir.$(OBJEXT): {$(VPATH)}mkdir.c
412 strchr.$(OBJEXT): {$(VPATH)}strchr.c
413 strdup.$(OBJEXT): {$(VPATH)}strdup.c
414 strerror.$(OBJEXT): {$(VPATH)}strerror.c
415 strftime.$(OBJEXT): {$(VPATH)}strftime.c
416 strstr.$(OBJEXT): {$(VPATH)}strstr.c
417 strtod.$(OBJEXT): {$(VPATH)}strtod.c
418 strtol.$(OBJEXT): {$(VPATH)}strtol.c
419 nt.$(OBJEXT): {$(VPATH)}nt.c
420 x68.$(OBJEXT): {$(VPATH)}x68.c
421 os2.$(OBJEXT): {$(VPATH)}os2.c
422 dl_os2.$(OBJEXT): {$(VPATH)}dl_os2.c
423 ia64.$(OBJEXT): {$(VPATH)}ia64.s
424 $(CC) $(CFLAGS) -c $<
426 # when I use -I., there is confliction at "OpenFile"
427 # so, set . into environment varible "include"
428 win32.$(OBJEXT): {$(VPATH)}win32.c
432 RUBY_H_INCLUDES = {$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}defines.h \
433 {$(VPATH)}intern.h {$(VPATH)}missing.h
434 ID_H_INCLUDES = {$(VPATH)}id.h {$(VPATH)}parse.h
436 array.$(OBJEXT): {$(VPATH)}array.c $(RUBY_H_INCLUDES) \
437 {$(VPATH)}st.h {$(VPATH)}util.h
438 bignum.$(OBJEXT): {$(VPATH)}bignum.c $(RUBY_H_INCLUDES) \
439 {$(VPATH)}st.h
440 class.$(OBJEXT): {$(VPATH)}class.c $(RUBY_H_INCLUDES) \
441 {$(VPATH)}st.h {$(VPATH)}signal.h {$(VPATH)}node.h \
442 {$(VPATH)}vm_core.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
443 {$(VPATH)}id.h {$(VPATH)}parse.c \
444 {$(VPATH)}thread_$(THREAD_MODEL).h
445 compar.$(OBJEXT): {$(VPATH)}compar.c $(RUBY_H_INCLUDES) \
446 {$(VPATH)}st.h
447 complex.$(OBJEXT): {$(VPATH)}complex.c $(RUBY_H_INCLUDES) \
448 {$(VPATH)}st.h
449 dir.$(OBJEXT): {$(VPATH)}dir.c $(RUBY_H_INCLUDES) \
450 {$(VPATH)}st.h {$(VPATH)}util.h
451 dln.$(OBJEXT): {$(VPATH)}dln.c $(RUBY_H_INCLUDES) \
452 {$(VPATH)}st.h {$(VPATH)}dln.h
453 dmydln.$(OBJEXT): {$(VPATH)}dmydln.c dln.$(OBJEXT)
454 dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
455 dmyencoding.$(OBJEXT): {$(VPATH)}dmyencoding.c \
456 {$(VPATH)}encoding.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
457 {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h {$(VPATH)}regenc.h
458 encoding.$(OBJEXT): dmyencoding.$(OBJEXT) {$(VPATH)}util.h
459 enum.$(OBJEXT): {$(VPATH)}enum.c $(RUBY_H_INCLUDES) \
460 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}util.h
461 enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES) \
462 {$(VPATH)}st.h {$(VPATH)}debug.h {$(VPATH)}node.h
463 error.$(OBJEXT): {$(VPATH)}error.c $(RUBY_H_INCLUDES) \
464 {$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h {$(VPATH)}node.h \
465 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
466 {$(VPATH)}thread_$(THREAD_MODEL).h
467 eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h \
468 $(RUBY_H_INCLUDES) {$(VPATH)}st.h {$(VPATH)}node.h \
469 {$(VPATH)}util.h {$(VPATH)}signal.h {$(VPATH)}vm_core.h \
470 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
471 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h \
472 {$(VPATH)}eval_error.c {$(VPATH)}eval_safe.c \
473 {$(VPATH)}eval_jump.c
474 load.$(OBJEXT): {$(VPATH)}load.c {$(VPATH)}eval_intern.h \
475 $(RUBY_H_INCLUDES) {$(VPATH)}st.h {$(VPATH)}node.h \
476 {$(VPATH)}util.h {$(VPATH)}signal.h {$(VPATH)}vm_core.h \
477 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
478 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h
479 file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) \
480 {$(VPATH)}st.h {$(VPATH)}io.h {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h \
481 {$(VPATH)}signal.h {$(VPATH)}util.h {$(VPATH)}dln.h
482 gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) \
483 {$(VPATH)}st.h {$(VPATH)}signal.h {$(VPATH)}node.h {$(VPATH)}re.h \
484 {$(VPATH)}regex.h {$(VPATH)}oniguruma.h {$(VPATH)}io.h \
485 {$(VPATH)}encoding.h {$(VPATH)}vm_core.h {$(VPATH)}debug.h \
486 {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
487 {$(VPATH)}thread_$(THREAD_MODEL).h \
488 {$(VPATH)}gc.h {$(VPATH)}eval_intern.h
489 hash.$(OBJEXT): {$(VPATH)}hash.c $(RUBY_H_INCLUDES) \
490 $(ID_H_INCLUDES) \
491 {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}signal.h
492 inits.$(OBJEXT): {$(VPATH)}inits.c $(RUBY_H_INCLUDES) \
493 {$(VPATH)}st.h
494 io.$(OBJEXT): {$(VPATH)}io.c $(RUBY_H_INCLUDES) \
495 {$(VPATH)}st.h {$(VPATH)}io.h {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h \
496 {$(VPATH)}signal.h {$(VPATH)}util.h \
497 {$(VPATH)}vm_core.h {$(VPATH)}debug.h \
498 {$(VPATH)}vm_opts.h {$(VPATH)}id.h {$(VPATH)}parse.c \
499 {$(VPATH)}thread_$(THREAD_MODEL).h
500 main.$(OBJEXT): {$(VPATH)}main.c $(RUBY_H_INCLUDES) \
501 {$(VPATH)}st.h
502 marshal.$(OBJEXT): {$(VPATH)}marshal.c $(RUBY_H_INCLUDES) \
503 {$(VPATH)}st.h {$(VPATH)}io.h {$(VPATH)}encoding.h \
504 {$(VPATH)}oniguruma.h {$(VPATH)}util.h
505 math.$(OBJEXT): {$(VPATH)}math.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h
506 numeric.$(OBJEXT): {$(VPATH)}numeric.c $(RUBY_H_INCLUDES) \
507 {$(VPATH)}st.h {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h
508 object.$(OBJEXT): {$(VPATH)}object.c $(RUBY_H_INCLUDES) \
509 {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}debug.h {$(VPATH)}node.h
510 pack.$(OBJEXT): {$(VPATH)}pack.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h
511 parse.$(OBJEXT): {$(VPATH)}parse.c {$(VPATH)}parse.y $(RUBY_H_INCLUDES) \
512 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}encoding.h \
513 {$(VPATH)}oniguruma.h $(ID_H_INCLUDES) \
514 {$(VPATH)}regenc.h {$(VPATH)}regex.h {$(VPATH)}util.h \
515 {$(VPATH)}lex.c {$(VPATH)}keywords {$(VPATH)}debug.h
516 prec.$(OBJEXT): {$(VPATH)}prec.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h
517 proc.$(OBJEXT): {$(VPATH)}proc.c {$(VPATH)}eval_intern.h \
518 $(RUBY_H_INCLUDES) {$(VPATH)}st.h {$(VPATH)}node.h \
519 {$(VPATH)}util.h {$(VPATH)}signal.h {$(VPATH)}vm_core.h \
520 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
521 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h {$(VPATH)}gc.h
522 process.$(OBJEXT): {$(VPATH)}process.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
523 {$(VPATH)}signal.h {$(VPATH)}vm_core.h {$(VPATH)}util.h \
524 {$(VPATH)}node.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
525 $(ID_H_INCLUDES) \
526 {$(VPATH)}thread_$(THREAD_MODEL).h
527 random.$(OBJEXT): {$(VPATH)}random.c $(RUBY_H_INCLUDES) \
528 {$(VPATH)}st.h
529 range.$(OBJEXT): {$(VPATH)}range.c $(RUBY_H_INCLUDES) \
530 {$(VPATH)}st.h
531 rational.$(OBJEXT): {$(VPATH)}rational.c $(RUBY_H_INCLUDES) \
532 {$(VPATH)}st.h
533 re.$(OBJEXT): {$(VPATH)}re.c $(RUBY_H_INCLUDES) \
534 {$(VPATH)}st.h {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \
535 {$(VPATH)}encoding.h {$(VPATH)}util.h {$(VPATH)}regint.h \
536 {$(VPATH)}regenc.h
537 regcomp.$(OBJEXT): {$(VPATH)}regcomp.c {$(VPATH)}regparse.h \
538 {$(VPATH)}regint.h {$(VPATH)}config.h {$(VPATH)}defines.h \
539 {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h {$(VPATH)}st.h
540 regenc.$(OBJEXT): {$(VPATH)}regenc.c {$(VPATH)}regint.h \
541 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
542 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
543 regerror.$(OBJEXT): {$(VPATH)}regerror.c {$(VPATH)}regint.h \
544 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
545 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
546 regexec.$(OBJEXT): {$(VPATH)}regexec.c {$(VPATH)}regint.h \
547 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
548 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
549 regparse.$(OBJEXT): {$(VPATH)}regparse.c {$(VPATH)}regparse.h \
550 {$(VPATH)}regint.h {$(VPATH)}config.h {$(VPATH)}defines.h \
551 {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h {$(VPATH)}st.h
552 regsyntax.$(OBJEXT): {$(VPATH)}regsyntax.c {$(VPATH)}regint.h \
553 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
554 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
555 ruby.$(OBJEXT): {$(VPATH)}ruby.c $(RUBY_H_INCLUDES) \
556 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}encoding.h \
557 {$(VPATH)}oniguruma.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
558 {$(VPATH)}signal.h {$(VPATH)}vm_core.h {$(VPATH)}debug.h \
559 {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
560 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h
561 signal.$(OBJEXT): {$(VPATH)}signal.c $(RUBY_H_INCLUDES) \
562 {$(VPATH)}st.h {$(VPATH)}signal.h {$(VPATH)}node.h {$(VPATH)}vm_core.h \
563 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
564 {$(VPATH)}thread_$(THREAD_MODEL).h
565 sprintf.$(OBJEXT): {$(VPATH)}sprintf.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
566 {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \
567 {$(VPATH)}encoding.h {$(VPATH)}vsnprintf.c
568 st.$(OBJEXT): {$(VPATH)}st.c {$(VPATH)}config.h {$(VPATH)}defines.h \
569 {$(VPATH)}st.h
570 string.$(OBJEXT): {$(VPATH)}string.c $(RUBY_H_INCLUDES) \
571 {$(VPATH)}st.h {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \
572 {$(VPATH)}encoding.h
573 struct.$(OBJEXT): {$(VPATH)}struct.c $(RUBY_H_INCLUDES) \
574 {$(VPATH)}st.h
575 thread.$(OBJEXT): {$(VPATH)}thread.c {$(VPATH)}eval_intern.h \
576 $(RUBY_H_INCLUDES) {$(VPATH)}st.h {$(VPATH)}node.h \
577 {$(VPATH)}util.h {$(VPATH)}signal.h {$(VPATH)}vm_core.h \
578 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
579 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h {$(VPATH)}vm.h \
580 {$(VPATH)}gc.h {$(VPATH)}thread_$(THREAD_MODEL).c
581 transcode.$(OBJEXT): {$(VPATH)}transcode.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
582 {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h {$(VPATH)}transcode_data.h
583 cont.$(OBJEXT): {$(VPATH)}cont.c $(RUBY_H_INCLUDES) \
584 {$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h {$(VPATH)}node.h \
585 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
586 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}gc.h \
587 {$(VPATH)}eval_intern.h {$(VPATH)}util.h {$(VPATH)}dln.h
588 time.$(OBJEXT): {$(VPATH)}time.c $(RUBY_H_INCLUDES) \
589 {$(VPATH)}st.h {$(VPATH)}encoding.h
590 util.$(OBJEXT): {$(VPATH)}util.c $(RUBY_H_INCLUDES) \
591 {$(VPATH)}st.h {$(VPATH)}util.h
592 variable.$(OBJEXT): {$(VPATH)}variable.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
593 {$(VPATH)}node.h {$(VPATH)}util.h
594 version.$(OBJEXT): {$(VPATH)}version.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
595 {$(VPATH)}version.h $(srcdir)/revision.h
597 compile.$(OBJEXT): {$(VPATH)}compile.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
598 {$(VPATH)}node.h {$(VPATH)}vm_core.h \
599 {$(VPATH)}signal.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
600 $(ID_H_INCLUDES) \
601 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}compile.h \
602 {$(VPATH)}insns.inc {$(VPATH)}insns_info.inc {$(VPATH)}optinsn.inc
603 iseq.$(OBJEXT): {$(VPATH)}iseq.c $(RUBY_H_INCLUDES) \
604 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}gc.h {$(VPATH)}vm_core.h \
605 {$(VPATH)}signal.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
606 $(ID_H_INCLUDES) \
607 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}insns.inc \
608 {$(VPATH)}insns_info.inc {$(VPATH)}node_name.inc
609 vm.$(OBJEXT): {$(VPATH)}vm.c $(RUBY_H_INCLUDES) \
610 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}encoding.h \
611 {$(VPATH)}oniguruma.h {$(VPATH)}gc.h {$(VPATH)}insnhelper.h \
612 {$(VPATH)}eval_intern.h {$(VPATH)}util.h {$(VPATH)}signal.h \
613 {$(VPATH)}vm_core.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
614 $(ID_H_INCLUDES) \
615 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h {$(VPATH)}vm.h \
616 {$(VPATH)}vm_insnhelper.c {$(VPATH)}insns.inc {$(VPATH)}vm_evalbody.c \
617 {$(VPATH)}vmtc.inc {$(VPATH)}vm.inc {$(VPATH)}insns.def \
618 {$(VPATH)}vm_method.c {$(VPATH)}vm_eval.c
619 vm_dump.$(OBJEXT): {$(VPATH)}vm_dump.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
620 {$(VPATH)}node.h {$(VPATH)}vm_core.h \
621 {$(VPATH)}signal.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
622 $(ID_H_INCLUDES) \
623 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}vm.h
624 debug.$(OBJEXT): {$(VPATH)}debug.c $(RUBY_H_INCLUDES) \
625 {$(VPATH)}st.h {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h \
626 {$(VPATH)}debug.h {$(VPATH)}node.h {$(VPATH)}vm_core.h \
627 {$(VPATH)}signal.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
628 {$(VPATH)}thread_$(THREAD_MODEL).h
629 blockinlining.$(OBJEXT): {$(VPATH)}blockinlining.c $(RUBY_H_INCLUDES) \
630 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}vm_core.h \
631 {$(VPATH)}signal.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
632 $(ID_H_INCLUDES) \
633 {$(VPATH)}thread_$(THREAD_MODEL).h
634 id.$(OBJEXT): {$(VPATH)}id.c $(RUBY_H_INCLUDES) \
635 {$(VPATH)}st.h $(ID_H_INCLUDES)
636 miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c $(RUBY_H_INCLUDES) \
637 {$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h \
638 {$(VPATH)}node.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
639 $(ID_H_INCLUDES) \
640 {$(VPATH)}thread_$(THREAD_MODEL).h
641 prelude.$(OBJEXT): {$(VPATH)}prelude.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
642 {$(VPATH)}vm_core.h {$(VPATH)}signal.h \
643 {$(VPATH)}node.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
644 $(ID_H_INCLUDES) \
645 {$(VPATH)}thread_$(THREAD_MODEL).h
646 golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.c $(RUBY_H_INCLUDES) \
647 {$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h \
648 {$(VPATH)}node.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
649 $(ID_H_INCLUDES) \
650 {$(VPATH)}thread_$(THREAD_MODEL).h
651 goruby.$(OBJEXT): {$(VPATH)}goruby.c {$(VPATH)}main.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h
653 ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
654 {$(VPATH)}defines.h {$(VPATH)}oniguruma.h
655 us_ascii.$(OBJEXT): {$(VPATH)}us_ascii.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
656 {$(VPATH)}defines.h {$(VPATH)}oniguruma.h
657 unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regint.h \
658 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
659 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
660 utf_8.$(OBJEXT): {$(VPATH)}utf_8.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
661 {$(VPATH)}defines.h {$(VPATH)}oniguruma.h
663 INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
664 vmtc.inc vm.inc
666 INSNS2VMOPT = --srcdir="$(srcdir)"
668 $(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h
669 @$(RM) $(PROGRAM)
670 $(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
672 minsns.inc: $(srcdir)/template/minsns.inc.tmpl
674 opt_sc.inc: $(srcdir)/template/opt_sc.inc.tmpl
676 optinsn.inc: $(srcdir)/template/optinsn.inc.tmpl
678 optunifs.inc: $(srcdir)/template/optunifs.inc.tmpl
680 insns.inc: $(srcdir)/template/insns.inc.tmpl
682 insns_info.inc: $(srcdir)/template/insns_info.inc.tmpl
684 vmtc.inc: $(srcdir)/template/vmtc.inc.tmpl
686 vm.inc: $(srcdir)/template/vm.inc.tmpl
688 srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c $(srcdir)/ext/ripper/ripper.c srcs-enc
690 srcs-enc: enc.mk
691 $(MAKE) -f enc.mk RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) srcs
693 incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}encdb.h {$(VPATH)}transdb.h $(srcdir)/revision.h
695 insns: $(INSNS)
697 node_name.inc: {$(VPATH)}node.h
698 $(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@
700 encdb.h: $(PREP)
701 $(MINIRUBY) $(srcdir)/enc/make_encdb.rb $@.new $(srcdir)/enc enc
702 $(IFCHANGE) "$@" "$@.new"
704 transdb.h: $(PREP) srcs-enc
705 $(MINIRUBY) $(srcdir)/enc/trans/make_transdb.rb $@.new $(srcdir)/enc/trans enc/trans
706 $(IFCHANGE) "$@" "$@.new"
708 miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb
709 $(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@
711 prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(PRELUDE_SCRIPTS) $(PREP)
712 $(COMPILE_PRELUDE) $(PRELUDE_SCRIPTS) $@
714 golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(srcdir)/prelude.rb $(srcdir)/golf_prelude.rb $(PREP)
715 $(COMPILE_PRELUDE) $(srcdir)/golf_prelude.rb $@
717 prereq: incs srcs preludes
719 preludes: {$(VPATH)}miniprelude.c
720 preludes: {$(srcdir)}golf_prelude.c
722 docs:
723 $(BASERUBY) -I$(srcdir) $(srcdir)/tool/makedocs.rb $(INSNS2VMOPT)
725 $(srcdir)/revision.h: $(REVISION_FORCE)
726 @set LC_MESSAGES=C
727 -@$(SET_LC_MESSAGES) $(VCS) info "$(@D)" | \
728 sed -n "s/.*Rev:/#define RUBY_REVISION/p" > "$@.tmp"
729 @$(IFCHANGE) "$@" "$@.tmp"
731 $(srcdir)/ext/ripper/ripper.c:
732 cd $(srcdir)/ext/ripper && exec $(MAKE) -f depend $(MFLAGS) top_srcdir=../.. srcdir=.
736 run: miniruby$(EXEEXT) PHONY
737 $(MINIRUBY) $(srcdir)/test.rb $(RUNOPT)
739 runruby: $(PROGRAM) PHONY
740 $(RUNRUBY) $(srcdir)/test.rb
742 parse: miniruby$(EXEEXT) PHONY
743 $(MINIRUBY) $(srcdir)/tool/parse.rb $(srcdir)/test.rb
745 COMPARE_RUBY = $(BASERUBY)
746 ITEM =
747 OPTS =
749 benchmark: $(PROGRAM) PHONY
750 $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \
751 --executables="$(COMPARE_RUBY); $(RUNRUBY)" \
752 --pattern='bm_' --directory=$(srcdir)/benchmark $(OPTS)
754 benchmark-each: $(PROGRAM) PHONY
755 $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \
756 --executables="$(COMPARE_RUBY); $(RUNRUBY)" \
757 --pattern=$(ITEM) --directory=$(srcdir)/benchmark $(OPTS)
759 tbench: $(PROGRAM) PHONY
760 $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \
761 --executables="$(COMPARE_RUBY); $(RUNRUBY)" \
762 --pattern='bmx_' --directory=$(srcdir)/benchmark $(OPTS)
764 aotc: $(PROGRAM) PHONY
765 ./$(PROGRAM) -I$(srcdir)/lib $(srcdir)/bin/ruby2cext $(srcdir)/test.rb
767 vmasm: vm.$(ASMEXT)
769 # vm.o : CFLAGS += -fno-crossjumping
771 run.gdb:
772 echo b ruby_debug_breakpoint > run.gdb
773 echo '# handle SIGINT nostop' >> run.gdb
774 echo '# handle SIGPIPE nostop' >> run.gdb
775 echo '# b rb_longjmp' >> run.gdb
776 echo source $(srcdir)/breakpoints.gdb >> run.gdb
777 echo source $(srcdir)/.gdbinit >> run.gdb
778 echo run >> run.gdb
780 gdb: miniruby$(EXEEXT) run.gdb PHONY
781 gdb -x run.gdb --quiet --args $(MINIRUBY) $(srcdir)/test.rb
783 # Intel VTune
785 vtune: miniruby$(EXEEXT)
786 vtl activity -c sampling -app ".\miniruby$(EXEEXT)","-I$(srcdir)/lib $(srcdir)/test.rb" run
787 vtl view -hf -mn miniruby$(EXEEXT) -sum -sort -cd
788 vtl view -ha -mn miniruby$(EXEEXT) -sum -sort -cd | $(RUNRUBY) $(srcdir)/tool/vtlh.rb > ha.lines
790 dist: $(PREP) $(PROGRAM)
791 $(SHELL) $(srcdir)/tool/make-snapshot . $(TARNAME)
794 @$(VCS) up "$(srcdir)"
795 -@$(MAKE) $(MFLAGS) REVISION_FORCE=PHONY "$(srcdir)/revision.h"
797 help: PHONY
798 @echo " Makefile of Ruby"
799 @echo ""
800 @echo "targets:"
801 @echo " all: compile ruby and extensions"
802 @echo " check: equals make test test-all"
803 @echo " test: ruby core tests"
804 @echo " test-all: all ruby tests"
805 @echo " install: install all ruby distributions"
806 @echo " install-nodoc: install without rdoc"
807 @echo " clean: clean built objects"
808 @echo " golf: for golfers"