Files
epics-base/src/tools/filterMakeflags.pl
Andrew Johnson f47e1d94a3 Use Perl for filtering MAKEFLAGS properly
Requires moving the checkflags code into CONFIG_BASE
as that's where FIND_TOOL gets defined.

Fixes #545
2024-10-30 09:51:37 -05:00

16 lines
352 B
Perl

#!/bin/env perl
#
# Filter all versions of GNU Make's MAKEFLAGS variable to return
# only the single-letter flags. The content differed slightly
# between 3.81, 3.82 and 4.0; Apple still ship 3.81.
use strict;
my @flags;
foreach (@ARGV) {
last if m/^--$/ or m/\w+=/;
next if m/^--/ or m/^-$/;
push @flags, $_;
};
print join(' ', @flags);