From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 36DB6BBAF for ; Fri, 21 May 2010 07:18:21 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ans3AHu09UvCCMIakWdsb2JhbACYOwMBhWEVAQEBAQkLCgcRAx+IK7UChRIEg18 X-IronPort-AV: E=Sophos;i="4.53,276,1272837600"; d="scan'208";a="59771109" Received: from smtp6.netcologne.de ([194.8.194.26]) by mail1-smtp-roc.national.inria.fr with ESMTP; 21 May 2010 07:18:20 +0200 Received: from llea.celt.neu (xdsl-213-196-251-73.netcologne.de [213.196.251.73]) by smtp6.netcologne.de (Postfix) with ESMTP id 620A72A117A for ; Fri, 21 May 2010 07:18:20 +0200 (CEST) Message-ID: <4BF6179C.6050102@laposte.net> Date: Fri, 21 May 2010 07:18:20 +0200 From: =?ISO-8859-1?Q?Michael_Gr=FCnewald?= User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100415 SeaMonkey/2.0.4 MIME-Version: 1.0 To: OCaml users Subject: Re: [Caml-list] A Tutorial on GNU Make with OCaml References: <4BF603AA.4030703@msu.edu> In-Reply-To: <4BF603AA.4030703@msu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 makefiles:01 makefiles:01 toolchain:01 makefile:01 ocaml:01 makefile:01 lacks:01 post-doc:01 cheers:01 mor:98 scm:98 wrote:01 wrote:01 compile:01 Dear Jeff, Jeff Shaw wrote: > > Dear OCamlers, > I spent quite a lot of time today getting better acquainted with GNU > make and decided I to share my experience and results. It's a bit on the > newbie friendly side of instruction. > > http://shawjeff.blogspot.com/2010/05/this-is-storytutorial-about-how-i_20.html ten years ago I learned GNU Make and found it awful to program. I had the feeling that it is nit meant to write complex (or mildly complex) makefiles. Instead makefiles should be written by another program. I may be wrong but I think that GNU Make shines when it is used as part of the auto-tools chain, that you may also need to learn. My personal taste goes rather to BSD Make (make in FreeBSD, bsdmake in OS-X and bmake in some other places): I found it much mor eeasy to program, and the FreeBSD build toolchain and ports collection provide a significant amount of Makefile techniques one can draws its inspiration from. I wrote my own macros for my OCaml projects. You can find them here: http://home.gna.org/bsdmakepscripts/ If you are interested in make and makefile techniques, you may have interest in the macros I wrote. You can see them in action in https://forge.ocamlcore.org/scm/viewvc.php/trunk/?root=libertine Read the various makefiles you found in the repository! Note that if you are looking for an efficient way to handle your projects, it seems that ocamlbuild might be a more reasonable approach. I never used it though. The OCaml build system I wrote is not that good as I would like it to be, for instance it lacks the possibility to compile several versions of a library or program against different ocamlbuild predicates. For simple things, it works very good, however! Of course I am very busy (math post-doc) so I never really wrote documentation for these macros, but the examples are here and I may have time for questions. Remark: the TeX oriented macros I also wrote *are* a bit documented! See http://home.gna.org/bsdmakepscripts/tex.html -- Cheers, Michael