Raymond Toy <toy.raymond at gmail.com> writes:
> parse-info.sh is full of bashisms, so we might as well say so and use
> #!/bin/bash instead of #!/bin/sh. (This shows up on solaris where sh
> is a barebones sh.)
>
> common-lang-recode.mk uses grep -F. This isn't supported on solaris,
> but solaris has fgrep. I guess to be portable, common-lang-recode.mk
> should be created from configure and configure should check for
> fgrep. Maybe want to check for iconv and recode which I think
> configure already does.
>
>
> Also, the part in parse-info.sh that tries to load the compiled
> parse-info could probably be done more portably using
> compile-file-pathname like so:
>
> pi_compiled=$(find "$pi_dir" -name "parse-info-$lisp*" | head -1)
> if test -n "$pi_compiled"; then
> pi_lisp=$pi_dir/parse-info-$lisp.lisp
> else
> pi_lisp=$pi_dir/parse-info.lisp
> fi
>
> $maxima_local --very-quiet -l $lisp <<EOF
> :lisp (load (compile-file-pathname "$pi_lisp"))
> :lisp (parse-info:make-info-offsets "$info_file")
> EOF
>
> Also, I think head -1 is more portable than head -n 1.
>
> And surprisingly, gcl has compile-file-pathname so this replacement
> works just fine.
>
> With these few changes, I can build the documentation on solaris.
>
> What do you think?
Great! Embarrassingly, my searching of the clhs didn't find
compile-file-pathname... Are you happy to push the relevant changes?
Otherwise, I'll try and make time tomorrow.
Thank you for going through the code so thoroughly. All of my Unix
experience has been on Linux (and most of my developing, for that
matter), so I find this sort of portability hard to get right.
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130508/38b324fa/attachment-0001.pgp>