From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, MAILTO_TO_SPAM_ADDR,SPF_NEUTRAL autolearn=disabled version=3.1.3 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 41C31BC37 for ; Tue, 18 Aug 2009 09:00:30 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQCAE/uiUrRVdrZimdsb2JhbACaST8BAQEKCQwHEQWsQ5AKAQMCBIQVBYIqhi8 X-IronPort-AV: E=Sophos;i="4.43,401,1246831200"; d="scan'208";a="44783075" Received: from mail-bw0-f217.google.com ([209.85.218.217]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Aug 2009 09:00:30 +0200 Received: by bwz17 with SMTP id 17so2752530bwz.45 for ; Tue, 18 Aug 2009 00:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=tIynFscKVHUkCYnmQTAgxpwx9hl8CgUZUR/b6UuqN+0=; b=unV4T8ySqKB8uSRqFYOghaBpub+2H1qgKIVlEH8O7cjc82rsoROMrFEQUGjWoWXg1j mkiw97IRYk4kHukwuQtuKRh21FhyewWgxDk5Ms0yW7zhv134If4rNPbuX/REq12qR9+E zQCxmy0JisVfShV/dc2SJ94XLV5MQdg6TWLB8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=SbrIV8YJ0r1usMbcIBSEVRLpLBEVaojIQBa7o3E8FVvZdQFdN2vPIlFKzuwXMqWLFe a1IfqiaP0GJKAtmmcYj0dcHeMWH50LcTqxoUJ6HWrtlES/Au1xeUuUmBdLkPwg8Bnfm2 mbcJ2rW/2MgBimwVIzy9EZFbncc4hoVyqGz7o= MIME-Version: 1.0 Sender: oandrieu@gmail.com Received: by 10.204.8.79 with SMTP id g15mr3472970bkg.202.1250578829106; Tue, 18 Aug 2009 00:00:29 -0700 (PDT) In-Reply-To: <4A8A13EE.3080805@gmail.com> References: <4A8A0B3C.10504@gmail.com> <1250562412.6289.8.camel@homesick> <4A8A13EE.3080805@gmail.com> Date: Tue, 18 Aug 2009 09:00:29 +0200 X-Google-Sender-Auth: ff501439fa2f62ff Message-ID: <95513600908180000h2a813bb1hc2d935f532e16c24@mail.gmail.com> Subject: Re: [Caml-list] Conditional compilation From: Olivier Andrieu To: Edgar Friendly Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; compilation:01 andrieu:01 oandrieu:01 mismatch:01 camlp:01 ocaml:01 camlp:01 autoconf:01 makefile:01 -pp:01 autoconf:01 makefile:01 makefiles:01 2009:98 edgar:98 On Tue, Aug 18, 2009 at 04:37, Edgar Friendly wrote: > I'm starting to think that optcomp is just a mismatch for what I'm > trying to do, and I'm trying to use the wrong tool for the job. =A0That > said, I don't think it's the best solution (especially with already long > compile times for the project) to use both optcomp and > Camlp4MacroParser, so I guess I should figure out how to do > =A0 =A0 =A0 =A0#if ocaml_version < (3, 11) > in Camlp4MacroParser. =A0I guess autoconf might be of some help here, > although I don't see an easy way to to pass text from an > autoconf-created Makefile through ocamlbuild into only some files' [-pp] > commands. =A0I think myocamlbuild.ml might be the key, maybe autoconf can > produce it as well as Makefile. sure, autoconf can produce any kind of file: it simply replace occurrences of @VARIABLE@. It's traditionally used to create makefiles or shell scripts but it'll work on a .ml file just as well. --=20 Olivier