* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / common.mk
blob33a5f0bbcda31b859c8fb7e7a72ba0f5fe8df74a
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 {$(VPATH)}config.h: config.status
433 RUBY_H_INCLUDES = {$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}defines.h \
434 {$(VPATH)}intern.h {$(VPATH)}missing.h
435 ID_H_INCLUDES = {$(VPATH)}id.h {$(VPATH)}parse.h
437 array.$(OBJEXT): {$(VPATH)}array.c $(RUBY_H_INCLUDES) \
438 {$(VPATH)}st.h {$(VPATH)}util.h
439 bignum.$(OBJEXT): {$(VPATH)}bignum.c $(RUBY_H_INCLUDES) \
440 {$(VPATH)}st.h
441 class.$(OBJEXT): {$(VPATH)}class.c $(RUBY_H_INCLUDES) \
442 {$(VPATH)}st.h {$(VPATH)}signal.h {$(VPATH)}node.h \
443 {$(VPATH)}vm_core.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
444 {$(VPATH)}id.h {$(VPATH)}parse.c \
445 {$(VPATH)}thread_$(THREAD_MODEL).h
446 compar.$(OBJEXT): {$(VPATH)}compar.c $(RUBY_H_INCLUDES) \
447 {$(VPATH)}st.h
448 complex.$(OBJEXT): {$(VPATH)}complex.c $(RUBY_H_INCLUDES) \
449 {$(VPATH)}st.h
450 dir.$(OBJEXT): {$(VPATH)}dir.c $(RUBY_H_INCLUDES) \
451 {$(VPATH)}st.h {$(VPATH)}util.h
452 dln.$(OBJEXT): {$(VPATH)}dln.c $(RUBY_H_INCLUDES) \
453 {$(VPATH)}st.h {$(VPATH)}dln.h
454 dmydln.$(OBJEXT): {$(VPATH)}dmydln.c dln.$(OBJEXT)
455 dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
456 dmyencoding.$(OBJEXT): {$(VPATH)}dmyencoding.c \
457 {$(VPATH)}encoding.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
458 {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h {$(VPATH)}regenc.h
459 encoding.$(OBJEXT): dmyencoding.$(OBJEXT) {$(VPATH)}util.h
460 enum.$(OBJEXT): {$(VPATH)}enum.c $(RUBY_H_INCLUDES) \
461 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}util.h
462 enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES) \
463 {$(VPATH)}st.h {$(VPATH)}debug.h {$(VPATH)}node.h
464 error.$(OBJEXT): {$(VPATH)}error.c $(RUBY_H_INCLUDES) \
465 {$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h {$(VPATH)}node.h \
466 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
467 {$(VPATH)}thread_$(THREAD_MODEL).h
468 eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h \
469 $(RUBY_H_INCLUDES) {$(VPATH)}st.h {$(VPATH)}node.h \
470 {$(VPATH)}util.h {$(VPATH)}signal.h {$(VPATH)}vm_core.h \
471 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
472 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h \
473 {$(VPATH)}eval_error.c {$(VPATH)}eval_safe.c \
474 {$(VPATH)}eval_jump.c
475 load.$(OBJEXT): {$(VPATH)}load.c {$(VPATH)}eval_intern.h \
476 $(RUBY_H_INCLUDES) {$(VPATH)}st.h {$(VPATH)}node.h \
477 {$(VPATH)}util.h {$(VPATH)}signal.h {$(VPATH)}vm_core.h \
478 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
479 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h
480 file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) \
481 {$(VPATH)}st.h {$(VPATH)}io.h {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h \
482 {$(VPATH)}signal.h {$(VPATH)}util.h {$(VPATH)}dln.h
483 gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) \
484 {$(VPATH)}st.h {$(VPATH)}signal.h {$(VPATH)}node.h {$(VPATH)}re.h \
485 {$(VPATH)}regex.h {$(VPATH)}oniguruma.h {$(VPATH)}io.h \
486 {$(VPATH)}encoding.h {$(VPATH)}vm_core.h {$(VPATH)}debug.h \
487 {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
488 {$(VPATH)}thread_$(THREAD_MODEL).h \
489 {$(VPATH)}gc.h {$(VPATH)}eval_intern.h
490 hash.$(OBJEXT): {$(VPATH)}hash.c $(RUBY_H_INCLUDES) \
491 $(ID_H_INCLUDES) \
492 {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}signal.h
493 inits.$(OBJEXT): {$(VPATH)}inits.c $(RUBY_H_INCLUDES) \
494 {$(VPATH)}st.h
495 io.$(OBJEXT): {$(VPATH)}io.c $(RUBY_H_INCLUDES) \
496 {$(VPATH)}st.h {$(VPATH)}io.h {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h \
497 {$(VPATH)}signal.h {$(VPATH)}util.h \
498 {$(VPATH)}vm_core.h {$(VPATH)}debug.h \
499 {$(VPATH)}vm_opts.h {$(VPATH)}id.h {$(VPATH)}parse.c \
500 {$(VPATH)}thread_$(THREAD_MODEL).h
501 main.$(OBJEXT): {$(VPATH)}main.c $(RUBY_H_INCLUDES) \
502 {$(VPATH)}st.h
503 marshal.$(OBJEXT): {$(VPATH)}marshal.c $(RUBY_H_INCLUDES) \
504 {$(VPATH)}st.h {$(VPATH)}io.h {$(VPATH)}encoding.h \
505 {$(VPATH)}oniguruma.h {$(VPATH)}util.h
506 math.$(OBJEXT): {$(VPATH)}math.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h
507 numeric.$(OBJEXT): {$(VPATH)}numeric.c $(RUBY_H_INCLUDES) \
508 {$(VPATH)}st.h {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h
509 object.$(OBJEXT): {$(VPATH)}object.c $(RUBY_H_INCLUDES) \
510 {$(VPATH)}st.h {$(VPATH)}util.h {$(VPATH)}debug.h {$(VPATH)}node.h
511 pack.$(OBJEXT): {$(VPATH)}pack.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h
512 parse.$(OBJEXT): {$(VPATH)}parse.c {$(VPATH)}parse.y $(RUBY_H_INCLUDES) \
513 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}encoding.h \
514 {$(VPATH)}oniguruma.h $(ID_H_INCLUDES) \
515 {$(VPATH)}regenc.h {$(VPATH)}regex.h {$(VPATH)}util.h \
516 {$(VPATH)}lex.c {$(VPATH)}keywords {$(VPATH)}debug.h
517 prec.$(OBJEXT): {$(VPATH)}prec.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h
518 proc.$(OBJEXT): {$(VPATH)}proc.c {$(VPATH)}eval_intern.h \
519 $(RUBY_H_INCLUDES) {$(VPATH)}st.h {$(VPATH)}node.h \
520 {$(VPATH)}util.h {$(VPATH)}signal.h {$(VPATH)}vm_core.h \
521 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
522 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h {$(VPATH)}gc.h
523 process.$(OBJEXT): {$(VPATH)}process.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
524 {$(VPATH)}signal.h {$(VPATH)}vm_core.h {$(VPATH)}util.h \
525 {$(VPATH)}node.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
526 $(ID_H_INCLUDES) \
527 {$(VPATH)}thread_$(THREAD_MODEL).h
528 random.$(OBJEXT): {$(VPATH)}random.c $(RUBY_H_INCLUDES) \
529 {$(VPATH)}st.h
530 range.$(OBJEXT): {$(VPATH)}range.c $(RUBY_H_INCLUDES) \
531 {$(VPATH)}st.h
532 rational.$(OBJEXT): {$(VPATH)}rational.c $(RUBY_H_INCLUDES) \
533 {$(VPATH)}st.h
534 re.$(OBJEXT): {$(VPATH)}re.c $(RUBY_H_INCLUDES) \
535 {$(VPATH)}st.h {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \
536 {$(VPATH)}encoding.h {$(VPATH)}util.h {$(VPATH)}regint.h \
537 {$(VPATH)}regenc.h
538 regcomp.$(OBJEXT): {$(VPATH)}regcomp.c {$(VPATH)}regparse.h \
539 {$(VPATH)}regint.h {$(VPATH)}config.h {$(VPATH)}defines.h \
540 {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h {$(VPATH)}st.h
541 regenc.$(OBJEXT): {$(VPATH)}regenc.c {$(VPATH)}regint.h \
542 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
543 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
544 regerror.$(OBJEXT): {$(VPATH)}regerror.c {$(VPATH)}regint.h \
545 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
546 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
547 regexec.$(OBJEXT): {$(VPATH)}regexec.c {$(VPATH)}regint.h \
548 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
549 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
550 regparse.$(OBJEXT): {$(VPATH)}regparse.c {$(VPATH)}regparse.h \
551 {$(VPATH)}regint.h {$(VPATH)}config.h {$(VPATH)}defines.h \
552 {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h {$(VPATH)}st.h
553 regsyntax.$(OBJEXT): {$(VPATH)}regsyntax.c {$(VPATH)}regint.h \
554 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
555 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
556 ruby.$(OBJEXT): {$(VPATH)}ruby.c $(RUBY_H_INCLUDES) \
557 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}encoding.h \
558 {$(VPATH)}oniguruma.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
559 {$(VPATH)}signal.h {$(VPATH)}vm_core.h {$(VPATH)}debug.h \
560 {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
561 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h
562 signal.$(OBJEXT): {$(VPATH)}signal.c $(RUBY_H_INCLUDES) \
563 {$(VPATH)}st.h {$(VPATH)}signal.h {$(VPATH)}node.h {$(VPATH)}vm_core.h \
564 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
565 {$(VPATH)}thread_$(THREAD_MODEL).h
566 sprintf.$(OBJEXT): {$(VPATH)}sprintf.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
567 {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \
568 {$(VPATH)}encoding.h {$(VPATH)}vsnprintf.c
569 st.$(OBJEXT): {$(VPATH)}st.c {$(VPATH)}config.h {$(VPATH)}defines.h \
570 {$(VPATH)}st.h
571 string.$(OBJEXT): {$(VPATH)}string.c $(RUBY_H_INCLUDES) \
572 {$(VPATH)}st.h {$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \
573 {$(VPATH)}encoding.h
574 struct.$(OBJEXT): {$(VPATH)}struct.c $(RUBY_H_INCLUDES) \
575 {$(VPATH)}st.h
576 thread.$(OBJEXT): {$(VPATH)}thread.c {$(VPATH)}eval_intern.h \
577 $(RUBY_H_INCLUDES) {$(VPATH)}st.h {$(VPATH)}node.h \
578 {$(VPATH)}util.h {$(VPATH)}signal.h {$(VPATH)}vm_core.h \
579 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
580 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h {$(VPATH)}vm.h \
581 {$(VPATH)}gc.h {$(VPATH)}thread_$(THREAD_MODEL).c
582 transcode.$(OBJEXT): {$(VPATH)}transcode.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
583 {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h {$(VPATH)}transcode_data.h
584 cont.$(OBJEXT): {$(VPATH)}cont.c $(RUBY_H_INCLUDES) \
585 {$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h {$(VPATH)}node.h \
586 {$(VPATH)}debug.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
587 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}gc.h \
588 {$(VPATH)}eval_intern.h {$(VPATH)}util.h {$(VPATH)}dln.h
589 time.$(OBJEXT): {$(VPATH)}time.c $(RUBY_H_INCLUDES) \
590 {$(VPATH)}st.h {$(VPATH)}encoding.h
591 util.$(OBJEXT): {$(VPATH)}util.c $(RUBY_H_INCLUDES) \
592 {$(VPATH)}st.h {$(VPATH)}util.h
593 variable.$(OBJEXT): {$(VPATH)}variable.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
594 {$(VPATH)}node.h {$(VPATH)}util.h
595 version.$(OBJEXT): {$(VPATH)}version.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
596 {$(VPATH)}version.h $(srcdir)/revision.h
598 compile.$(OBJEXT): {$(VPATH)}compile.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
599 {$(VPATH)}node.h {$(VPATH)}vm_core.h \
600 {$(VPATH)}signal.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
601 $(ID_H_INCLUDES) \
602 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}compile.h \
603 {$(VPATH)}insns.inc {$(VPATH)}insns_info.inc {$(VPATH)}optinsn.inc
604 iseq.$(OBJEXT): {$(VPATH)}iseq.c $(RUBY_H_INCLUDES) \
605 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}gc.h {$(VPATH)}vm_core.h \
606 {$(VPATH)}signal.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
607 $(ID_H_INCLUDES) \
608 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}insns.inc \
609 {$(VPATH)}insns_info.inc {$(VPATH)}node_name.inc
610 vm.$(OBJEXT): {$(VPATH)}vm.c $(RUBY_H_INCLUDES) \
611 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}encoding.h \
612 {$(VPATH)}oniguruma.h {$(VPATH)}gc.h {$(VPATH)}insnhelper.h \
613 {$(VPATH)}eval_intern.h {$(VPATH)}util.h {$(VPATH)}signal.h \
614 {$(VPATH)}vm_core.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
615 $(ID_H_INCLUDES) \
616 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}dln.h {$(VPATH)}vm.h \
617 {$(VPATH)}vm_insnhelper.c {$(VPATH)}insns.inc {$(VPATH)}vm_evalbody.c \
618 {$(VPATH)}vmtc.inc {$(VPATH)}vm.inc {$(VPATH)}insns.def \
619 {$(VPATH)}vm_method.c {$(VPATH)}vm_eval.c
620 vm_dump.$(OBJEXT): {$(VPATH)}vm_dump.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
621 {$(VPATH)}node.h {$(VPATH)}vm_core.h \
622 {$(VPATH)}signal.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
623 $(ID_H_INCLUDES) \
624 {$(VPATH)}thread_$(THREAD_MODEL).h {$(VPATH)}vm.h
625 debug.$(OBJEXT): {$(VPATH)}debug.c $(RUBY_H_INCLUDES) \
626 {$(VPATH)}st.h {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h \
627 {$(VPATH)}debug.h {$(VPATH)}node.h {$(VPATH)}vm_core.h \
628 {$(VPATH)}signal.h {$(VPATH)}vm_opts.h $(ID_H_INCLUDES) \
629 {$(VPATH)}thread_$(THREAD_MODEL).h
630 blockinlining.$(OBJEXT): {$(VPATH)}blockinlining.c $(RUBY_H_INCLUDES) \
631 {$(VPATH)}st.h {$(VPATH)}node.h {$(VPATH)}vm_core.h \
632 {$(VPATH)}signal.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
633 $(ID_H_INCLUDES) \
634 {$(VPATH)}thread_$(THREAD_MODEL).h
635 id.$(OBJEXT): {$(VPATH)}id.c $(RUBY_H_INCLUDES) \
636 {$(VPATH)}st.h $(ID_H_INCLUDES)
637 miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c $(RUBY_H_INCLUDES) \
638 {$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h \
639 {$(VPATH)}node.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
640 $(ID_H_INCLUDES) \
641 {$(VPATH)}thread_$(THREAD_MODEL).h
642 prelude.$(OBJEXT): {$(VPATH)}prelude.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h \
643 {$(VPATH)}vm_core.h {$(VPATH)}signal.h \
644 {$(VPATH)}node.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
645 $(ID_H_INCLUDES) \
646 {$(VPATH)}thread_$(THREAD_MODEL).h
647 golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.c $(RUBY_H_INCLUDES) \
648 {$(VPATH)}st.h {$(VPATH)}vm_core.h {$(VPATH)}signal.h \
649 {$(VPATH)}node.h {$(VPATH)}debug.h {$(VPATH)}vm_opts.h \
650 $(ID_H_INCLUDES) \
651 {$(VPATH)}thread_$(THREAD_MODEL).h
652 goruby.$(OBJEXT): {$(VPATH)}goruby.c {$(VPATH)}main.c $(RUBY_H_INCLUDES) {$(VPATH)}st.h
654 ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
655 {$(VPATH)}defines.h {$(VPATH)}oniguruma.h
656 us_ascii.$(OBJEXT): {$(VPATH)}us_ascii.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
657 {$(VPATH)}defines.h {$(VPATH)}oniguruma.h
658 unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regint.h \
659 {$(VPATH)}config.h {$(VPATH)}defines.h {$(VPATH)}regenc.h \
660 {$(VPATH)}oniguruma.h {$(VPATH)}st.h
661 utf_8.$(OBJEXT): {$(VPATH)}utf_8.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
662 {$(VPATH)}defines.h {$(VPATH)}oniguruma.h
664 INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
665 vmtc.inc vm.inc
667 INSNS2VMOPT = --srcdir="$(srcdir)"
669 $(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h
670 @$(RM) $(PROGRAM)
671 $(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
673 minsns.inc: $(srcdir)/template/minsns.inc.tmpl
675 opt_sc.inc: $(srcdir)/template/opt_sc.inc.tmpl
677 optinsn.inc: $(srcdir)/template/optinsn.inc.tmpl
679 optunifs.inc: $(srcdir)/template/optunifs.inc.tmpl
681 insns.inc: $(srcdir)/template/insns.inc.tmpl
683 insns_info.inc: $(srcdir)/template/insns_info.inc.tmpl
685 vmtc.inc: $(srcdir)/template/vmtc.inc.tmpl
687 vm.inc: $(srcdir)/template/vm.inc.tmpl
689 srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c $(srcdir)/ext/ripper/ripper.c srcs-enc
691 srcs-enc: enc.mk
692 $(MAKE) -f enc.mk RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) srcs
694 incs: $(INSNS) {$(VPATH)}node_name.inc {$(VPATH)}encdb.h {$(VPATH)}transdb.h $(srcdir)/revision.h
696 insns: $(INSNS)
698 node_name.inc: {$(VPATH)}node.h
699 $(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@
701 encdb.h: $(PREP)
702 $(MINIRUBY) $(srcdir)/enc/make_encdb.rb $@.new $(srcdir)/enc enc
703 $(IFCHANGE) "$@" "$@.new"
705 transdb.h: $(PREP) srcs-enc
706 $(MINIRUBY) $(srcdir)/enc/trans/make_transdb.rb $@.new $(srcdir)/enc/trans enc/trans
707 $(IFCHANGE) "$@" "$@.new"
709 miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb
710 $(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@
712 prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(PRELUDE_SCRIPTS) $(PREP)
713 $(COMPILE_PRELUDE) $(PRELUDE_SCRIPTS) $@
715 golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(srcdir)/prelude.rb $(srcdir)/golf_prelude.rb $(PREP)
716 $(COMPILE_PRELUDE) $(srcdir)/golf_prelude.rb $@
718 prereq: incs srcs preludes
720 preludes: {$(VPATH)}miniprelude.c
721 preludes: {$(srcdir)}golf_prelude.c
723 docs:
724 $(BASERUBY) -I$(srcdir) $(srcdir)/tool/makedocs.rb $(INSNS2VMOPT)
726 $(srcdir)/revision.h: $(REVISION_FORCE)
727 @set LC_MESSAGES=C
728 -@$(SET_LC_MESSAGES) $(VCS) info "$(@D)" | \
729 sed -n "s/.*Rev:/#define RUBY_REVISION/p" > "$@.tmp"
730 @$(IFCHANGE) "$@" "$@.tmp"
732 $(srcdir)/ext/ripper/ripper.c:
733 cd $(srcdir)/ext/ripper && exec $(MAKE) -f depend $(MFLAGS) top_srcdir=../.. srcdir=.
737 run: miniruby$(EXEEXT) PHONY
738 $(MINIRUBY) $(srcdir)/test.rb $(RUNOPT)
740 runruby: $(PROGRAM) PHONY
741 $(RUNRUBY) $(srcdir)/test.rb
743 parse: miniruby$(EXEEXT) PHONY
744 $(MINIRUBY) $(srcdir)/tool/parse.rb $(srcdir)/test.rb
746 COMPARE_RUBY = $(BASERUBY)
747 ITEM =
748 OPTS =
750 benchmark: $(PROGRAM) PHONY
751 $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \
752 --executables="$(COMPARE_RUBY); $(RUNRUBY)" \
753 --pattern='bm_' --directory=$(srcdir)/benchmark $(OPTS)
755 benchmark-each: $(PROGRAM) PHONY
756 $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \
757 --executables="$(COMPARE_RUBY); $(RUNRUBY)" \
758 --pattern=$(ITEM) --directory=$(srcdir)/benchmark $(OPTS)
760 tbench: $(PROGRAM) PHONY
761 $(BASERUBY) $(srcdir)/benchmark/driver.rb -v \
762 --executables="$(COMPARE_RUBY); $(RUNRUBY)" \
763 --pattern='bmx_' --directory=$(srcdir)/benchmark $(OPTS)
765 aotc: $(PROGRAM) PHONY
766 ./$(PROGRAM) -I$(srcdir)/lib $(srcdir)/bin/ruby2cext $(srcdir)/test.rb
768 vmasm: vm.$(ASMEXT)
770 # vm.o : CFLAGS += -fno-crossjumping
772 run.gdb:
773 echo b ruby_debug_breakpoint > run.gdb
774 echo '# handle SIGINT nostop' >> run.gdb
775 echo '# handle SIGPIPE nostop' >> run.gdb
776 echo '# b rb_longjmp' >> run.gdb
777 echo source $(srcdir)/breakpoints.gdb >> run.gdb
778 echo source $(srcdir)/.gdbinit >> run.gdb
779 echo run >> run.gdb
781 gdb: miniruby$(EXEEXT) run.gdb PHONY
782 gdb -x run.gdb --quiet --args $(MINIRUBY) $(srcdir)/test.rb
784 # Intel VTune
786 vtune: miniruby$(EXEEXT)
787 vtl activity -c sampling -app ".\miniruby$(EXEEXT)","-I$(srcdir)/lib $(srcdir)/test.rb" run
788 vtl view -hf -mn miniruby$(EXEEXT) -sum -sort -cd
789 vtl view -ha -mn miniruby$(EXEEXT) -sum -sort -cd | $(RUNRUBY) $(srcdir)/tool/vtlh.rb > ha.lines
791 dist: $(PREP) $(PROGRAM)
792 $(SHELL) $(srcdir)/tool/make-snapshot . $(TARNAME)
795 @$(VCS) up "$(srcdir)"
796 -@$(MAKE) $(MFLAGS) REVISION_FORCE=PHONY "$(srcdir)/revision.h"
798 help: PHONY
799 @echo " Makefile of Ruby"
800 @echo ""
801 @echo "targets:"
802 @echo " all: compile ruby and extensions"
803 @echo " check: equals make test test-all"
804 @echo " test: ruby core tests"
805 @echo " test-all: all ruby tests"
806 @echo " install: install all ruby distributions"
807 @echo " install-nodoc: install without rdoc"
808 @echo " clean: clean built objects"
809 @echo " golf: for golfers"