* transcode.c (econv_primitive_convert): add output_byteoffset
[ruby-svn.git] / Makefile.in
blobab3fa699cb9285d4558d959010a8598315ecf17e
1 SHELL = /bin/sh
2 NULLCMD = :
4 #### Start of system configuration section. ####
6 srcdir = @srcdir@
7 hdrdir = $(srcdir)/include
9 CC = @CC@
10 YACC = bison
11 PURIFY =
12 AUTOCONF = autoconf
13 @SET_MAKE@
14 MKFILES = @MAKEFILES@
15 BASERUBY = @BASERUBY@
17 prefix = @prefix@
18 exec_prefix = @exec_prefix@
19 bindir = @bindir@
20 sbindir = @sbindir@
21 libdir = @libdir@
22 libexecdir = @libexecdir@
23 datarootdir = @datarootdir@
24 datadir = @datadir@
25 arch = @arch@
26 sitearch = @sitearch@
27 sitedir = @sitedir@
29 TESTUI = console
30 TESTS =
31 RDOCTARGET = @RDOCTARGET@
33 EXTOUT = @EXTOUT@
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
38 empty =
39 OUTFLAG = @OUTFLAG@$(empty)
40 COUTFLAG = @COUTFLAG@$(empty)
41 CFLAGS = @CFLAGS@ @ARCH_FLAG@
42 cflags = @cflags@
43 optflags = @optflags@
44 debugflags = @debugflags@
45 warnflags = @warnflags@
46 XCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) @XCFLAGS@
47 CPPFLAGS = @CPPFLAGS@
48 LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
49 EXTLDFLAGS =
50 XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
51 EXTLIBS =
52 LIBS = @LIBS@ $(EXTLIBS)
53 MISSING = @LIBOBJS@ @ALLOCA@
54 LDSHARED = @LIBRUBY_LDSHARED@
55 DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(EXTLDFLAGS) @ARCH_FLAG@
56 SOLIBS = @SOLIBS@
57 MAINLIBS = @MAINLIBS@
58 ARCHMINIOBJS = @MINIOBJS@
59 BUILTIN_ENCOBJS = @BUILTIN_ENCOBJS@
61 RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
62 RUBY_SO_NAME=@RUBY_SO_NAME@
63 EXEEXT = @EXEEXT@
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. ####
71 MAJOR= @MAJOR@
72 MINOR= @MINOR@
73 TEENY= @TEENY@
75 LIBRUBY_A = @LIBRUBY_A@
76 LIBRUBY_SO = @LIBRUBY_SO@
77 LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
78 LIBRUBY = @LIBRUBY@
79 LIBRUBYARG = @LIBRUBYARG@
80 LIBRUBYARG_STATIC = @LIBRUBYARG_STATIC@
81 LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
83 THREAD_MODEL = @THREAD_MODEL@
85 PREP = @PREP@
86 ARCHFILE = @ARCHFILE@
87 SETUP =
88 EXTSTATIC = @EXTSTATIC@
89 SET_LC_MESSAGES = env LC_MESSAGES=C
91 MAKEDIRS = @MAKEDIRS@
92 CP = cp
93 MV = mv
94 RM = rm -f
95 NM = @NM@
96 AR = @AR@
97 ARFLAGS = rcu
98 RANLIB = @RANLIB@
99 AS = @AS@
100 ASFLAGS = @ASFLAGS@
101 IFCHANGE = $(srcdir)/tool/ifchange
102 SET_LC_MESSAGES = env LC_MESSAGES=C
104 OBJEXT = @OBJEXT@
105 ASMEXT = S
106 DLEXT = @DLEXT@
107 MANTYPE = @MANTYPE@
109 INSTALLED_LIST= .installed.list
110 #### End of variables
112 all:
114 .DEFAULT: all
116 # Prevent GNU make v3 from overflowing arg limit on SysV.
117 .NOEXPORT:
119 miniruby$(EXEEXT):
120 @$(RM) $@
121 $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(ARCHFILE) $(LIBS) $(OUTFLAG)$@
123 $(PROGRAM):
124 @$(RM) $@
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
129 # supported.
130 $(LIBRUBY_A):
131 @$(RM) $@
132 $(AR) $(ARFLAGS) $@ $(OBJS) $(DMYEXT)
133 @-$(RANLIB) $@ 2> /dev/null || true
135 $(LIBRUBY_SO):
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
142 fake.rb: Makefile
143 @echo ' \
144 class Object; \
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@"; \
150 end; \
151 if RUBY_PLATFORM =~ /mswin|bccwin|mingw/; \
152 class File; \
153 remove_const :ALT_SEPARATOR; \
154 ALT_SEPARATOR = "\\"; \
155 end; \
156 end; \
157 ' > $@
159 Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
161 $(MKFILES): config.status $(srcdir)/common.mk
162 MAKE=$(MAKE) $(SHELL) ./config.status
163 @{ \
164 echo "all:; -@rm -f conftest.mk"; \
165 echo "conftest.mk: .force; @echo AUTO_REMAKE"; \
166 echo ".force:"; \
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
183 lex.c: keywords
185 if cmp -s $(srcdir)/lex.c.src $?; then \
186 set -x; \
187 cp $(srcdir)/lex.c.blt $@; \
188 else \
189 set -x; \
190 gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@.tmp && \
191 mv $@.tmp $@ && \
192 cp $? $(srcdir)/lex.c.src && \
193 cp $@ $(srcdir)/lex.c.blt; \
196 .c.@OBJEXT@:
197 $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $<
199 .s.@OBJEXT@:
200 $(AS) $(ASFLAGS) -o $@ $<
202 .c.S:
203 $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -S $<
205 clean-local::
206 @$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output
208 distclean-local::
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=)); \
218 done
220 ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
221 $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
223 update-rubyspec:
224 if [ -d $(srcdir)/spec/mspec ]; then \
225 cd $(srcdir)/spec/mspec; \
226 git pull; \
227 cd ../..; \
228 else \
229 git clone $(MSPEC_GIT_URL) $(srcdir)/spec/mspec; \
231 if [ -d $(srcdir)/spec/rubyspec ]; then \
232 cd $(srcdir)/spec/rubyspec; \
233 git pull; \
234 else \
235 git clone $(RUBYSPEC_GIT_URL) $(srcdir)/spec/rubyspec; \
238 test-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)