summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-25 09:02:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-25 09:02:52 +0000
commit01a24da8d31dad0bd15b96a4527dbccb345c6a78 (patch)
treecd137ccc900fd4fc9d4932059aed25eed41f8c62 /ext
parent031d2e84df58ed54948671931544c41cf32da1ca (diff)
990625
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/Win32API/depend2
-rw-r--r--ext/dbm/depend2
-rw-r--r--ext/etc/depend2
-rw-r--r--ext/extmk.rb.in22
-rw-r--r--ext/fcntl/depend2
-rw-r--r--ext/gdbm/depend2
-rw-r--r--ext/md5/depend2
-rw-r--r--ext/nkf/depend2
-rw-r--r--ext/socket/depend6
-rw-r--r--ext/tcltklib/depend2
-rw-r--r--ext/tk/depend2
11 files changed, 24 insertions, 22 deletions
diff --git a/ext/Win32API/depend b/ext/Win32API/depend
index 517b546de35..b224bb66c96 100644
--- a/ext/Win32API/depend
+++ b/ext/Win32API/depend
@@ -1 +1 @@
-Win32API.o : Win32API.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+Win32API.o : Win32API.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/dbm/depend b/ext/dbm/depend
index d7f1f419d4b..5fae80b0967 100644
--- a/ext/dbm/depend
+++ b/ext/dbm/depend
@@ -1 +1 @@
-dbm.o: dbm.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+dbm.o: dbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/etc/depend b/ext/etc/depend
index fb3318a0c6a..ac706477b0b 100644
--- a/ext/etc/depend
+++ b/ext/etc/depend
@@ -1 +1 @@
-etc.o : etc.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+etc.o : etc.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index fb7236441a3..d3ff1748940 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -147,12 +147,13 @@ def try_run(src, opt="")
end
end
-def install_rb(mfile)
+def install_rb(mfile, srcdir)
+ libdir = srcdir + "/lib"
path = []
dir = []
- Find.find("lib") do |f|
+ Find.find(libdir) do |f|
next unless /\.rb$/ =~ f
- f = f[4..-1]
+ f = f[libdir.length+1..-1]
path.push f
dir |= File.dirname(f)
end
@@ -161,7 +162,7 @@ def install_rb(mfile)
mfile.printf "\t@test -d $(DESTDIR)$(pkglibdir)/%s || mkdir $(DESTDIR)$(pkglibdir)/%s\n", f, f
end
for f in path
- mfile.printf "\t$(INSTALL_DATA) lib/%s $(DESTDIR)$(pkglibdir)/%s\n", f, f
+ mfile.printf "\t$(INSTALL_DATA) $(srcdir)/lib/%s $(DESTDIR)$(pkglibdir)/%s\n", f, f
end
end
@@ -347,13 +348,14 @@ SHELL = /bin/sh
srcdir = #{$srcdir}
VPATH = #{$srcdir}
-hdrdir = #{$topdir}
+topdir = #{$topdir}
+hdrdir = #{$top_srcdir}
DESTDIR =
CC = @CC@
prefix = @prefix@
-CFLAGS = %s -I#{$topdir} -I#{$top_srcdir} -I@includedir@ #{CFLAGS} #$CFLAGS %s
+CFLAGS = %s -I$(topdir) -I$(hdrdir) -I@includedir@ #{CFLAGS} #$CFLAGS %s
DLDFLAGS = #$DLDFLAGS #$LDFLAGS
LDSHARED = @LDSHARED@ #{defflag}
", if $static then "" else "@CCDLFLAGS@" end, $defs.join(" ")
@@ -418,7 +420,7 @@ EOS
$(INSTALL_DLLIB) $(DLLIB) $(DESTDIR)$(archdir)/$(DLLIB)
"
end
- install_rb(mfile)
+ install_rb(mfile, $srcdir)
mfile.printf "\n"
if $static
@@ -449,11 +451,11 @@ $(DLLIB): $(OBJS)
"
end
- if File.exist?("depend")
- dfile = open("depend", "r")
+ if File.exist?("#{$srcdir}/depend")
+ dfile = open("#{$srcdir}/depend", "r")
mfile.printf "###\n"
while line = dfile.gets()
- mfile.printf "%s", line
+ mfile.printf "%s", line.gsub('\$\(hdrdir\)/config.h', '$(topdir)/config.h')
end
dfile.close
end
diff --git a/ext/fcntl/depend b/ext/fcntl/depend
index a7915c7d924..10eab64a464 100644
--- a/ext/fcntl/depend
+++ b/ext/fcntl/depend
@@ -1 +1 @@
-fcntl.o: fcntl.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+fcntl.o: fcntl.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/gdbm/depend b/ext/gdbm/depend
index 9e157bc23f0..c080a816197 100644
--- a/ext/gdbm/depend
+++ b/ext/gdbm/depend
@@ -1 +1 @@
-gdbm.o: gdbm.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+gdbm.o: gdbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/md5/depend b/ext/md5/depend
index abb2a47419a..c99f78ee90c 100644
--- a/ext/md5/depend
+++ b/ext/md5/depend
@@ -1,2 +1,2 @@
md5c.o: md5c.c md5.h
-md5init.o: md5init.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h md5.h
+md5init.o: md5init.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h md5.h
diff --git a/ext/nkf/depend b/ext/nkf/depend
index db730602e77..645bc869c8d 100644
--- a/ext/nkf/depend
+++ b/ext/nkf/depend
@@ -1 +1 @@
-nkf.o : nkf.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h nkf1.7/nkf.c
+nkf.o : nkf.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h nkf1.7/nkf.c
diff --git a/ext/socket/depend b/ext/socket/depend
index df2f0c5d16c..cca6d4e62a8 100644
--- a/ext/socket/depend
+++ b/ext/socket/depend
@@ -1,3 +1,3 @@
-socket.o : socket.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h $(hdrdir)/rubyio.h $(hdrdir)/rubysig.h sockport.h
-getnameinfo.o: getnameinfo.c $(hdrdir)/config.h addrinfo.h sockport.h
-getaddrinfo.o: getaddrinfo.c $(hdrdir)/config.h addrinfo.h sockport.h
+socket.o : socket.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/rubyio.h $(hdrdir)/rubysig.h sockport.h
+getnameinfo.o: getnameinfo.c $(topdir)/config.h addrinfo.h sockport.h
+getaddrinfo.o: getaddrinfo.c $(topdir)/config.h addrinfo.h sockport.h
diff --git a/ext/tcltklib/depend b/ext/tcltklib/depend
index 71d9f20537e..e91f9dacbfa 100644
--- a/ext/tcltklib/depend
+++ b/ext/tcltklib/depend
@@ -1 +1 @@
-tcltklib.o: tcltklib.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+tcltklib.o: tcltklib.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/tk/depend b/ext/tk/depend
index e325a82c0ff..fd63e230f01 100644
--- a/ext/tk/depend
+++ b/ext/tk/depend
@@ -1 +1 @@
-tkutil.o: tkutil.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+tkutil.o: tkutil.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h