On Wed, Mar 02, 2016 at 08:38:05PM -0500, Donald Sharp wrote:
> On a side note, extract.pl.in as far as I can tell only is used to auto
> generate the perl binary location.

Hadn't looked at this before sending my previous e-mail, but - it
actually uses more than the perl binary location:

line 71:
    open (FH, "@CPP@ -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6
    -I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib
    -I@top_builddir@/lib -I@top_srcdir@/isisd/topology @CPPFLAGS@ $file
    |");

There's a whopping 8 substitutions on that line...

(Still I agree this could be handled more nicely without making the perl
script a template, e.g. by passing the values through the environment.
Just needs a bit more work...)

> Is there a modern distribution that
> doesn't have perl in /usr/bin?  Would people mind if I removed the
> extract.pl.in -> extract.pl configure creation?
> 
> donald
> 
> On Wed, Mar 2, 2016 at 8:27 PM, <neit...@marshlabs.gaertner.de> wrote:
> 
> > Paul Jakma <p...@jakma.org> wrote:
> >
> > > TBH, I'd rather nuke perl, and go back to AWK script for the
> > > route-types. There was something I wanted to extent or fix to that
> > > but... Perl.
> > >
> > > AWK is a lot more easier to pick up from scratch or just dive into for a
> > > C programmer - the syntax is more compact, and it's C-like. It's also
> > > just one binary.
> >
> > I agree, and rewrote the awk script ages ago to get rid of the "gensub"
> > and make it run with stock awk, obviating the gawk dependency, too.
> > The patch below did the job for me.
> >
> > Alas, I cannot check it anymore because my FreeBSD-4.7 got ridiculed
> > as hopelessly outdated and quagga stopped even making it through autohell
> > a long time ago.
> >
> >                                                 Martin Neitzel
> >
> >
> > diff --git a/lib/memtypes.awk b/lib/memtypes.awk
> > index 5429f6e..f980f77 100644
> > --- a/lib/memtypes.awk
> > +++ b/lib/memtypes.awk
> > @@ -30,8 +30,6 @@
> >  #
> >
> >  BEGIN {
> > -       mlistregex = "memory_list_(.*)\\[\\]";
> > -       mtyperegex = "^(MTYPE_[[:upper:]_[:digit:]]+).*";
> >         header = "/* Auto-generated from memtypes.c by " ARGV[0] ". */\n";
> >         header = header "/* Do not edit! */\n";
> >         header = header "\n#ifndef _QUAGGA_MEMTYPES_H\n";
> > @@ -44,13 +42,15 @@ BEGIN {
> >  # catch lines beginning with 'struct memory list ' and try snag the
> >  # memory_list name. Has to be 3rd field.
> >  ($0 ~ /^struct memory_list /) && (NF >= 3) {
> > -       mlists[lcount++] = gensub(mlistregex, "\\1", "g",$3);
> > +       name=$3; sub(/^memory_list_/, "", name); sub(/ *\[\].*/, "", name)
> > +       mlists[lcount++] = name
> >  }
> >
> >  # snag the MTYPE, it must self-standing and the second field,
> >  # though we do manage to tolerate the , C seperator being appended
> >  ($1 !~ /^\/?\*/) && ($2 ~ /^MTYPE_/) {
> > -       mtype[tcount++] = gensub(mtyperegex, "\\1", "g", $2);
> > +       name=$2; sub(/,$/, "", name)
> > +       mtype[tcount++] = name
> >  }
> >
> >  END {
> >
> > _______________________________________________
> > Quagga-dev mailing list
> > Quagga-dev@lists.quagga.net
> > https://lists.quagga.net/mailman/listinfo/quagga-dev
> >

> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev@lists.quagga.net
> https://lists.quagga.net/mailman/listinfo/quagga-dev



_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to