From 1be3dc2a0ba505389d42ddd38eb7b87840dc71f3 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Mon, 11 Aug 2025 03:25:12 +0800 Subject: [PATCH] Call `chef_debug_target()` --- src/chsrc-main.c | 4 +++- src/framework/chef.c | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/chsrc-main.c b/src/chsrc-main.c index 49a533b..d33b4fe 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -38,7 +38,7 @@ * ------------------------------------------------------------*/ #define Chsrc_Version "0.2.2.3" -#define Chsrc_Release_Date "2025/08/10" +#define Chsrc_Release_Date "2025/08/11" #define Chsrc_Maintain_URL "https://github.com/RubyMetric/chsrc" #define Chsrc_Maintain_URL2 "https://gitee.com/RubyMetric/chsrc" @@ -683,6 +683,8 @@ get_target (const char *input, TargetOp code, char *option) cli_notify_lastly_for_users(); } + chef_debug_target (target); + return true; } diff --git a/src/framework/chef.c b/src/framework/chef.c index 0e3fd1f..d598e1f 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -5,7 +5,7 @@ * File Authors : Aoran Zeng * Contributors : Nul None * Created On : <2025-08-09> - * Last Modified : <2025-08-10> + * Last Modified : <2025-08-11> * * chef DSL: for chefs (recipe makers) to define a target * ------------------------------------------------------------*/ @@ -223,8 +223,12 @@ chef_set_sources_last_updated (Target_t *target, char *date) void chef_debug_target (Target_t *target) { +#ifdef XY_DEBUG if (!target) - return; + { + chsrc_debug2 ("t", "Target is NULL"); + return; + } say ("Debug Target Information:"); printf (" Get Function: %p\n", target->getfn); @@ -232,6 +236,13 @@ chef_debug_target (Target_t *target) printf (" Reset Function: %p\n", target->resetfn); printf (" Sources: %p\n", target->sources); printf (" Sources Count: %lld\n", target->sources_n); + + printf (" Authors: %p\n", target->authors); + printf (" Authors Count: %lld\n", target->authors_n); + printf (" Chef: %p\n", target->chef); + printf (" Cooks: %p\n", target->cooks); + printf (" Cooks Count: %lld\n", target->cooks_n); printf (" Contributors: %p\n", target->contributors); printf (" Contributors Count: %lld\n", target->contributors_n); +#endif }