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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B9E5EBBAF for ; Fri, 21 May 2010 10:17:33 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ans3AB7e9UtRZ90xkWdsb2JhbACYOwMBhWEVAQEBAQkLCgcRAx+9DIUSBA X-IronPort-AV: E=Sophos;i="4.53,277,1272837600"; d="scan'208";a="63203888" Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]) by mail4-smtp-sop.national.inria.fr with ESMTP; 21 May 2010 10:17:33 +0200 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20100521081732.FISQ5841.mtaout03-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Fri, 21 May 2010 09:17:32 +0100 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20100521081732.SSEA1586.aamtaout02-winn.ispmail.ntl.com@romulus.metastack.com>; Fri, 21 May 2010 09:17:32 +0100 Received: from Tenor ([172.16.0.8]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id o4L8HKmC014607 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 21 May 2010 09:17:21 +0100 From: "David Allsopp" To: "=?iso-8859-1?Q?'Michael_Gr=FCnewald'?=" , "'OCaml users'" References: <4BF603AA.4030703@msu.edu> <4BF6179C.6050102@laposte.net> In-Reply-To: <4BF6179C.6050102@laposte.net> Subject: RE: [Caml-list] A Tutorial on GNU Make with OCaml Date: Fri, 21 May 2010 09:17:18 +0100 Message-ID: <012101caf8be$085df350$1919d9f0$@romulus.metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJxW3uAbcV/7cfgflM69x6yeTwj0wLlEqC9AogkYqg= Content-Language: en-gb x-cr-hashedpuzzle: CR3l EWEF G5rZ HpYM JtBU K0+7 L4mb P61/ QD20 QZ/B TXcX TbWB UbIW VFy+ VqFH YBac;2;YwBhAG0AbAAtAGwAaQBzAHQAQABpAG4AcgBpAGEALgBmAHIAOwBtAGkAYwBoAGEAZQBsAC4AZwByAHUAbgBlAHcAYQBsAGQAQABsAGEAcABvAHMAdABlAC4AbgBlAHQA;Sosha1_v1;7;{38CE9035-B49E-46A6-B8EB-A7ED21A8E67C};ZAByAGEAQAByAG8AbQB1AGwAdQBzAC4AbQBlAHQAYQBzAHQAYQBjAGsALgBjAG8AbQA=;Fri, 21 May 2010 08:17:12 GMT;UgBFADoAIABbAEMAYQBtAGwALQBsAGkAcwB0AF0AIABBACAAVAB1AHQAbwByAGkAYQBsACAAbwBuACAARwBOAFUAIABNAGEAawBlACAAdwBpAHQAaAAgAE8AQwBhAG0AbAA= x-cr-puzzleid: {38CE9035-B49E-46A6-B8EB-A7ED21A8E67C} Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.1 cv=1ggfb5FlKZQUfF3vzm9UBYZ2uTfLsbs/8dSljwg5+mE= c=1 sm=0 a=M7M7bRqNgDkA:10 a=GQCbJdZ--msA:10 a=8sW17jYxVu0A:10 a=8nJEP1OIZ-IA:10 a=T8MNhlbAAAAA:8 a=q5TUrU19Jw27bd5CME4A:9 a=2MYpM1YFYWzAz-WrUBcA:7 a=ofprquYDTCbMmCy3Wy_SwaCO-esA:4 a=wPNLvfGTeEIA:10 a=gA6IeH5FQcgA:10 a=NWVoK91CQyQA:10 a=_eyguiMTL7smYTD7:21 a=Zbfkx0giu8BnLViu:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-Spam: no; 0.00; ocaml:01 makefiles:01 makefiles:01 ocaml:01 makefile:01 toolchain:01 makefile:01 gmake:01 gmake:01 javascript:98 mor:98 wrote:01 wrote:01 compile:01 maintainers:01 Michael Gr=FCnewald wrote: > Dear Jeff, >=20 > 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 >=20 > 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. I could be wrong about the way it's constructed, but I think you'll find that the Linux kernel build system is *written* (rather than generated) = in GNU make cf. Managing Projects with GNU Make 3rd Ed pp. 218--228. > 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. IMO users of auto-tools fall into two categories - users who need = Makefiles that work cross-platform (so package maintainers) and programmers who = don't regard the build system of their code as worth spending any time on. I similarly 10 years ago (nearly) learned GNU make but my reaction was the opposite to yours - I now have handwritten Makefiles for quite large projects which build projects containing only OCaml but C, JavaScript, = XHTML templates and various other text files, maintain patches against 3rd = party libraries. The Makefile for my website is written in GNU make, runs cross-platform and uses a parallel and distributed build system = (distributed only because it has to compile some programs on BSD and then pull them = back to Windows before uploading) with not an auto-tool in sight (assuming = that we're allowed dependency generators, of course). Granted, I spent a day writing it but to me that's the divide - are you willing to spend the = time handcrafting a fully optimised (and possibly therefore faster) build = system or stick with something that takes a few seconds in an auto-tool. > 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. So essentially you dislike make in general (bmake and gmake aren't = *that* different - though that said on BSD I always use gmake) - simply that on = BSD there are a large number of pre-written Makefiles and Makefile fragments which allow you to produce your Makefiles more quickly. David