From e2dafa09e52622995afe22ed32206ecf38c9a9d0 Mon Sep 17 00:00:00 2001 From: Chan Lee Date: Wed, 14 May 2025 19:10:57 +0800 Subject: package(install): prepend comment to generated .pc files to better distinguish --- xmake/modules/private/action/require/impl/actions/install.lua | 1 + xmake/modules/target/action/install/pkgconfig_importfiles.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua index 5e0c2c542..d30c9364f 100644 --- a/xmake/modules/private/action/require/impl/actions/install.lua +++ b/xmake/modules/private/action/require/impl/actions/install.lua @@ -91,6 +91,7 @@ function _patch_pkgconfig(package) -- patch a *.pc file local file = io.open(pcfile, 'w') if file then + file:print("# Generated by Xmake") file:print("prefix=%s", installdir:gsub("\\", "/")) file:print("exec_prefix=${prefix}") file:print("libdir=${exec_prefix}/lib") diff --git a/xmake/modules/target/action/install/pkgconfig_importfiles.lua b/xmake/modules/target/action/install/pkgconfig_importfiles.lua index 65da32085..88d545310 100644 --- a/xmake/modules/target/action/install/pkgconfig_importfiles.lua +++ b/xmake/modules/target/action/install/pkgconfig_importfiles.lua @@ -70,6 +70,7 @@ function main(target, opt) -- generate a *.pc file local file = io.open(pcfile, 'w') if file then + file:print("# Generated by Xmake") file:print("prefix=%s", installdir:gsub("\\", "/")) file:print("exec_prefix=${prefix}") file:print("libdir=${exec_prefix}/lib") -- cgit v1.3.1