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 07D3C7F734 for ; Tue, 22 Sep 2015 09:46:19 +0200 (CEST) IronPort-PHdr: 9a23:K7dC+hzWQjdOr9DXCy+O+j09IxM/srCxBDY+r6Qd0eMXIJqq85mqBkHD//Il1AaPBtWHrakVwLOM6ejJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6OyZ/mnLnoodX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4DzKVxeO4DMwX0Ablh5PS1zA5QvmX5H9vy73su568CafNMzyC7szXGLxwb1sTUrHgS0dNjM9uFrcisFqgbgT9B2orQZ+zoqSe4qVOeBzZIvSeNobQSxKWcMHBH8JOZ+1c4ZaV7lJBu1ftYSo4gJW9RY= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-wi0-f174.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.212.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.212.174 as permitted sender) identity=mailfrom; client-ip=209.85.212.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f174.google.com) identity=helo; client-ip=209.85.212.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-wi0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CMAABlBgFWlK7UVdFdhGEGqwmSRAENh3QCgTQHOBQBAQEBAQEBARABAQEBBwsLCR8wgh2CCAEBBBIRHQEbHQEDDAYFCw0CAiYCAiEBAREBBQEcBhMih3YBAxKpFIEwPjGLRoFsgnmKFwoZJw1WhBABAQEBBgIBGQEFDoEUhVGEfYJQgj0HgmmBQwWVZYsagW+BTZIQg1OCIRIjgRcfAQGCRoF/PDOJbQEBAQ X-IPAS-Result: A0CMAABlBgFWlK7UVdFdhGEGqwmSRAENh3QCgTQHOBQBAQEBAQEBARABAQEBBwsLCR8wgh2CCAEBBBIRHQEbHQEDDAYFCw0CAiYCAiEBAREBBQEcBhMih3YBAxKpFIEwPjGLRoFsgnmKFwoZJw1WhBABAQEBBgIBGQEFDoEUhVGEfYJQgj0HgmmBQwWVZYsagW+BTZIQg1OCIRIjgRcfAQGCRoF/PDOJbQEBAQ X-IronPort-AV: E=Sophos;i="5.17,571,1437429600"; d="scan'208";a="178819940" Received: from mail-wi0-f174.google.com ([209.85.212.174]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 22 Sep 2015 09:46:18 +0200 Received: by wiclk2 with SMTP id lk2so10674911wic.1 for ; Tue, 22 Sep 2015 00:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=CDB9i4MShC59F1TvuAfDdTb8u6Piiad5N/sHeESgR0c=; b=mby4QQWqLUB1vKP6lrf5K+yDDYw9Bn3kg8VdR9Av+h9+8w4c4/h8pwPR8sviBBzAE5 qEHUUNaP3DGUy7TQy7Ycykx0epaBQb8TqBZZwt/zfDXq1BmQi4k0Z9rKc9QbJjSvGD+3 xgFahSbiEHd+SC4mfugL51w4F2mbTSpFkbi+LbL1J5oEV8RInNMT+TFnx6pFhCnse1gh 9oUDQUwFNfMHyw61ZhL0KHGNkb878WWJ+uYT0ffRdnXSawIFvXvx/CJdzfd6ME5O5x94 tWx4qVsY2iuqcgfb0ys6NLZKBg99z672wQHFF3eDjueOO+WQe59z3tMZrZfEoXLicdN9 OmlA== X-Received: by 10.194.121.202 with SMTP id lm10mr23575972wjb.98.1442907978409; Tue, 22 Sep 2015 00:46:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.148.212 with HTTP; Tue, 22 Sep 2015 00:45:38 -0700 (PDT) In-Reply-To: References: From: Gabriel Scherer Date: Tue, 22 Sep 2015 09:45:38 +0200 Message-ID: To: Martin DeMello Cc: OCaml List Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] building and using a library in a subdirectory The compiler allows to store C compilation flags in library archives, but not OCaml-level flags, and in any case that would be a dubious idea as hardcoding the path to the ocamlfind packages on your system would make the (bytecode) archive libraries less portable. You can easily define the packages of the final executable in several steps, one per plugin: or : package(foo) ... or : package(bar) Finally, you could also distribute each of your plugin as a separate ocamlfind package (allowing to combine both the link to the archive(s) and information about ocamlfind dependencies in a single place, the package's META file), but that requires re-installing a package for its changes to be visible from the main program -- so it is probably more useful for libraries that are less tightly coupled. On Tue, Sep 22, 2015 at 9:09 AM, Martin DeMello wrote: > On Mon, Sep 21, 2015 at 11:58 PM, Gabriel Scherer > wrote: >> >> > I don't (yet) need dynamic linking; my current main aim with the .mllib >> > setup is to specify the package dependencies for each plugin in its > own >> > section of the _tags file, and not have a long list of every plugin's >> > dependencies in the main module. >> >> Well, that doesn't quite work: you need to have the ocamlfind packages >> passed to the command linking the final executable. >> >> I suppose changing >> <**/puz.*>: ... >> to >> <**/puz.*> or : ... >> could work, as this line seems to pass all the libraries flags. > > > Isn't there any way with a .cmxa to compile the dependencies into a library > and then just have the library as a link-time dependency for the main > project? I can imagine things getting pretty messy once I have several > plugins and have to concatenate all their package deps into the file.* tags > line. > > martin