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
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 uncommon.mk
: $(srcdir)/common.mk
172 sed
's/{\$$([^(){}]*)[^{}]*}//g' $< > $@
174 config.status
: $(srcdir)/configure
$(srcdir)/enc
/Makefile.in
175 MINIRUBY
="$(MINIRUBY)" $(SHELL
) .
/config.status
--recheck
177 $(srcdir)/configure
: $(srcdir)/configure.in
178 cd
$(srcdir) && $(AUTOCONF
)
180 # Things which should be considered:
181 # * with gperf v.s. without gperf
182 # * ./configure v.s. ../ruby/configure
183 # * GNU make v.s. HP-UX make # HP-UX make invokes the action if lex.c and keywords has same mtime.
184 # * svn checkout generate a file with mtime as current time
185 # * XFS has a mtime with fractional part
188 if cmp
-s
$(srcdir)/lex.c.src
$?
; then \
190 cp
$(srcdir)/lex.c.blt
$@
; \
193 gperf
-C
-p
-j1
-i
1 -g
-o
-t
-N rb_reserved_word
-k1
,3,$$ $?
> $@.tmp
&& \
195 cp
$?
$(srcdir)/lex.c.src
&& \
196 cp
$@
$(srcdir)/lex.c.blt
; \
200 $(CC
) $(CFLAGS
) $(XCFLAGS
) $(CPPFLAGS
) $(COUTFLAG
)$@
-c
$<
203 $(AS
) $(ASFLAGS
) -o
$@
$<
206 $(CC
) $(CFLAGS
) $(XCFLAGS
) $(CPPFLAGS
) $(COUTFLAG
)$@
-S
$<
209 @
$(RM
) ext
/extinit.c ext
/extinit.
$(OBJEXT
) ext
/ripper
/y.output
212 @
$(RM
) ext
/config.cache
$(RBCONFIG
)
213 -$(RM
) $(INSTALLED_LIST
) $(arch_hdrdir
)/ruby
/config.h
214 -rmdir
-p
$(arch_hdrdir
)/ruby
216 clean-ext distclean-ext realclean-ext
::
217 @find ext
-name Makefile |
sort | while read mk
; do \
218 dir=`dirname "$$mk"`; \
219 echo
$(@
:-ext
=)ing
`expr "$$dir" : 'ext/\(.*\)'`; \
220 (cd
"$$dir"; $(MAKE
) $(MFLAGS
) $(@
:-ext
=)); \
223 ext
/extinit.
$(OBJEXT
): ext
/extinit.c
$(SETUP
)
224 $(CC
) $(CFLAGS
) $(XCFLAGS
) $(CPPFLAGS
) $(COUTFLAG
)$@
-c ext
/extinit.c
227 if
[ -d
$(srcdir)/spec
/mspec
]; then \
228 cd
$(srcdir)/spec
/mspec
; \
232 git clone
$(MSPEC_GIT_URL
) $(srcdir)/spec
/mspec
; \
234 if
[ -d
$(srcdir)/spec
/rubyspec
]; then \
235 cd
$(srcdir)/spec
/rubyspec
; \
238 git clone
$(RUBYSPEC_GIT_URL
) $(srcdir)/spec
/rubyspec
; \
242 @if
[ ! -d
$(srcdir)/spec
/rubyspec
]; then echo No rubyspec here. make update-rubyspec first.
; exit
1; fi
243 $(RUNRUBY
) $(srcdir)/spec
/mspec
/bin
/mspec
$(srcdir)/spec
/rubyspec
/$(MAJOR
).
$(MINOR
)