4 #### Start of system configuration section. ####
7 hdrdir
= $(srcdir)/include
18 exec_prefix = @
exec_prefix@
22 libexecdir
= @libexecdir@
23 datarootdir
= @datarootdir@
31 RDOCTARGET
= @RDOCTARGET@
34 RIDATADIR
= $(DESTDIR
)$(datadir)/ri
/$(MAJOR
).
$(MINOR
)/system
35 arch_hdrdir
= $(EXTOUT
)/include/$(arch
)
36 VPATH
= $(arch_hdrdir
)/ruby
:$(hdrdir
)/ruby
:$(srcdir):$(srcdir)/enc
:$(srcdir)/missing
39 OUTFLAG
= @OUTFLAG@
$(empty
)
40 COUTFLAG
= @COUTFLAG@
$(empty
)
41 CFLAGS
= @CFLAGS@ @ARCH_FLAG@
44 debugflags
= @debugflags@
45 warnflags
= @warnflags@
46 XCFLAGS
= -I.
-I
$(arch_hdrdir
) -I
$(hdrdir
) -I
$(srcdir) @XCFLAGS@
48 LDFLAGS
= @STATIC@
$(CFLAGS
) @LDFLAGS@
50 XLDFLAGS
= @XLDFLAGS@
$(EXTLDFLAGS
)
52 LIBS
= @LIBS@
$(EXTLIBS
)
53 MISSING
= @LIBOBJS@ @ALLOCA@
54 LDSHARED
= @LIBRUBY_LDSHARED@
55 DLDFLAGS
= @LIBRUBY_DLDFLAGS@
$(EXTLDFLAGS
) @ARCH_FLAG@
58 ARCHMINIOBJS
= @MINIOBJS@
59 BUILTIN_ENCOBJS
= @BUILTIN_ENCOBJS@
61 RUBY_INSTALL_NAME
=@RUBY_INSTALL_NAME@
62 RUBY_SO_NAME
=@RUBY_SO_NAME@
64 PROGRAM
=$(RUBY_INSTALL_NAME
)$(EXEEXT
)
65 RUBY
= $(RUBY_INSTALL_NAME
)
66 MINIRUBY
= @MINIRUBY@
$(MINIRUBYOPT
)
67 RUNRUBY
= @RUNRUBY@
$(RUNRUBYOPT
) --
69 #### End of system configuration section. ####
75 LIBRUBY_A
= @LIBRUBY_A@
76 LIBRUBY_SO
= @LIBRUBY_SO@
77 LIBRUBY_ALIASES
= @LIBRUBY_ALIASES@
79 LIBRUBYARG
= @LIBRUBYARG@
80 LIBRUBYARG_STATIC
= @LIBRUBYARG_STATIC@
81 LIBRUBYARG_SHARED
= @LIBRUBYARG_SHARED@
83 THREAD_MODEL
= @THREAD_MODEL@
88 EXTSTATIC
= @EXTSTATIC@
89 SET_LC_MESSAGES
= env LC_MESSAGES
=C
101 IFCHANGE
= $(srcdir)/tool
/ifchange
102 SET_LC_MESSAGES
= env LC_MESSAGES
=C
109 INSTALLED_LIST
= .installed.list
110 #### End of variables
116 # Prevent GNU make v3 from overflowing arg limit on SysV.
121 $(PURIFY
) $(CC
) $(LDFLAGS
) $(XLDFLAGS
) $(MAINLIBS
) $(MAINOBJ
) $(MINIOBJS
) $(COMMONOBJS
) $(DMYEXT
) $(ARCHFILE
) $(LIBS
) $(OUTFLAG
)$@
125 $(PURIFY
) $(CC
) $(LDFLAGS
) $(XLDFLAGS
) $(MAINLIBS
) $(MAINOBJ
) $(EXTOBJS
) $(LIBRUBYARG
) $(LIBS
) $(OUTFLAG
)$@
127 # We must `rm' the library each time this rule is invoked because "updating" a
128 # MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not
132 $(AR
) $(ARFLAGS
) $@
$(OBJS
) $(DMYEXT
)
133 @
-$(RANLIB
) $@
2> /dev
/null || true
136 @
-$(PRE_LIBRUBY_UPDATE
)
137 $(LDSHARED
) $(DLDFLAGS
) $(OBJS
) $(DLDOBJS
) $(SOLIBS
) $(OUTFLAG
)$@
138 @
-$(MINIRUBY
) -e
'ARGV.each{|link| File.delete link if File.exist? link; \
139 File.symlink "$(LIBRUBY_SO)", link}' \
140 $(LIBRUBY_ALIASES
) || true
145 CROSS_COMPILING = RUBY_PLATFORM; \
146 remove_const :RUBY_PLATFORM; \
147 remove_const :RUBY_VERSION; \
148 RUBY_PLATFORM = "@arch@"; \
149 RUBY_VERSION = "@MAJOR@.@MINOR@.@TEENY@"; \
151 if RUBY_PLATFORM =~ /mswin|bccwin|mingw/; \
153 remove_const :ALT_SEPARATOR; \
154 ALT_SEPARATOR = "\\"; \
159 Makefile
: $(srcdir)/Makefile.in
$(srcdir)/enc
/Makefile.in
161 $(MKFILES
): config.status
$(srcdir)/common.mk
162 MAKE
=$(MAKE
) $(SHELL
) .
/config.status
164 echo
"all:; -@rm -f conftest.mk"; \
165 echo
"conftest.mk: .force; @echo AUTO_REMAKE"; \
167 } > conftest.mk || exit
1; \
168 $(MAKE
) -f conftest.mk | grep
'^AUTO_REMAKE$$' >/dev
/null
2>&1 || \
169 { echo
"Makefile updated, restart."; exit
1; }
171 config.status
: $(srcdir)/configure
$(srcdir)/enc
/Makefile.in
172 MINIRUBY
="$(MINIRUBY)" $(SHELL
) .
/config.status
--recheck
174 $(srcdir)/configure
: $(srcdir)/configure.in
175 cd
$(srcdir) && $(AUTOCONF
)
177 # Things which should be considered:
178 # * with gperf v.s. without gperf
179 # * ./configure v.s. ../ruby/configure
180 # * GNU make v.s. HP-UX make # HP-UX make invokes the action if lex.c and keywords has same mtime.
181 # * svn checkout generate a file with mtime as current time
182 # * XFS has a mtime with fractional part
185 if cmp
-s
$(srcdir)/lex.c.src
$?
; then \
187 cp
$(srcdir)/lex.c.blt
$@
; \
190 gperf
-C
-p
-j1
-i
1 -g
-o
-t
-N rb_reserved_word
-k1
,3,$$ $?
> $@.tmp
&& \
192 cp
$?
$(srcdir)/lex.c.src
&& \
193 cp
$@
$(srcdir)/lex.c.blt
; \
197 $(CC
) $(CFLAGS
) $(XCFLAGS
) $(CPPFLAGS
) $(COUTFLAG
)$@
-c
$<
200 $(AS
) $(ASFLAGS
) -o
$@
$<
203 $(CC
) $(CFLAGS
) $(XCFLAGS
) $(CPPFLAGS
) $(COUTFLAG
)$@
-S
$<
206 @
$(RM
) ext
/extinit.c ext
/extinit.
$(OBJEXT
) ext
/ripper
/y.output
209 @
$(RM
) ext
/config.cache
$(RBCONFIG
)
210 -$(RM
) $(INSTALLED_LIST
) $(arch_hdrdir
)/ruby
/config.h
211 -rmdir
-p
$(arch_hdrdir
)/ruby
213 clean-ext distclean-ext realclean-ext
::
214 @find ext
-name Makefile |
sort | while read mk
; do \
215 dir=`dirname "$$mk"`; \
216 echo
$(@
:-ext
=)ing
`expr "$$dir" : 'ext/\(.*\)'`; \
217 (cd
"$$dir"; $(MAKE
) $(MFLAGS
) $(@
:-ext
=)); \
220 ext
/extinit.
$(OBJEXT
): ext
/extinit.c
$(SETUP
)
221 $(CC
) $(CFLAGS
) $(XCFLAGS
) $(CPPFLAGS
) $(COUTFLAG
)$@
-c ext
/extinit.c
224 if
[ -d
$(srcdir)/spec
/mspec
]; then \
225 cd
$(srcdir)/spec
/mspec
; \
229 git clone
$(MSPEC_GIT_URL
) $(srcdir)/spec
/mspec
; \
231 if
[ -d
$(srcdir)/spec
/rubyspec
]; then \
232 cd
$(srcdir)/spec
/rubyspec
; \
235 git clone
$(RUBYSPEC_GIT_URL
) $(srcdir)/spec
/rubyspec
; \
239 @if
[ ! -d
$(srcdir)/spec
/rubyspec
]; then echo No rubyspec here. make update-rubyspec first.
; exit
1; fi
240 $(RUNRUBY
) $(srcdir)/spec
/mspec
/bin
/mspec
$(srcdir)/spec
/rubyspec
/$(MAJOR
).
$(MINOR
)