Skip to content

Instantly share code, notes, and snippets.

@idodeclare
Created November 2, 2016 21:57
Show Gist options
  • Select an option

  • Save idodeclare/9829000b05f7e7c0427a72e0c20d13b6 to your computer and use it in GitHub Desktop.

Select an option

Save idodeclare/9829000b05f7e7c0427a72e0c20d13b6 to your computer and use it in GitHub Desktop.
Find Makefiles using target-group syntax
find usr/ -name Makefile \
| xargs perl -nle 'BEGIN { undef $/ }
my @m = /^(?![#\.]) (\S[^:=\n]+?:)/mgx;
foreach my $m (grep { /\+/ } @m) {
print "$ARGV: $m"
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment