From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id E5BB27F0A6 for ; Thu, 20 Aug 2015 15:36:06 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.15,714,1432591200"; d="scan'208";a="174311938" Received: from meleze.ens.fr (HELO [129.199.99.114]) ([129.199.99.114]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 20 Aug 2015 15:36:06 +0200 Message-ID: <55D5D7C6.5050300@inria.fr> Date: Thu, 20 Aug 2015 15:36:06 +0200 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: caml users Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Caml-list] getting rid of ocamlbuild's .mlpack files in a project Dear list, Just a quick note for posterity on how to remove a .mlpack file from a project, since Google was not my friend on this subject. .mlpack files are a feature supported by ocamlbuild. As documented in section 18.3.16 of http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual032.html I think only ocamlbuild supports .mlpack files. So, you might want to get rid of them because you are switching a project to another build system. Or, maybe, you want the "feature" without becoming bound to ocamlbuild. In any case, here is a recipe that works for me. I replaced the file util.mlpack --- util/Toto --- by the file util.mlp --- module Toto : sig #include "util/toto.mli" end = struct #include "util/toto.ml" end --- Then, using the excellent cppo ocaml preprocessor from Martin Jambon, you can do: cppo util.mlp > util.ml I think this util.ml file does explicitely what the util.mlpack file was doing when processed by ocamlbuild, at the cost of a preprocessing step. Best regards, Francois.