From 711a58f028c23833ab42251fa8f524d3848d2318 Mon Sep 17 00:00:00 2001 From: william3 Date: Sun, 21 Jul 2013 20:14:38 +0200 Subject: [PATCH] update README --- README.md | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 4f04e2e..adbbab7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ This archive contains standard, useful autoconf macros for detecting OCaml, findlib, OCaml packages, etc. -It allows to compile ocaml project with benefits of autoconf features (C dependencies, library dependencies, multi platform, cross compilation). The ocaml compilation part can be handled with standard Makefiles or ocamlbuild. +It allows to compile ocaml project with benefits of powerful autoconf features (C dependencies, library dependencies, multi platform, cross compilation). The ocaml compilation part can be handled with standard Makefiles or ocamlbuild. This project contains improvements on the base project, with no activity since 2009, which home page is: http://ocaml-autoconf.forge.ocamlcore.org/. Improvements are : @@ -22,34 +22,38 @@ Authors Use --- -Copy ocaml.m4 into the autoconf macros directory of your project (usually m4/, but can be changed with AC_CONFIG_MACRO_DIR in configure.ac or configure.in). If it does not exists, create it : +Copy ocaml.m4 into the autoconf macros directory of your project (usually m4/, but could be changed with AC_CONFIG_MACRO_DIR). Then you would want to add the following lines to configure.ac : - mkdir m4 - aclocal -I m4 + m4_include([m4/ocaml.m4]) + AC_PROG_OCAML() + AC_PROG_FINDLIB -Then refere to ocaml related macros from your configure.ac or configure.in file. Almost every OCaml project should use AC_PROG_OCAML first and probably AC_PROG_FINDLIB right after it. - -You can build and install ocaml.m4 man page, then access it using : - - man ocaml.m4 +You are ready to include ocaml-autoconf macros in configure.ac. Once it is done, use something like this: + autoreconf -fi Documentation ------------- ocaml-autoconf is an extension to autoconf. You will need to learn how to use autoconf before, which is the most difficult part. One should follow a tutorial on the net. -Then have a look at an ocaml project that uses ocaml-autoconf : https://forge.ocamlcore.org/projects/lablgtk/ +Then have a look at some ocaml projects that uses ocaml-autoconf : +* https://forge.ocamlcore.org/projects/lablgtk/ +* http://www.cairographics.org/cairo-ocaml/ -To understand the macros, the best way is to look at ocaml.m4 macro file, with the autoconf reference manual beside : http://www.gnu.org/software/autoconf/manual/index.html +ocaml-autoconf macros reference manual : +* one good way is to look at ocaml.m4 file, along with the [autoconf reference manual] [1] beside +* also, the [ocaml-autoconf reference manual] [2] is almost up to date -a reference manual almost up to date, specific to ocaml macros, is available at http://forge.ocamlcore.org/docman/view.php/69/53/ocaml.m4.html + [1]: http://www.gnu.org/software/autoconf/manual/index.html + [2]: http://forge.ocamlcore.org/docman/view.php/69/53/ocaml.m4.html "ocaml-autoconf reference manual" See the examples/ directory for a project skeleton using ocaml-autoconf, autoconf, and automake for an ocaml project. -Building ocaml macros documentation ------------------------------------ + +Optional installation of macro and man page +------------------------------------------- To build the manual page, you'll need 'perldoc' (part of Perl). @@ -61,6 +65,11 @@ To install the manual page and macro centrally, do: make install +You can then use : + + man ocaml.m4 + + Development -----------