1998-12-21 11:00:56 +00:00

18 lines
396 B
Plaintext

# do a rule for each file that says 'copy' to new direcory on change
sub do_copy_rule
{
local($to,$files,$p)=@_;
local($ret,$_,$n,$pp);
$files =~ s/\//$o/g if $o ne '/';
foreach (split(/\s+/,$files))
{
$n=&bname($_);
if ($n =~ /bss_file/)
{ $pp=".c"; }
else { $pp=$p; }
$ret.="$to${o}$n$pp: \$(SRC_D)$o$_$pp\n\t\$(CP) \$(SRC_D)$o$_$pp $to${o}$n$pp\n\n";
}
return($ret);
}