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=0.4 required=5.0 tests=AWL 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 C5E50BC37 for ; Tue, 18 Aug 2009 04:15:58 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhQFAIOriUrIuX5EYWdsb2JhbACaeCIhunWEGQWFcw X-IronPort-AV: E=Sophos;i="4.43,399,1246831200"; d="scan'208";a="44777742" Received: from mta21.f3.k8.com.br ([200.185.126.68]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Aug 2009 04:15:57 +0200 Received: from localhost (localhost [127.0.0.1]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id 3A95B280008D; Tue, 18 Aug 2009 02:15:53 +0000 (GMT) X-Virus-Scanned: amavisd-new at k8.com.br Received: from smtpa.f3.k8.com.br ([127.0.0.1]) by localhost (mta21.f3.k8.com.br [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yJR+Mn0IM8ck; Tue, 18 Aug 2009 02:15:53 +0000 (GMT) Received: from [189.106.92.151] (unknown [189.106.92.151]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id 00A792800088; Tue, 18 Aug 2009 02:15:51 +0000 (GMT) Subject: Re: [Caml-list] Conditional compilation From: Andre Nathan To: Edgar Friendly Cc: caml-list@yquem.inria.fr In-Reply-To: <4A8A0B3C.10504@gmail.com> References: <4A8A0B3C.10504@gmail.com> Content-Type: text/plain Date: Mon, 17 Aug 2009 23:26:52 -0300 Message-Id: <1250562412.6289.8.camel@homesick> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; compilation:01 ifdef:01 foo:01 -pp:01 camlp:01 camlp:01 cmo:01 foo:01 ifdef:01 nathan:98 2009:98 edgar:98 wrote:01 caml-list:01 conditional:04 On Mon, 2009-08-17 at 22:00 -0400, Edgar Friendly wrote: > Is there a better way to do this? The path I'm following is looking > very byzantine compared to C's [-DFOO] + [#ifdef FOO]. In ospec I use -pp "camlp4o Camlp4MacroParser.cmo -D FOO" which can then be tested in the code with IFDEF FOO THEN ... END HTH, Andre