From: Viktor Szakats Date: Mon, 16 Jun 2025 06:57:45 +0000 (+0200) Subject: mk-unity: include the embedded source name in the output X-Git-Tag: curl-8_15_0~255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ac18d7ae46e9a8ba2355353a94072ca13a91ba9;p=thirdparty%2Fcurl.git mk-unity: include the embedded source name in the output Closes #17634 --- diff --git a/scripts/mk-unity.pl b/scripts/mk-unity.pl index 7685595c7c..2e394a5a3f 100755 --- a/scripts/mk-unity.pl +++ b/scripts/mk-unity.pl @@ -90,16 +90,17 @@ my $tlist = ""; foreach my $src (@src) { if($src =~ /([a-z0-9]+)\.c$/ && !exists $exclude{$src}) { my $name = $1; - my $fn = $src; if($embed) { + my $fn = $src; if($srcdir ne "" && -e "$srcdir/$fn") { $fn = $srcdir . "/" . $fn; } + print "/* Embedding: \"$src\" */\n"; my $content = do { local $/; open my $fh, '<', $fn or die $!; <$fh> }; print $content; } else { - print "#include \"$fn\"\n"; + print "#include \"$src\"\n"; } if(not exists $include{$src}) { # register test entry function $tlist .= " {\"$name\", test_$name},\n";