Hi all!
I have a file called 'extconf.rb' that used to run fine
under Ruby 1.8.0, but now seems to have problems in Ruby 1.8.2 Windows XP Pro SP2
(2005-12-25 [i386-mswin32] - from the single .EXE installer).
First off, here is the extconf.rb file:
···
--------------------------------------------------------------
require 'mkmf'
create_makefile('RubyBarChart')
# Add on to end of Makefile...
open('Makefile', 'ab') {|mf|
mf.puts <<EOM
RubyBarChart_wrap.cxx: RubyBarChart.i Makefile extconf.rb Account.h Contract.h Portfolio.h Tick.h EntryExitSystem.h Order.h PositionSizing.h
\tswig -c++ -ruby $(CPPFLAGS) -DDEFI_CPP_ANSI RubyBarChart.i
Tick.obj: Tick.cpp Tick.h
Account.obj: Account.cpp Account.h PositionSizing.h Order.h Contract.h Tick.h
PositionSizing.obj: PositionSizing.cpp PositionSizing.h Order.h Contract.h Tick.h Account.h
EntryExitSystem.obj: EntryExitSystem.cpp EntryExitSystem.h Tick.h
Contract.obj: Contract.cpp EntryExitSystem.h Tick.h Contract.h Portfolio.h PositionSizing.h Account.h
Portfolio.obj: Portfolio.cpp Portfolio.h Contract.h
EOM
}
--------------------------------------------------------------
Now, here are the diffs between the old Makefile and the new Makefile:
7,8c7,8
< topdir = $(rubylibdir)/$(arch)
< hdrdir = $(rubylibdir)/$(arch)
---
> topdir = c:/ruby/lib/ruby/1.8/i386-mswin32
> hdrdir = $(topdir)
24c24
< compile_dir = $(DESTDIR)/tmp/ruby-1.8.0
---
> compile_dir = $(DESTDIR)/Dev/RubyDev/rubyinstaller/cvs-repo/installer-win/stable/download/ruby-1.8.2/win32
39,40c39,40
< CFLAGS = -MD -Zi -O2b2xg- -G6
< CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -I. -I. -I./missing
---
> CFLAGS = -MD -Zi -O2b2xg- -G6
> CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -I. -I./.. -I./../missing
42c42
< DLDFLAGS = -link -incremental:no -pdb:none -dll $(LIBPATH) -def:$(DEFFILE)
---
> DLDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -def:$(DEFFILE)
52c52,53
< RUBY = ruby
---
> ruby = c:/ruby/bin/ruby
> RUBY = $(ruby:/=\)
62c63
< DEFFILE = RubyBarChart.def
---
> DEFFILE = $(srcdir)/$(TARGET).def
70c71
< OBJS = RubyBarChart_wrap.obj Account.obj Contract.obj Portfolio.obj EntryExitSystem.obj PositionSizing.obj
---
> OBJS = Account.obj Contract.obj EntryExitSystem.obj Portfolio.obj PositionSizing.obj Tick.obj
72a74
> STATIC_LIB = $(TARGET).lib
81a84
> static: $(STATIC_LIB)
136a140,142
> $(STATIC_LIB): $(OBJS)
> $(AR) -machine:x86 -out:$@ $(OBJS)
>
139a146,147
>
> Tick.obj: Tick.cpp Tick.h
--------------------------------------------------------------------------
Notice on the 'OBJS' line, how the old version caught the build
of RubyBarChart_wrap.obj, but the new one doesn't? This appears to be
a bug.
Any ideas? Am I doing something wrong? Thanks!
-- Glenn