~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to bcc32/Makefile.sub

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
MKFILES = Makefile
5
5
 
6
6
#### Start of system configuration section. ####
 
7
!ifndef OS
7
8
OS = bccwin32
8
 
RT = $(OS)
 
9
!endif
 
10
!if !defined(RT)
 
11
!error RT not defined.  Retry from configure pass.
 
12
!endif
 
13
 
 
14
arch = $(ARCH)-$(OS)
9
15
 
10
16
## variables may be overridden by $(compile_dir)/Makefile
11
17
!ifndef srcdir
36
42
!endif
37
43
###############
38
44
 
39
 
VPATH = $(srcdir):$(srcdir)/missing
40
45
.SUFFIXES: .y
41
46
 
42
47
!ifndef CC
142
147
STACK = 0x2000000
143
148
!endif
144
149
 
145
 
XCFLAGS = -DRUBY_EXPORT -I. -I$(srcdir) -I$(srcdir)missing
 
150
XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)/missing
146
151
 
147
 
ARFLAGS = /a
 
152
ARFLAGS = /a /p32
148
153
LD = ilink32 -q -Gn
149
154
LDSHARED  = $(LD)
150
155
XLDFLAGS  = -Tpe c0x32.obj
161
166
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
162
167
RUBYDEF = $(RUBY_SO_NAME).def
163
168
MINIRUBY = .\miniruby$(EXEEXT) $(MINIRUBYOPT)
164
 
RUNRUBY = .\ruby$(EXEEXT) "$(srcdir)runruby.rb" --extout="$(EXTOUT)" --
 
169
RUNRUBY = .\ruby$(EXEEXT) "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" --
165
170
 
166
171
ORGLIBPATH = $(LIB)
167
172
 
176
181
PREP          = miniruby$(EXEEXT)
177
182
 
178
183
OBJEXT        = obj
179
 
OBJEXT        = asm
 
184
ASMEXT        = asm
180
185
 
181
186
INSTALLED_LIST= .installed.list
182
187
 
183
188
WINMAINOBJ    = winmain.$(OBJEXT)
184
189
MINIOBJS      = dmydln.$(OBJEXT)
185
190
 
186
 
.path.c = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
187
 
.path.h = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
 
191
arch_hdrdir = $(EXTOUT)/include/$(arch)
 
192
hdrdir = $(srcdir)/include
 
193
VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(srcdir)/win32
 
194
 
 
195
.path.c = .;$(srcdir);$(srcdir)/win32;$(srcdir)/missing
 
196
.path.ci = $(srcdir)
 
197
.path.inc = .;$(srcdir)
 
198
.path.def = .;$(srcdir)
 
199
.path.h = .;$(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/win32;$(srcdir)/missing
188
200
.path.y = $(srcdir)
189
201
.path. = $(srcdir)
190
202
 
195
207
        $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -S $(<:\=/)
196
208
 
197
209
.rc.res:
198
 
        $(RC) $(RFLAGS) -I. -I$(<D). $(iconinc) -I$(srcdir)win32 $(RFLAGS) -fo$@ $(<:/=\)
 
210
        $(RC) $(RFLAGS) -I. -I$(<D). $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:/=\)
199
211
 
200
212
.y.c:
201
213
        $(YACC) $(YFLAGS) $(<:\=/)
202
214
        sed -e "s!^ *extern char \*getenv();!/* & */!;s/^\(#.*\)y\.tab/\1parse/" y.tab.c > $(@F)
203
215
        @del y.tab.c
204
216
 
205
 
all: $(srcdir)bcc32/Makefile.sub $(srcdir)common.mk
 
217
all: $(srcdir)/bcc32/Makefile.sub $(srcdir)/common.mk
206
218
 
207
219
ruby: $(PROGRAM)
208
220
rubyw: $(WPROGRAM)
209
221
 
210
222
!include $(srcdir)/common.mk
211
223
 
212
 
PHONY: Makefile
 
224
$(MKFILES): $(srcdir)/bcc32/Makefile.sub $(srcdir)/bcc32/configure.bat $(srcdir)/bcc32/setup.mak
 
225
        $(COMSPEC) /C $(srcdir:/=\)\bcc32\configure.bat $(configure_args)
 
226
        @echo $(MKFILES) should be updated, re-run $(MAKE).
 
227
        @$(MAKE) > nul -q -f &&|
 
228
PHONY: nul
 
229
        @exit
 
230
|
213
231
 
 
232
RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h
214
233
CONFIG_H = ./.config.h.time
215
234
 
216
235
config: config.status
217
236
 
218
237
config.status: $(CONFIG_H)
219
238
 
220
 
$(CONFIG_H): $(MKFILES) $(srcdir)bcc32/Makefile.sub
221
 
        @$(srcdir:/=\)win32\ifchange.bat config.h &&|
 
239
$(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
 
240
        @if not exist $(arch_hdrdir:/=\) md $(arch_hdrdir:/=\)
 
241
        @if not exist $(arch_hdrdir:/=\)\ruby md $(arch_hdrdir:/=\)\ruby
 
242
        @$(srcdir:/=\)\win32\ifchange.bat $(RUBY_CONFIG_H:/=\) &&|
222
243
\#define HAVE_SYS_TYPES_H 1
223
244
\#define HAVE_SYS_STAT_H 1
224
245
\#define HAVE_STDLIB_H 1
301
322
\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
302
323
\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
303
324
|
304
 
        @exit > $@
 
325
        @exit > $(@:/=\)
305
326
 
306
 
config.status: $(MKFILES) $(srcdir)bcc32/Makefile.sub $(srcdir)common.mk
 
327
config.status: $(MKFILES) $(srcdir)/bcc32/Makefile.sub $(srcdir)/common.mk
307
328
        @echo Creating $@
308
329
        @type > $@ &&|
309
330
# Generated automatically by Makefile.sub.
445
466
$(LIBRUBY): $(LIBRUBY_SO)
446
467
 
447
468
$(RUBYDEF):     $(LIBRUBY_A) $(PREP)
448
 
                $(MINIRUBY) $(srcdir)bcc32/mkexports.rb -output=$@ -base=$(RUBY_SO_NAME) $(LIBRUBY_A)
 
469
                $(MINIRUBY) $(srcdir)/bcc32/mkexports.rb -output=$@ -base=$(RUBY_SO_NAME) $(LIBRUBY_A)
449
470
 
450
471
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
451
 
                @$(MINIRUBY) $(srcdir)win32/resource.rb \
 
472
                @$(MINIRUBY) $(srcdir)/win32/resource.rb \
452
473
                        -ruby_name=$(RUBY_INSTALL_NAME) \
453
474
                        -rubyw_name=$(RUBYW_INSTALL_NAME) \
454
475
                        -so_name=$(RUBY_SO_NAME) \
455
 
                        . $(icondirs) $(srcdir)win32
 
476
                        . $(icondirs) $(srcdir)/win32
 
477
 
 
478
lex.c: {$(srcdir)}lex.c.blt
 
479
        copy "$(?:/=\)" $@
456
480
 
457
481
post-install-bin::
458
482
        @$(NULLCMD)