Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ jobs:
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests }}
continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}

- name: test-pc
run: |
DESTDIR=${RUNNER_TEMP-${TMPDIR-/tmp}}/installed
$SETARCH make test-pc "DESTDIR=$DESTDIR"

- uses: ./.github/actions/slack
with:
label: ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}
Expand Down
31 changes: 29 additions & 2 deletions template/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,40 @@ $(LIBRUBY_$(LIBRUBY_WITH_EXT)): $(LIBRUBY_SO_UPDATE)
PKG_CONFIG = @PKG_CONFIG@
ruby_pc = @ruby_pc@
$(ruby_pc): config.status Makefile
$(Q)./config.status --file=-:$(srcdir)/template/ruby.pc.in | \
$(Q) \
pkg="$(@libdirname@)/pkgconfig" prefix="$(prefix)"; \
if [ "$(LIBRUBY_RELATIVE)" = yes ]; then \
case "$$pkg" in "$$prefix"/?*) \
pkg="$${pkg#$$prefix/}"; \
prefix='$${pcfiledir}'`echo "/$${pkg}" | sed -e 's|/[^/][^/]*|/..|g'`; \
esac; \
fi; \
./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)|' \
-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)

test-pc: install-data
set -ex; \
[ -z "$${pkg_config=$(PKG_CONFIG)}" ] && exit; \
export PKG_CONFIG_PATH=$(DESTDIR)/$(libdir)/pkgconfig$${PKG_CONFIG_PATH:+:$$PKG_CONFIG_PATH}; \
$${pkg_config} --exists $(ruby_pc:.pc=); \
path=`$${pkg_config} --variable=prefix $(ruby_pc:.pc=)`; \
if [ "$(LIBRUBY_RELATIVE)" = yes ]; then \
test "$$path" -ef "$(DESTDIR)$(prefix)"; \
else \
test "$$path" = "$(prefix)"; \
fi

install-data: pkgconfig-data pre-install-data do-install-data post-install-data
pre-install-data:: install-prereq
do-install-data: $(PREP) pre-install-data
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=data
post-install-data::
@$(NULLCMD)

modular-gc-precheck:
$(Q) if test -z $(modular_gc_dir); then \
echo "You must configure with --with-modular-gc to use modular GC"; \
Expand Down