1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
# You may distribute under the terms of either the GNU General Public License
# or the Artistic License (the same terms as Perl itself)
#
# (C) Paul Evans, 2021 -- leonerd@leonerd.org.uk
use v5.14;
use warnings;
use B qw( perlstring );
use Module::Build;
open my $outh, ">", $ARGV[0] or
die "Cannot write $ARGV[0] - $!\n";
local $/;
my $build = Module::Build->resume;
my @ccflags = @{ $build->notes( "builder_cflags" ) };
my $quoted_cflags = join ", ", map { perlstring $_ } @ccflags;
$outh->print( scalar do { <DATA> }
=~ s/__BUILDER_CFLAGS__/$quoted_cflags/r );
__DATA__
package XS::Parse::Infix::Builder_data 0.49;
use v5.14;
use warnings;
# Additional CFLAGS arguments to pass during compilation
use constant BUILDER_CFLAGS => __BUILDER_CFLAGS__;
0x55AA;
|