Files
GarbageCanCenter_Woer_stm/STM32_4路称重_Git提交精简工程/gcc_build/extract_sources.pl
T

14 lines
349 B
Perl

#!/usr/bin/env perl
use strict;
use warnings;
my $project = shift @ARGV or die "usage: $0 Project.uvprojx\n";
open my $fh, '<', $project or die "cannot open $project: $!\n";
while (my $line = <$fh>) {
next unless $line =~ m{<FilePath>\.\.\\(.+\.c)</FilePath>};
my $path = $1;
$path =~ s{\\}{/}g;
print "../src/$path ";
}
close $fh;