summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
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 517b546de3..b224bb66c9 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 d7f1f419d4..5fae80b096 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 fb3318a0c6..ac706477b0 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 fb7236441a..d3ff174894 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 a7915c7d92..10eab64a46 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 9e157bc23f..c080a81619 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 abb2a47419..c99f78ee90 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 db730602e7..645bc869c8 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 df2f0c5d16..cca6d4e62a 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 71d9f20537..e91f9dacbf 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 e325a82c0f..fd63e230f0 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