File: Builder_data.pm.PL

package info (click to toggle)
libxs-parse-keyword-perl 0.49-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 572 kB
  • sloc: ansic: 2,037; perl: 1,013; sh: 6; makefile: 3
file content (34 lines) | stat: -rw-r--r-- 779 bytes parent folder | download
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;