automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: first attempt at ocaml support


From: Ralf Wildenhues
Subject: Re: first attempt at ocaml support
Date: Mon, 18 Dec 2006 18:25:24 +0100
User-agent: Mutt/1.5.13 (2006-11-01)

Hello Guillaume,

Thanks for your work on this, and apologies for my lack of feedback.

* Guillaume Rousse wrote on Fri, Dec 15, 2006 at 06:23:36PM CET:
> 
> Here are the current issues:
> Ocaml actually support two different compilation modes,  native and
> bytecode. The current compilation command in the registration template
> is for bytecode only, and I don't know if automake architecture allow to
> define two compilation rules for each source file.

Hmm.  How would Automake know which one to use?  Is that a typical
developer's choice, user's choice, or can Automake do as it likes?

> AM_DEPENDENCIES(OCAML) actually try to find which type of computation is
> suitable, using a C compiler-targeted test... and fails. Obvisouly, I
> need to force it there.

For the patch to work at all, I need a definition of AC_PROG_OCAML.
But my Autoconf does not have this.  Do you have a (possibly
preliminary) patch for this?

> Last, once the patch applied, I can't build and install automake anymore:
> address@hidden automake-1.10.ocaml]$ LC_ALL=C make
>  cd . &&
> perllibdir=/home/alceste/rousse/work/automake-1.10.ocaml"/lib:./lib"
> /home/alceste/rousse/work/automake-1.10.ocaml/automake --libdir=lib --gnu
> /bin/sh: line 4: /home/alceste/rousse/work/automake-1.10.ocaml/automake:
> No such file or directory
> make: *** [Makefile.in] Error 1

I don't even get this far:

| cd ../automake && perllibdir=/tmp/build"/lib:./lib" /tmp/build/aclocal 
--acdir=m4 -I m4
| configure.ac:37: error: defn: undefined macro: AC_PROG_OCAML
| m4/options.m4:31: _AM_IF_OPTION is expanded from...
| m4/init.m4:26: AM_INIT_AUTOMAKE is expanded from...
| configure.ac:37: the top level
| autom4te: /usr/bin/m4 failed with exit status: 1
| aclocal: autom4te failed with exit status: 1


> +# Objective Caml
> +register_language ('name' => 'ocaml',
> +                  'Name' => 'Objective Caml',
> +                  'config_vars' => ['OCAMLDEP', 'OCAMLC'],
> +               'flags' => ['OCAML_INCLUDES', 'OCAMLFLAGS'],
> +               'compiler' => 'COMPILE',

Shouldn't this be something like OCAMLCOMPILE?
FWIW, it's nicer if indented consistenly wrt. TABs.

> --- automake-1.10/lib/depcomp 2006-10-15 18:54:11.000000000 +0200
> +++ automake-1.10.ocaml/lib/depcomp   2006-12-15 16:41:22.000000000 +0100
> @@ -562,6 +562,10 @@
>    rm -f "$tmpdepfile"
>    ;;
>  
> +ocamldep)
> +  "$@" "$source" > "$depfile"

If you output to "$tmpdepfile" and then mv that, there's no broken
output that can confuse 'make' after an interrupted build.

Another hint: it really helps with Automake (and other stuff obviously)
if you start programming by writing tests: what should work.  That also
helps others (like me) see what you'd like to see Automake do.

Thanks again,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]