summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-20 08:21:41 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-20 08:21:41 +0000
commit8852d54df49dd08207748ea537f23710add98c97 (patch)
treeb5b47d883790531624ab8e898673af038c7a40e4 /ext/extmk.rb.in
parent4b3d078462f3d9306e56649bd818e0f54c214f18 (diff)
to open CVS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in12
1 files changed, 3 insertions, 9 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 7f4087472f..3d77dd3b03 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -24,18 +24,12 @@ $hdr_cache = {}
$top_srcdir = "@top_srcdir@"
if $top_srcdir !~ "^/"
# get absolute path
- save = Dir.pwd
- Dir.chdir $top_srcdir
- $top_srcdir = Dir.pwd
- Dir.chdir save
+ $top_srcdir = File.expand_path($top_srcdir)
end
$topdir = ".."
if $topdir !~ "^/"
# get absolute path
- save = Dir.pwd
- Dir.chdir $topdir
- $topdir = Dir.pwd
- Dir.chdir save
+ $topdir = File.expand_path($topdir)
end
## drive letter
@@ -78,7 +72,7 @@ CFLAGS = "@CFLAGS@".gsub(/-c..-stack=[0-9]+ */, '')
else
CFLAGS = "@CFLAGS@"
end
-LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir -I@includedir@ #{CFLAGS} %s @LDFLAGS@ %s conftest.c @LIBS@ %s"
+LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir -I@includedir@ #{CFLAGS} %s %s conftest.c @LIBS@ %s"
CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir -I@includedir@ #{CFLAGS} %s conftest.c"
if /cygwin|mswin32|djgpp|mingw32|m68k-human|i386-os2_emx/i =~ PLATFORM