Skip to content
Browse files

* extconf.rb, exec_make.rb: Support MSVC++(nmake).

* libglade/extconf.rb: Fix compiling error on MSVC+.
  • Loading branch information...
1 parent 70bcd77 commit 63922225e8f4442e1a62b3ae796c95078292ea2a Masao Mutoh committed Jan 31, 2005
Showing with 41 additions and 28 deletions.
  1. +4 −0 ChangeLog
  2. +2 −4 exec_make.rb
  3. +18 −9 extconf.rb
  4. +4 −0 libglade/ChangeLog
  5. +13 −15 libglade/extconf.rb
View
4 ChangeLog
@@ -1,3 +1,7 @@
+2005-01-31 Masao Mutoh <mutoh@highway.ne.jp>
+
+ * extconf.rb, exec_make.rb: Support MSVC++(nmake).
+
2004-11-15 Masao Mutoh <mutoh@highway.ne.jp>
* README, NEWS: Updated.
View
6 exec_make.rb
@@ -1,13 +1,11 @@
=begin
exec_make.rb is called by top-level Makefile.
- $Id: exec_make.rb,v 1.4 2004/08/15 15:06:39 mutoh Exp $
+ $Id: exec_make.rb,v 1.5 2005/01/31 10:34:33 mutoh Exp $
- Copyright (C) 2003,2004 Ruby-GNOME2 Project Team
+ Copyright (C) 2003-2005 Ruby-GNOME2 Project Team
=end
-puts "ARGV = " + ARGV.inspect
-
argv = ARGV
strict = false
if ARGV[0] == "--strict" || ARGV[0] == "-s"
View
27 extconf.rb
@@ -1,9 +1,9 @@
=begin
top-level extconf.rb for Ruby-GNOME2
- $Id: extconf.rb,v 1.11 2004/08/15 15:06:39 mutoh Exp $
+ $Id: extconf.rb,v 1.12 2005/01/31 10:34:33 mutoh Exp $
- Copyright (C) 2003,2004 Ruby-GNOME2 Project Team
+ Copyright (C) 2003-2005 Ruby-GNOME2 Project Team
=end
require 'mkmf'
@@ -14,9 +14,17 @@
#
# detect sub-directories
#
-$ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['RUBY_INSTALL_NAME'])
+$ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['RUBY_INSTALL_NAME'] + Config::CONFIG['EXEEXT'])
$ruby = arg_config("--ruby", $ruby)
+rm = "rm -f "
+if /mswin32/ =~ RUBY_PLATFORM
+ rm = "del "
+ $ruby.gsub!(/\//, '\\')
+end
+
+
+
$srcdir = File.dirname(__FILE__)
$topsrcdir = $configure_args["--topsrcdir"] ||= $srcdir
$topdir = $configure_args["--topdir"] ||= Dir.pwd
@@ -68,22 +76,23 @@
TOPSRCDIR = #{$topsrcdir}
SUBDIRS = #{targets.join(' ')}
COMMAND = #{$ruby} #{$topsrcdir}/exec_make.rb #{$strict}
+RM = #{rm}
all:
- $(COMMAND) '$(SUBDIRS)' $(MAKE) all;
+ $(COMMAND) '$(SUBDIRS)' $(MAKE) all
install:
- $(COMMAND) '$(SUBDIRS)' $(MAKE) install;
+ $(COMMAND) '$(SUBDIRS)' $(MAKE) install
site-install:
- $(COMMAND) '$(SUBDIRS)' $(MAKE) site-install;
+ $(COMMAND) '$(SUBDIRS)' $(MAKE) site-install
clean:
- $(COMMAND) '$(SUBDIRS)' $(MAKE) clean;
+ $(COMMAND) '$(SUBDIRS)' $(MAKE) clean
distclean:
- $(COMMAND) '$(SUBDIRS)' $(MAKE) distclean;
- rm -f Makefile mkmf.log
+ $(COMMAND) '$(SUBDIRS)' $(MAKE) distclean
+ $(RM) Makefile mkmf.log
")
end
View
4 libglade/ChangeLog
@@ -1,3 +1,7 @@
+2005-01-29 Masao Mutoh <mutoh@highway.ne.jp>
+
+ * extconf.rb: Fix compiling error on MSVC+.
+
2004-09-23 Masao Mutoh <mutoh@highway.ne.jp>
* lib/libglade2.rb: Support GLib::Log.set_log_domain.
View
28 libglade/extconf.rb
@@ -2,31 +2,29 @@
extconf.rb for Ruby/Libglade2 extention library
=end
-$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../glib/src/lib')
+PACKAGE_NAME = "libglade2"
+
+TOPDIR = File.expand_path(File.dirname(__FILE__) + '/..')
+MKMF_GNOME2_DIR = TOPDIR + '/glib/src/lib'
+SRCDIR = TOPDIR + '/libglade'
+
+$LOAD_PATH.unshift MKMF_GNOME2_DIR
require 'mkmf-gnome2'
PKGConfig.have_package('libglade-2.0') or exit 1
-check_win32
+setup_win32(PACKAGE_NAME)
-top = File.expand_path(File.dirname(__FILE__) + '/..') # XXX
-$CFLAGS += " " + ['glib/src', 'gtk/src'].map{|d|
- "-I" + File.join(top, d)
-}.join(" ")
+add_depend_package("glib2", "glib/src", TOPDIR)
+add_depend_package("gtk2", "gtk/src", TOPDIR)
have_header("libintl.h")
have_func("bindtextdomain")
have_func("bind_textdomain_codeset")
-if /cygwin|mingw/ =~ RUBY_PLATFORM
- top = ".."
- [
- ["glib/src", "ruby-glib2"],
- ["gtk/src", "ruby-gtk2"],
- ].each{|d,l|
- $LDFLAGS << " -L#{top}/#{d}"
- $libs << " -l#{l}"
- }
+if /mswin32/ =~ RUBY_PLATFORM
+ $libs.gsub!(/ xml2.lib /, " libxml2.lib ")
+ $libs.gsub!(/ z.lib /, " libz.lib ")
end
create_makefile("libglade2")

0 comments on commit 6392222

Please sign in to comment.
Something went wrong with that request. Please try again.