A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 42 lines 1.2 kB view raw
1#!/usr/bin/perl 2# __________ __ ___. 3# Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7# \/ \/ \/ \/ \/ 8# $Id$ 9# 10 11# addtargetdir.pl - Adds target directory to gcc-generated dependency data 12 13use File::Basename; 14 15my $rbroot = $ARGV[0]; 16my $builddir = $ARGV[1]; 17undef $/; 18 19my $target; 20my $rootlen = length $rbroot; 21my $src; 22 23# Split the input file on any runs of '\' and whitespace. 24for (split(/[\s\\]+/m, <STDIN>)) { 25 /^(\/)?[^:]+(\:)?$/; 26# Save target and continue if this item ends in ':' 27 if (!($2 && ($target=$&))) { 28 $src = $&; 29# If $target is set, prefix it with the target path 30 if ($target) { 31 my $dir = dirname $src; 32 substr($dir, 0, $rootlen) = $builddir; 33 print "\n$dir/$target"; 34 $target = ""; 35# Otherwise, check for an incomplete path for the source file 36 } elsif (!$1) { 37 $src = "$builddir/$src"; 38 } 39 print " \\\n $src"; 40 } 41} 42print "\n";