From b1a88e8b8c215a64c86e605de92ae65de4ce014c Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 16 May 2017 21:39:39 +0200 Subject: [PATCH] latin: common tool to dump static perl include Move inline code to reusable script. --- Makefile | 4 ++-- tools/perlinc-static | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 tools/perlinc-static diff --git a/Makefile b/Makefile index 43323a1..103a3be 100644 --- a/Makefile +++ b/Makefile @@ -117,6 +117,6 @@ clean: .SECONDEXPANSION: -data/writing-latn.inc.pl: $$(@F) - perl -MData::Dumper -wE 'my @t = do "$<" or die $$@; print Data::Dumper->new([\@t])->Terse(1)->Quotekeys(0)->Indent(1)->Dump' | sponge $@ +data/writing-latn.inc.pl: tools/perlinc-static $$(@F) + $< $(word 2,$^) | sponge $@ diff --git a/tools/perlinc-static b/tools/perlinc-static new file mode 100755 index 0000000..4edf5ac --- /dev/null +++ b/tools/perlinc-static @@ -0,0 +1,8 @@ +#!/usr/bin/env perl +use 5.014; +use warnings; + +use Data::Dumper; + +my @data = do $ARGV[0] or die $@; +print Data::Dumper->new([\@data])->Terse(1)->Quotekeys(0)->Indent(1)->Dump; -- 2.30.0