[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Hyper doc search error
From: |
David MENTRE |
Subject: |
Re: [Axiom-developer] Hyper doc search error |
Date: |
Fri, 17 Feb 2006 11:15:02 +0100 |
Hello Tim,
2006/2/17, root <address@hidden>:
[ about the correct path to awk binary ]
> i'm open to suggestions about how to fix this.
A suggestion: use a ./configure that look for those binaries and write
the Makefile.
Suggestion for the one who would like to tackle this issue: you'll
find in
http://www.linux-france.org/~dmentre/demexp/latest-src/demexp--dev--0.7.tar.gz
a configure script written from scratch. It is under GPL license but,
as the unique author of that code, I give permission to any coder of
Axiom project to reuse it under Axiom's BSD-like license.
----searchpath shell script (don't know where it comes from)------
#!/bin/sh
# Find a program in the path
IFS=':'
for dir in $PATH; do
if test -z "$dir"; then dir=.; fi
if test -f $dir/$1; then exit 0; fi
done
exit 1
-----------------------
It could be used like this:
# do we have ocaml?
echo -n "Looking for ocamlc... "
if sh ./searchpath ocamlc; then
echo "found";
else
echo "not found";
echo "*** OCaml compiler is required for compilation";
echo "*** Please install the package or compile following
instructions found";
echo "*** in README. Source archive available at";
echo "*** http://caml.inria.fr/ocaml/distrib.html";
exit 2;
fi
It would be better if searchpath would return the found path. Here is
a modified searchpath that does this :
#!/bin/sh
# Find a program in the path and prints its location if found
IFS=':'
for dir in $PATH; do
if test -z "$dir"; then dir=.; fi
if test -f $dir/$1; then echo $dir/$1; exit 0; fi
done
exit 1
It should be used like this:
#!/bin/sh
# do we have awk?
echo -n "Looking for awk... "
awk_path=`./searchpath awk`
if [ $? == 0 ]; then
echo "found: $awk_path";
else
echo "not found";
echo "*** Awk is required for compilation";
echo "*** Please install it";
exit 2;
fi
I hope it helps,
Best wishes,
d.
- [Axiom-developer] Hyper doc search error, Antoine Hersen, 2006/02/16
- Re: [Axiom-developer] Hyper doc search error, root, 2006/02/16
- Re: [Axiom-developer] Hyper doc search error,
David MENTRE <=
- Re: [Axiom-developer] Hyper doc search error, Ralf Hemmecke, 2006/02/17
- RE: [Axiom-developer] Hyper doc search error, Bill Page, 2006/02/17
- Re: [Axiom-developer] Hyper doc search error, Gabriel Dos Reis, 2006/02/19
- Re: [Axiom-developer] Hyper doc search error, root, 2006/02/19
- RE: [Axiom-developer] Hyper doc search error, Bill Page, 2006/02/19
- Re: [Axiom-developer] Hyper doc search error, David MENTRE, 2006/02/20
- Re: [Axiom-developer] Hyper doc search error, root, 2006/02/20
- ASDF and ./configure (was: Re: [Axiom-developer] Hyper doc search error), David MENTRE, 2006/02/20
- Re: ASDF and ./configure (was: Re: [Axiom-developer] Hyper doc search error), root, 2006/02/20
- Re: ASDF and ./configure (was: Re: [Axiom-developer] Hyper doc search error), David MENTRE, 2006/02/21