blob: 883d9ad489c4cf097e6bf3da0c849031097de8ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
|
SHELL = /bin/sh
NULLCMD = :
RUNCMD = $(SHELL)
CHDIR = @CHDIR@
exec = exec
#### Start of system configuration section. ####
srcdir = @srcdir@
top_srcdir = $(srcdir)
hdrdir = $(srcdir)/include
CC = @CC@
YACC = bison
PURIFY =
AUTOCONF = autoconf
@SET_MAKE@
MKFILES = @MAKEFILES@
BASERUBY = @BASERUBY@
TEST_RUNNABLE = @TEST_RUNNABLE@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libdir = @libdir@
libexecdir = @libexecdir@
datarootdir = @datarootdir@
datadir = @datadir@
arch = @arch@
sitearch = @sitearch@
sitedir = @sitedir@
ruby_version = @ruby_version@
TESTUI = console
TESTS =
INSTALLDOC = @INSTALLDOC@
DOCTARGETS = @RDOCTARGET@ @CAPITARGET@
EXTOUT = @EXTOUT@
arch_hdrdir = $(EXTOUT)/include/$(arch)
VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/missing
empty =
OUTFLAG = @OUTFLAG@$(empty)
COUTFLAG = @COUTFLAG@$(empty)
ARCH_FLAG = @ARCH_FLAG@
CFLAGS = @CFLAGS@
cflags = @cflags@
optflags = @optflags@
debugflags = @debugflags@
warnflags = @warnflags@
XCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) @XCFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLDFLAGS =
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
EXTLIBS =
LIBS = @LIBS@ $(EXTLIBS)
MISSING = @LIBOBJS@ @ALLOCA@
LDSHARED = @LIBRUBY_LDSHARED@
DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(EXTLDFLAGS) $(ARCH_FLAG)
SOLIBS = @SOLIBS@
MAINLIBS = @MAINLIBS@
ARCHMINIOBJS = @MINIOBJS@
BUILTIN_ENCOBJS = @BUILTIN_ENCOBJS@
BUILTIN_TRANSSRCS = @BUILTIN_TRANSSRCS@
BUILTIN_TRANSOBJS = @BUILTIN_TRANSOBJS@
RUBY_BASE_NAME=@RUBY_BASE_NAME@
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
RUBY_SO_NAME=@RUBY_SO_NAME@
EXEEXT = @EXEEXT@
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
RUBY = $(RUBY_INSTALL_NAME)
MINIRUBY = @MINIRUBY@ $(MINIRUBYOPT)
RUNRUBY = @RUNRUBY@ $(RUNRUBYOPT) --
#### End of system configuration section. ####
MAJOR= @MAJOR@
MINOR= @MINOR@
TEENY= @TEENY@
LIBRUBY_A = @LIBRUBY_A@
LIBRUBY_SO = @LIBRUBY_SO@
LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
LIBRUBY = @LIBRUBY@
LIBRUBYARG = @LIBRUBYARG@
LIBRUBYARG_STATIC = @LIBRUBYARG_STATIC@
LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
THREAD_MODEL = @THREAD_MODEL@
PREP = @PREP@
ARCHFILE = @ARCHFILE@
SETUP =
EXTSTATIC = @EXTSTATIC@
SET_LC_MESSAGES = env LC_MESSAGES=C
MAKEDIRS = @MKDIR_P@
CP = cp
MV = mv
RM = rm -f
RMDIRS = @RMDIRS@
RMALL = @RMALL@
NM = @NM@
AR = @AR@
ARFLAGS = rcu
RANLIB = @RANLIB@
AS = @AS@
ASFLAGS = @ASFLAGS@
IFCHANGE = $(srcdir)/tool/ifchange
SET_LC_MESSAGES = env LC_MESSAGES=C
OBJDUMP = @OBJDUMP@
OBJCOPY = @OBJCOPY@
VCS = @VCS@
VCSUP = @VCSUP@
OBJEXT = @OBJEXT@
ASMEXT = S
DLEXT = @DLEXT@
MANTYPE = @MANTYPE@
INSTALLED_LIST= .installed.list
MKMAIN_CMD = mkmain.sh
SRC_FILE = $<
#### End of variables
all:
.DEFAULT: all
# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT:
miniruby$(EXEEXT):
@-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) $(OUTFLAG)$@
$(PROGRAM):
@$(RM) $@
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) $(OUTFLAG)$@
# We must `rm' the library each time this rule is invoked because "updating" a
# MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not
# supported.
$(LIBRUBY_A):
@$(RM) $@
$(AR) $(ARFLAGS) $@ $(OBJS) $(DMYEXT)
@-$(RANLIB) $@ 2> /dev/null || true
$(LIBRUBY_SO):
@-$(PRE_LIBRUBY_UPDATE)
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@
-$(OBJCOPY) -w -L '@EXPORT_PREFIX@Init_*' $@
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
fake: $(arch)-fake.rb
$(arch)-fake.rb: config.status
@./config.status --file=$@:$(srcdir)/template/fake.rb.in
Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
$(MKFILES): config.status
MAKE=$(MAKE) $(SHELL) ./config.status
@{ \
echo "all:; -@rm -f conftest.mk"; \
echo "conftest.mk: .force; @echo AUTO_REMAKE"; \
echo ".force:"; \
} > conftest.mk || exit 1; \
$(MAKE) -f conftest.mk | grep '^AUTO_REMAKE$$' >/dev/null 2>&1 || \
{ echo "Makefile updated, restart."; exit 1; }
uncommon.mk: $(srcdir)/common.mk
sed 's/{\$$([^(){}]*)[^{}]*}//g' $< > $@
config.status: $(srcdir)/configure $(srcdir)/enc/Makefile.in
PWD= MINIRUBY="$(MINIRUBY)" $(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in
$(CHDIR) $(srcdir) && exec $(AUTOCONF)
incs: id.h
# Things which should be considered:
# * with gperf v.s. without gperf
# * ./configure v.s. ../ruby/configure
# * GNU make v.s. HP-UX make # HP-UX make invokes the action if lex.c and keywords has same mtime.
# * svn checkout generate a file with mtime as current time
# * XFS has a mtime with fractional part
lex.c: defs/keywords
@\
if cmp -s $(srcdir)/defs/lex.c.src $?; then \
set -x; \
$(CP) $(srcdir)/lex.c.blt $@; \
else \
set -x; \
gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@.tmp && \
$(MV) $@.tmp $@ && \
$(CP) $? $(srcdir)/defs/lex.c.src && \
$(CP) $@ $(srcdir)/lex.c.blt; \
fi
NAME2CTYPE_OPTIONS = -7 -c -j1 -i1 -t -C -P -T -H uniname2ctype_hash -Q uniname2ctype_pool -N uniname2ctype_p
enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
$(MAKEDIRS) $(@D)
@set +e; \
if cmp -s $(?:.kwd=.src) $?; then \
set -x; \
$(CP) $(?:.kwd=.h.blt) $@; \
else \
trap '$(RM) $@-1.h $@-2.h' 0 && \
set -x; \
sed '/^#ifdef USE_UNICODE_PROPERTIES/,/^#endif/d' $? | gperf $(NAME2CTYPE_OPTIONS) > $@-1.h && \
gperf $(NAME2CTYPE_OPTIONS) < $? > $@-2.h && \
diff -DUSE_UNICODE_PROPERTIES $@-1.h $@-2.h > $@.tmp || :; \
$(MV) $@.tmp $@ && \
$(CP) $? $(?:.kwd=.src) && \
$(CP) $@ $(?:.kwd=.h.blt); \
fi
.c.@OBJEXT@:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $<
.s.@OBJEXT@:
$(AS) $(ASFLAGS) -o $@ $<
.c.S:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -S $<
.c.i:
$(CPP) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -E $< > $@
clean-local::
@$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output
distclean-local::
@$(RM) ext/config.cache $(RBCONFIG) Doxyfile
@-$(RM) run.gdb
@-$(RM) $(INSTALLED_LIST) $(arch_hdrdir)/ruby/config.h
@-$(RMDIRS) $(arch_hdrdir)/ruby
distclean-rdoc:
@$(RMALL) $(RDOCOUT:/=\)
clean-ext distclean-ext realclean-ext::
@set dummy ${EXTS}; shift; \
if test "$$#" = 0; then \
set dummy `find ext -name Makefile | sed 's:^ext/::;s:/Makefile$$::' | sort`; \
shift; \
fi; \
for dir; do \
[ -f "ext/$$dir/Makefile" ] || continue; \
echo $(@:-ext=)ing "$$dir"; \
(cd "ext/$$dir" && exec $(MAKE) $(MFLAGS) $(@:-ext=)) && \
case "$@" in \
*distclean-ext*|*realclean-ext*) \
$(RMDIRS) "ext/$$dir";; \
esac; \
done
distclean-ext realclean-ext::
@-rmdir ext 2> /dev/null || true
ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
up::
@$(CHDIR) "$(srcdir)" && LC_TIME=C exec $(VCSUP)
update-mspec:
@$(CHDIR) $(srcdir); \
if [ -d spec/mspec ]; then \
cd spec/mspec; \
echo updating mspec ...; \
exec git pull; \
else \
echo retrieving mspec ...; \
exec git clone $(MSPEC_GIT_URL) spec/mspec; \
fi
update-rubyspec: update-mspec
@$(CHDIR) $(srcdir); \
if [ -d spec/rubyspec ]; then \
cd spec/rubyspec; \
echo updating rubyspec ...; \
exec git pull; \
else \
echo retrieving rubyspec ...; \
exec git clone $(RUBYSPEC_GIT_URL) spec/rubyspec; \
fi
test-rubyspec:
@if [ ! -d $(srcdir)/spec/rubyspec ]; then echo No rubyspec here. make update-rubyspec first.; exit 1; fi
$(RUNRUBY) $(srcdir)/spec/mspec/bin/mspec run -B $(srcdir)/spec/default.mspec $(MSPECOPT)
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
vmtc.inc vm.inc
$(INSNS): $(srcdir)/insns.def vm_opts.h \
$(srcdir)/defs/opt_operand.def $(srcdir)/defs/opt_insn_unif.def \
$(srcdir)/tool/instruction.rb $(srcdir)/tool/insns2vm.rb
$(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
|