[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: ASDF and ./configure
From: |
David MENTRE |
Subject: |
[Axiom-developer] Re: ASDF and ./configure |
Date: |
Wed, 22 Feb 2006 20:58:47 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Hello Tim,
I looked at the ./configure script so I can reply more specifically
now.
root <address@hidden> writes:
> The issue, as i understand it, is not that the configure script
> doesn't work on the systems where it was tested. The issue is that
> the configure script is not robust. Certain problems have to be
> decided.
I understand, this is the issue faced by all ./configure scripts.
You have two options to make it more robust:
1. use the ./configure generated by autoconf tools. There is a lot of
knowledge in them, but most of this knowledge is not needed for
Axiom:
- who needs to build Axiom on outdated systems like Ultrix?
- most of autoconf knowledge is related to C issues, while most
Axiom issues are Lisp ones (once GCL is built, and GCL is using
autoconf),
- when the generated configure script fails, it is a nightmare to
understand *what* is going wrong;
2. continue with the current hand-written script. It seems to me the
most manageable way to *understand* what is happening and to solve
portability issues.
> Given a particular system you need to output a symbol (e.g linux)
> which will be used selector for the inital Makefile.
[...]
> In addition there are some other issues that arise. The noweb tool
> seems to want to use one of 'awk', 'gawk', or 'nawk'. Given that
> noweb is vital to the early processing we need to find which of
> the three is available on the current system and customize the
> main Makefile to use it. This is done on the command line:
>
> make -f Makefile.linux AWK=nawk
This is currently done by the current configure script, right?
> Some systems use differen tool names (e.g. gtar) and those have to
> be able to be overriden also. However, given that it is a lot of
> effort to make sure axiom works on each new system all of this
> knowledge is embedded in the Makefile.pamphlet and selected by
> the system symbol ("solaris" ==> gtar).
This approach seems perfectly right to me.
> Another issue has arisen. It appears that some of the shell
> scripts aren't portable because they use #! paths to execute them.
However, this sentence is *very* surprising! #! has its origins to the
first Unix. On which system did #! failed? Any specific keyword so I can
google it (I already tried but found nothing)?
> Perhaps the configure program can help with the initial value
> selections but it would take some careful thought. It's probably
> better and more robust to rewrite the shell scripts not to use #!
I don't think so. Even autoconf's generated ./configure is using
"#! /bin/sh".
After reading the current ./configure script, it seems relatively well
written and portable to me. I noticed a few things however:
- better write:
fun ()
{
instead of:
fun () {
- use "exit 1" on error: 0 is ok return code for shells;
- the "!" is said to be non portable and should not be used[1];
- the equality of strings is "==", not "=" (as far as I know);
- the handle the several tests, one could use a "case" shell
construct. It would probably be cleaner. ("fix" not included in
following patch)
Here is a patch that intend to fix those issues. Anybody willing to test
it on non Debian Linux system?
configure-1.patch
Description: Text Data
Regarding the current unsatisfying approach where the user need to type
export commands, I propose following solution (not included in above
patch):
- ./configure generates a "Makefile.config" file. This makefile
contains the needed variable definition;
- file "Makefile.config" is included by main Makefile with an "include"
directive. The main Makefile in turn generates Makefile.linux and
calls it as usual.
What do you think of it? From my readings, the "include" make directive
is portable[2].
Best wishes,
d.
Footnotes:
[1]
http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_chapter/autoconf_10.html#SEC122
<<<
!
You can't use !; you'll have to rewrite your code.
>>>
[2] Autoconf manual, section 10. Portable Shell Programming
http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_chapter/autoconf_10.html#SEC114
--
David MENTRE <address@hidden> -- http://wiki.axiom-developer.org/FrontPage
- Re: [Axiom-developer] Hyper doc search error, (continued)
- 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
- RE: ASDF and ./configure (was: Re: [Axiom-developer] Hyper doc searcherror), Bill Page, 2006/02/21
- [Axiom-developer] Re: ASDF and ./configure, C Y, 2006/02/21
- Re: ASDF and ./configure (was: Re: [Axiom-developer] Hyper doc search error), Gabriel Dos Reis, 2006/02/21
- [Axiom-developer] Re: ASDF and ./configure,
David MENTRE <=
- Re: [Axiom-developer] Re: ASDF and ./configure, Gabriel Dos Reis, 2006/02/24
- Message not available
- Re: [Axiom-developer] Re: ASDF and ./configure, Gabriel Dos Reis, 2006/02/24
- Re: [Axiom-developer] Re: ASDF and ./configure, root, 2006/02/24
- Re: [Axiom-developer] Re: ASDF and ./configure, Gabriel Dos Reis, 2006/02/24
- Re: [Axiom-developer] Re: ASDF and ./configure, root, 2006/02/24
- Re: [Axiom-developer] Re: ASDF and ./configure, Gabriel Dos Reis, 2006/02/24
- Re: [Axiom-developer] Re: ASDF and ./configure, David MENTRE, 2006/02/25
- Message not available
- Re: [Axiom-developer] Re: ASDF and ./configure, Gabriel Dos Reis, 2006/02/25
- Re: [Axiom-developer] Re: ASDF and ./configure, root, 2006/02/25
- Re: [Axiom-developer] Re: ASDF and ./configure, C Y, 2006/02/26