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 3155D7EEF8 for ; Tue, 30 Jun 2015 19:08:02 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of Pietro.Abate@pps.univ-paris-diderot.fr) identity=pra; client-ip=194.254.61.138; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="abate@pps.univ-paris-diderot.fr"; x-sender="Pietro.Abate@pps.univ-paris-diderot.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of abate@pps.univ-paris-diderot.fr) identity=mailfrom; client-ip=194.254.61.138; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="abate@pps.univ-paris-diderot.fr"; x-sender="abate@pps.univ-paris-diderot.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@korolev.univ-paris7.fr) identity=helo; client-ip=194.254.61.138; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="abate@pps.univ-paris-diderot.fr"; x-sender="postmaster@korolev.univ-paris7.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CNAQBhy5JVnIo9/sJbgmZ/X78vh1JMAQEBAQEBEgEBAQEBCAsJCSEuhGMZYjQFd4gUAQOiA6cPkG2DAYEUBZQHhFqGfIF/lj0CgW8BCwGCJm2CSAEBAQ X-IPAS-Result: A0CNAQBhy5JVnIo9/sJbgmZ/X78vh1JMAQEBAQEBEgEBAQEBCAsJCSEuhGMZYjQFd4gUAQOiA6cPkG2DAYEUBZQHhFqGfIF/lj0CgW8BCwGCJm2CSAEBAQ X-IronPort-AV: E=Sophos;i="5.15,379,1432591200"; d="scan'208";a="168116275" Received: from korolev.univ-paris7.fr ([194.254.61.138]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Jun 2015 19:08:01 +0200 Received: from potemkin.univ-paris7.fr (potemkin.univ-paris7.fr [IPv6:2001:660:3301:8000::1:1]) by korolev.univ-paris7.fr (8.14.4/8.14.4/relay1/56100) with ESMTP id t5UH81uo005788 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 30 Jun 2015 19:08:01 +0200 Received: from mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [81.194.30.253]) by potemkin.univ-paris7.fr (8.14.4/8.14.4/relay2/56228) with ESMTP id t5UH81Oq004593 for ; Tue, 30 Jun 2015 19:08:01 +0200 Received: from mailhub.math.univ-paris-diderot.fr (localhost [127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTP id 90AD761F9A for ; Tue, 30 Jun 2015 19:08:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at math.univ-paris-diderot.fr Received: from mailhub.math.univ-paris-diderot.fr ([127.0.0.1]) by mailhub.math.univ-paris-diderot.fr (mailhub.math.univ-paris-diderot.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id SlLkiNBKV8na for ; Tue, 30 Jun 2015 19:08:00 +0200 (CEST) Received: from pps.univ-paris-diderot.fr (perens.inria.fr [128.93.60.79]) (Authenticated sender: abate) by mailhub.math.univ-paris-diderot.fr (Postfix) with ESMTPSA id 97D2F61F9D for ; Tue, 30 Jun 2015 19:08:00 +0200 (CEST) Received: (nullmailer pid 30499 invoked by uid 1000); Tue, 30 Jun 2015 17:08:00 -0000 Date: Tue, 30 Jun 2015 19:08:00 +0200 From: Pietro Abate To: caml-list@inria.fr Message-ID: <20150630170800.GA30250@pps.univ-paris-diderot.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: GNU/Linux X-Organization: PPS - =?iso-8859-1?Q?Universit?= =?iso-8859-1?Q?=E9?= Paris Diderot - Paris 7 User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (korolev.univ-paris7.fr [IPv6:2001:660:3301:8000::1:2]); Tue, 30 Jun 2015 19:08:01 +0200 (CEST) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (potemkin.univ-paris7.fr [194.254.61.141]); Tue, 30 Jun 2015 19:08:01 +0200 (CEST) X-Miltered: at korolev with ID 5592CCF1.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-Miltered: at potemkin with ID 5592CCF1.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 5592CCF1.000 from potemkin.univ-paris7.fr/potemkin.univ-paris7.fr/null/potemkin.univ-paris7.fr/ X-j-chkmail-Enveloppe: 5592CCF1.000 from mailhub.math.univ-paris-diderot.fr/mailhub.math.univ-paris-diderot.fr/null/mailhub.math.univ-paris-diderot.fr/ X-j-chkmail-Score: MSGID : 5592CCF1.000 on korolev.univ-paris7.fr : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Score: MSGID : 5592CCF1.000 on potemkin.univ-paris7.fr : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Status: Ham X-j-chkmail-Status: Ham Subject: [Caml-list] pre-process myocamlbuild.ml with ocamlbuild ... Hi all, maybe, not the best subject of the week, I know . I'd like to pre-process the file myocamlbuild.ml with cppo before building it. The reason is that I have a few unused ocamlbuild tags in my _tags file (that is auto generated by a script ...), and I'd like to remove all warnings using #ifdef OCAML4022 Ocamlbuild_pack.Flags.mark_tag_used "use_" ;; Ocamlbuild_pack.Flags.mark_tag_used "pkg_" ;; Ocamlbuild_pack.Flags.mark_tag_used "link_" ;; #endif The problem is that Ocamlbuild_pack.Flags.mark_tag_used exists only with ocamlbuild < 4.02 . my naive idea is to pass ocamlbuild a preprocessing tag of the form -plugin-tag "pp(cppo)" and then let it handle the rest. But apparently this does not work. How can I convince ocamlbuild to build my plugin using a preprocessing step ? Instead of this : e$ocamlbuild + /usr/bin/ocamlopt.opt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild File "myocamlbuild.ml", line 5, characters 0-1: Error: Syntax error I'd like to build it as : $/usr/bin/ocamlopt.opt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -pp "cppo" myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild what is the magic ocamlbuild incantation ? Or alternatively, Do you see another solution to my small problem ? thanks, p