1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make ruby.pc from make

Expand variables undefined in configure.ac, RUBY_RELEASE_DATE and
so on.
This commit is contained in:
Nobuyoshi Nakada 2021-08-29 14:08:53 +09:00
parent 623736ae7f
commit 7487371eeb
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
2 changed files with 11 additions and 18 deletions

View file

@ -4272,21 +4272,6 @@ AC_ARG_WITH(destdir,
[DESTDIR="$withval"])
AC_SUBST(DESTDIR)
AC_CONFIG_FILES($ruby_pc:template/ruby.pc.in,
[
AS_IF([sed ['s/\$(\([A-Za-z_][A-Za-z0-9_]*\))/${\1}/g;s/@[A-Za-z_][A-Za-z0-9_]*@//'] $ruby_pc > ruby.tmp.pc &&
{
test -z "$PKG_CONFIG" ||
PKG_CONFIG_PATH=. $PKG_CONFIG --print-errors ruby.tmp
}],
[
mv -f ruby.tmp.pc $ruby_pc
], [
exit 1
])
],
[ruby_pc='$ruby_pc' PKG_CONFIG='$PKG_CONFIG'])
AC_OUTPUT
}
}

View file

@ -315,10 +315,18 @@ $(LIBRUBY_SO):
LIBRUBY_WITH_EXT = @LIBRUBY_WITH_EXT@
$(LIBRUBY_$(LIBRUBY_WITH_EXT)): $(LIBRUBY_SO_UPDATE)
PKG_CONFIG = @PKG_CONFIG@
ruby_pc = @ruby_pc@
ruby.pc: $(ruby_pc)
$(ruby_pc): config.status
@./config.status --file=$@:$(srcdir)/template/ruby.pc.in
$(ruby_pc): config.status Makefile
$(Q)./config.status --file=-:$(srcdir)/template/ruby.pc.in | \
sed -e 's/\$$(\([A-Za-z_][A-Za-z0-9_]*\))/$${\1}/g' \
-e 's|^prefix=.*|prefix=$(prefix)|' \
> ruby.tmp.pc
$(Q)pkg_config=${PKG_CONFIG} && PKG_CONFIG_PATH=. $${pkg_config:-:} --print-errors ruby.tmp
$(Q)$(MV) -f ruby.tmp.pc $(ruby_pc)
pre-install-local:: pkgconfig-data
ruby-runner.h: template/ruby-runner.h.in config.status
@./config.status --file=$@:$(srcdir)/template/$(@F).in
@ -328,7 +336,7 @@ $(RBCONFIG): $(PREP)
rbconfig.rb: $(RBCONFIG)
install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/config.h \
$(LIBRUBY_A) $(LIBRUBY_SO) $(ARCHFILE)
$(LIBRUBY_A) $(LIBRUBY_SO) $(ARCHFILE) pkgconfig-data
$(ECHO) installing cross-compiling stuff
$(Q) $(MAKEDIRS) $(XRUBY_RUBYLIBDIR)/$(arch) $(XRUBY_RUBYHDRDIR)/$(arch)/ruby
$(Q) sed '/^\$$:\.unshift/q' $(arch)-fake.rb > fake.rb