From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA24010 for caml-redistribution@pauillac.inria.fr; Thu, 24 Feb 2000 14:48:32 +0100 (MET) Resent-Message-Id: <200002241348.OAA24010@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA18891 for ; Wed, 23 Feb 2000 19:31:50 +0100 (MET) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id TAA25645 for ; Wed, 23 Feb 2000 19:31:49 +0100 (MET) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id TAA11195; Wed, 23 Feb 2000 19:31:30 +0100 (MET) From: Markus Mottl Message-Id: <200002231831.TAA11195@miss.wu-wien.ac.at> Subject: Re: Portability of applications written in OCAML: C stuff To: maxs@in.ot.com.au (Max Skaller) Date: Wed, 23 Feb 2000 19:31:30 +0100 (MET) Cc: caml-list@inria.fr (OCAML) In-Reply-To: <38B31F32.3F0641F4@in.ot.com.au> from "Max Skaller" at Feb 23, 2000 10:43:46 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Thu, 24 Feb 2000 14:48:32 +0100 Resent-To: caml-redistribution@pauillac.inria.fr > The way these packages are distributed is a 'build in separate > directory and install' model. This is NOT acceptable for my > package. I require all components to be built and usable > WITHOUT installing them (with one exception: the standard ocaml (and > python) > distributions). Hm, I don't know about "mlgtk", but what concerns the PCRE, you need not install it anywhere to use it. The only thing you have to do is place directory "{whatever}/pcre_ocaml/pcre-OCaml" on the include- and the library path when you compile/link your project. In case you also use my "OcamlMakefile", this should be fairly easy, e.g. add something like: INCDIRS = ../../pcre-OCaml LIBDIRS = ../../pcre-OCaml LIBS = pcre > [In other words I must distribute IN MY PACKAGE everything > which is not stock standard in the official ocaml distribution, > and a single command must build the whole system] I don't see any problem here - just "entering" into the directory of the "third-party" distribution, "making" and including the directory with the generated libraries should work fine. > 1. DO NOT USE A FILE CALLED 'config.h' > > Such a file will clobber someone elses config.h > Pleae call these files 'pcre_config.h' or 'gdk_config.h' > or whatever. "config.h" is generated by "configure" automatically and is actually part of the C-library "pcre", which I always copy verbatim from its author. Unless you also copy this "configure"-script out of its assigned directory into your source dir, it won't do any harm to your files. > PLEASE use filenames that are specialised to your package, > do NOT use generic names on the assumption your code will > be built with your Makefile in a separate directory. This is impossible. How do you want to guarantee that files of other people don't get overwritten if you mix some distribution with theirs? That's what directories are for! > 2. Do NOT require you package be 'main'. > Only ONE main is allowed, and it is MINE. > Do NOT supply 'main' in ANY C libraries. > (you can supply a sample 'main.c', but is must be that: a sample) I always prefix C-identifiers with very unique names so as to avoid name-clashes. I also don't see any "main"-routine in the underlying PCRE-library other than in example files. > Some of these problems will be alieviated when Ocaml gets a proper > mechanism to add components to the system. This is non-trivial, > but it is handled much better in Python than Ocaml at present. I agree on this: a standard way for adding libraries, etc., would probably boost productivity... Regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl