perlchunks.h: $(PERLCHUNKS)
@if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi
- $(PERL) $(srcdir)/text2macro.pl --strip='^(\#.*|\s*)$$' $^ > $@
+ $(PERL) $(srcdir)/text2macro.pl $^ > $@
all: all-lib
input: files('plc_perlboot.pl', 'plc_trusted.pl'),
output: 'perlchunks.h',
capture: true,
- command: [perl, files('text2macro.pl'), '--strip=^(\#.*|\s*)$', '@INPUT@']
+ command: [perl, files('text2macro.pl'), '@INPUT@']
)
plperl_sources += custom_target('plperl_opmask.h',
--prefix=S - add prefix S to the names of the macros
--name=S - use S as the macro name (assumes only one file)
- --strip=S - don't include lines that match perl regex S
=head1 DESCRIPTION
Reads one or more text files and outputs a corresponding series of C
pre-processor macro definitions. Each macro defines a string literal that
contains the contents of the corresponding text file. The basename of the text
-file as capitalized and used as the name of the macro, along with an optional prefix.
+file is capitalized and used as the name of the macro, along with an optional prefix.
=cut
GetOptions(
'prefix=s' => \my $opt_prefix,
'name=s' => \my $opt_name,
- 'strip=s' => \my $opt_strip,
'selftest!' => sub { exit selftest() },) or exit 1;
+# This was once a command-line option, but meson is obstreperous
+# about passing backslashes through custom targets.
+my $opt_strip = '^(#.*|\s*)$';
+
die "No text files specified"
unless @ARGV;