#!/usr/bin/perl -s use common::sense; my $goal = shift; open( F, "|-", "make -f - $goal"); my $last; while(){ chomp; last if /__END__/; addlogintheend($last,$_); print F "$_\n"; $last = $_; }; sub addlogintheend{ my ($last,$cur)=@_; if($last =~ m/^\s+\S/ and $cur =~ m/^\s*$/){ ## add a print F q{ @ echo `date +'%F %T'` ":" $< "==> " $@ >> _conclave-log}."\n\n"; } } close F; __DATA__ V=2 SHELL = /bin/bash .PRECIOUS: %.siglas %.cor %.idsexpand %.idsdic %.idsexp %.idsabr %.idssplit %.idsdic %.idseq %.cor: %.rawcor limpa_comments $< > $@ %.siglas: %.cor grep -o -P -w '[A-Z]{2,5}' $< \ | sort | uniq -c | sort -nr \ | aspell -l en list > $*.fullsiglas head -n 500 $*.fullsiglas \ > $@ %.idsexpand: %.ids %.cor _dict time perl passa_a_ferro3 -f=$< $*.cor > $@ %.idsdic: %.idsexpand _dict perl pospassa_a_ferro $< > $@ %.idsexp: %.idsdic awk -F= '($$2 == "exp") && length($$1) < 6 \ {a[$$1]++;print $$1 "," $$3}' $< | grep -v -P '\d' > $@ # awk -F= '($$2 == "exp") && !a[$$1] && length($$1) < 6 \ # {a[$$1]++;print $$1 "," $$3}' $< | grep -v -P '\d' > $@ %.idsabr: %.idsdic awk -F= '($$2 == "abr") && !a[$$1] && length($$1) < 6 \ {a[$$1]++;print $$1 "," $$3}' $< | grep -v -P '\d' > $@ %.idssplit: %.idsdic awk -F= '($$2 == "que") && !a[$$1] && length($$1) < 15 \ {a[$$1]++;print $$1 "," $$3}' $< | grep -v -P '\d' > $@ %.idseq: %.idsdic awk -F= '($$2 == "eq") && !a[$$1] && length($$1) < 15 \ {a[$$1]++;print $$1 "," $$3}' $< | grep -v -P '\d' > $@ %.final: %.idsexp %.idssplit %.idsabr %.idseq perl finalcleaning $* > $@ _dict: conc-isplitter-dicts abbreviations > _dict conc-isplitter-dicts acronyms >> _dict conc-isplitter-dicts programming >> _dict sort -u _dict > _aux; mv _aux _dict __END__ =encoding utf8 =head1 NAME conclavecbd - Conclave corpora based dicionaries =head1 SYNOPSIS conclavecbd goal =head1 DESCRIPTION =head2 EXPORT =head1 AUTHOR J.Joao Almeida, jj@di.uminho.pt =head1 SEE ALSO perl(1). =cut