From 106cb97e08c5e503d8d6972212b3fd28514a77b4 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 22 Aug 2025 13:11:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20`chef=5Fuse=5Fother=5Ftarg?= =?UTF-8?q?et=5Fsources()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/framework/chef.c | 12 ++++++++++++ src/recipe/lang/Python/PDM.c | 1 + 2 files changed, 13 insertions(+) diff --git a/src/framework/chef.c b/src/framework/chef.c index 16e4956..b191797 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -101,6 +101,18 @@ chef_set_sources_speed_measure_url_with_postfix (Target_t *target, char *postfix } +/** + * @note 用于: 组中的 item target 在 standalone 模式时正确填充源信息 + */ +void +chef_use_other_target_sources (Target_t *this, Target_t *other) +{ + if (!other->inited) other->preludefn(); + this->sources = other->sources; + this->sources_n = other->sources_n; +} + + void chef_allow_english (Target_t *target) { diff --git a/src/recipe/lang/Python/PDM.c b/src/recipe/lang/Python/PDM.c index 44fc6ff..1cb7396 100644 --- a/src/recipe/lang/Python/PDM.c +++ b/src/recipe/lang/Python/PDM.c @@ -21,6 +21,7 @@ pl_python_pdm_prelude (void) chef_allow_english(this); chef_allow_user_define(this); + chef_use_other_target_sources (this, &pl_python_group_target); }