summaryrefslogtreecommitdiff
path: root/ext/win32ole/extconf.rb
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-21 15:10:06 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-21 15:10:06 +0000
commit9ec1f6d27eb7eced0c91cf121ca6af5682276dc4 (patch)
tree00b7a5c7b26977502742d3ac9d303341c2e80e54 /ext/win32ole/extconf.rb
parentb8f68de2be55082cb7b7478d7fa1f5a34db0dd06 (diff)
remove ext/win32ole/.document.
add win32ole ext/.document. create .document dynamically by extconf.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/extconf.rb')
-rw-r--r--ext/win32ole/extconf.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/win32ole/extconf.rb b/ext/win32ole/extconf.rb
index c989267..de306d0 100644
--- a/ext/win32ole/extconf.rb
+++ b/ext/win32ole/extconf.rb
@@ -6,6 +6,17 @@
require 'mkmf'
dir_config("win32")
+
+SRCFILES=<<SRC
+win32ole.c
+SRC
+
+def create_docfile(src)
+ open(File.expand_path($srcdir) + "/.document", "w") {|ofs|
+ ofs.print src
+ }
+end
+
def create_win32ole_makefile
if have_library("ole32") and
have_library("oleaut32") and
@@ -15,9 +26,13 @@ def create_win32ole_makefile
have_library("advapi32") and
have_header("windows.h")
create_makefile("win32ole")
+ create_docfile(SRCFILES)
+ else
+ create_docfile("")
end
end
+
case RUBY_PLATFORM
when /mswin32/
$CFLAGS += ' /W3'