summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-26 03:47:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-26 03:47:15 +0000
commit749ad16aa7015438a12686556d4567a7b295f27a (patch)
tree6303c256a6335acd90d65cee68f5b55a693870e4
parentfd74e1414c76288af00b47517144244134e40cc4 (diff)
* common.mk (pkgconfig-data): moved from Makefile.in.
* tool/rbinstall.rb: install pc file only if non-empty. [ruby-core:32901] #3983 * win32/Makefile.sub (ruby_pc): create pc file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--Makefile.in3
-rw-r--r--common.mk2
-rwxr-xr-xtool/rbinstall.rb2
-rw-r--r--win32/Makefile.sub9
5 files changed, 22 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b445948038..60a9b1db82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Tue Oct 26 12:47:10 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * common.mk (pkgconfig-data): moved from Makefile.in.
+
+ * tool/rbinstall.rb: install pc file only if non-empty.
+ [ruby-core:32901] #3983
+
+ * win32/Makefile.sub (ruby_pc): create pc file.
+
Tue Oct 26 09:13:34 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (rb_cv_gcc_atomic_builtins): check for atomic
diff --git a/Makefile.in b/Makefile.in
index 3d48c11057..7b819529af 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -179,8 +179,7 @@ $(arch)-fake.rb: config.status $(srcdir)/template/fake.rb.in
@chmod +x $@
ruby_pc = @ruby_pc@
-pkgconfig-data: $(ruby_pc)
-$(ruby_pc): $(srcdir)/template/ruby.pc.in config.status
+$(ruby_pc):
@./config.status --file=$@:$(srcdir)/template/ruby.pc.in
install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/config.h \
diff --git a/common.mk b/common.mk
index 3ff7cc7b18..22b8ff3cf4 100644
--- a/common.mk
+++ b/common.mk
@@ -181,6 +181,8 @@ ruby.imp: $(EXPORTOBJS)
install: install-$(INSTALLDOC)
docs: $(DOCTARGETS)
+pkgconfig-data: $(ruby_pc)
+$(ruby_pc): $(srcdir)/template/ruby.pc.in config.status
install-all: docs pre-install-all do-install-all post-install-all
pre-install-all:: pre-install-local pre-install-ext pre-install-doc
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index f4ea9cc1ea..de5319829d 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -340,7 +340,7 @@ end
install?(:local, :arch, :data) do
pc = CONFIG["ruby_pc"]
- if File.exist?(pc)
+ if pc and File.file?(pc) and File.size?(pc)
prepare "pkgconfig data", pkgconfigdir = File.join(libdir, "pkgconfig")
install pc, pkgconfigdir, :mode => $data_mode
end
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index b22a1334a7..6d654d90e7 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -339,6 +339,7 @@ VCSUP = $(VCS) rebase $(GITSVNREBASEOPTIONS)
VCS = git
VCSUP = $(VCS) pull $(GITPULLOPTIONS)
!endif
+ruby_pc = $(RUBY_BASE_NAME)-$(MAJOR).$(MINOR).pc
all: $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
@@ -772,6 +773,7 @@ s,@configure_input@,$$configure_input,;t t
s,@srcdir@,$(srcdir),;t t
s,@top_srcdir@,$(srcdir),;t t
s,@try_header@,try_compile,;t t
+s,@ruby_pc@,$(ruby_pc),;t t
<<KEEP
miniruby: miniruby$(EXEEXT)
@@ -896,6 +898,13 @@ class File
end
<<KEEP
+$(ruby_pc): $(RBCONFIG)
+ @$(MINIRUBY) -rrbconfig -p \
+ -e '$$_.gsub!(/@([a-z_]\w*)@/i) {' \
+ -e 'RbConfig::MAKEFILE_CONFIG[$$1].gsub(/\$$\((.+?)\)/, %Q[$${\1}])'
+ -e '}' \
+ $(srcdir)/template/ruby.pc.in > $@
+
{$(srcdir)/enc}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(srcdir)/missing}.c.obj: