Skip to content

fix: Installed pkg-config metadata with Make. - #922

Open
ShogunPanda wants to merge 1 commit into
nodejs:mainfrom
ShogunPanda:issue-883
Open

ShogunPanda wants to merge 1 commit into
nodejs:mainfrom
ShogunPanda:issue-883

Conversation

@ShogunPanda

Copy link
Copy Markdown
Contributor

Summary

Generate and install libllhttp.pc with make install, matching the pkg-config support provided by CMake.

Changes

  • Reuse libllhttp.pc.in with the package version and Make installation paths.
  • Install the generated metadata in $(LIBDIR)/pkgconfig with mode 644.
  • Regenerate metadata when installation paths change and keep DESTDIR out of its contents.

Additional Informations

AI-assisted work. All changes reviewed by a human.
Fixes #883.

Signed-off-by: Paolo Insogna <paolo@cowtech.it>
Comment thread Makefile
Comment on lines +54 to +61
build/libllhttp.pc: libllhttp.pc.in package.json
mkdir -p build
sed -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|g' \
-e 's|@CMAKE_INSTALL_FULL_BINDIR@|$(BINDIR)|g' \
-e 's|@CMAKE_INSTALL_FULL_LIBDIR@|$(LIBDIR)|g' \
-e 's|@CMAKE_INSTALL_FULL_INCLUDEDIR@|$(INCLUDEDIR)|g' \
-e "s|@PROJECT_VERSION@|$$(node -p "require('./package.json').version")|g" \
$< > $@

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum but why would you do that instead of using CMake? That feels brittle

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that's fine, but IMO we'd better simply remove the install target in the Makefile to keep a single supported installation method (CMake)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Make install target does not install a libllhttp.pc pkg-config file

2 participants