On Tue, Sep 08, 2020 at 10:20:18PM +0200, Ralf Hemmecke wrote:
> Waldek,
> 
> I usually install gawk on my machine, but on testing Debian 10 I didn't.
> FriCAS configure ran fine with the default mawk, but failed at my ht.awk
> script in the "formatted" branch.
> 
> mawk complained about the "next" in line 554.
> 
> https://github.com/hemmecke/fricas/blob/formatted/src/doc/ht.awk#L554
> 
> Before a try to look what  is to be changed, can you confirm that FriCAS
> should run fine with any awk?
> 
> The code in configure.ac
> https://github.com/hemmecke/fricas/blob/formatted/configure.ac#L101
> claims at least for solaris9 that gawk is needed.

Yes, FriCAS should build with different awk, in particular mawk.
Solaris is somewhat special.  Some "standard" Solaris tools
were/are extremaly old fashioned it make no sense to support
so old tools on rare platform.  OTOH there were fixes to our
awk scripts and there is good chance that they will work now.
But it seems that nobody tried Solaris in many years so we keep
it without change.

> Is FriCAS supposed to work with mawk? Can we require gawk in general or
> would you rather like to be able to build with any awk?
> 
> If it is any awk, then what is the language that is accepted for FriCAS
> awk scripts, since there are quite a few differences between the various
> awks.

There is Posix standard for awk so core language should be the
same on all reasonably modern awk.  In practice we deal with
issues in reactive manner: it there is a problem we fix it.
Currenly mawk is main alternative...

IIRC manual for GNU awk said which parts are standard and
which are extentions.
> 
> In that "any awk case", it would be helpful to know the reason why mawk says
> 
> make[3]: Entering directory '/home/hemmecke/scratch/fricas/src/doc'
> mawk -f /home/hemmecke/g/fricas/src/doc/ht.awk
> /home/hemmecke/g/fricas/src/doc/htex/ug02.htex tmp > ug02.ht
> mawk: /home/hemmecke/g/fricas/src/doc/ht.awk: line 554: improper use of next
> make[3]: *** [Makefile:477: ug02.ht] Error 2

>From mawk manual:

:     Program flow at the pattern {action} level can be changed with the
:
:            next
:            exit  opt_expr

so it seems that you are not allowed to use next in functions.
-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/20200909105421.GB39118%40math.uni.wroc.pl.

Reply via email to