From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA29137; Tue, 23 Oct 2001 13:21:58 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA29340 for ; Tue, 23 Oct 2001 13:21:57 +0200 (MET DST) Received: from inria.fr (santenay.inria.fr [128.93.8.59]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f9NBLtD18198; Tue, 23 Oct 2001 13:21:55 +0200 (MET DST) Message-ID: <3BD5A7D1.2010402@inria.fr> Date: Tue, 23 Oct 2001 13:24:33 -0400 From: Maxence Guesdon User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012 X-Accept-Language: fr, en MIME-Version: 1.0 To: Jeremy Fincher CC: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] What's the proper way to release ocaml projects? References: <20011022175711.A51427@functor.resnet.ohio-state.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Jeremy Fincher wrote: > I have a few small libraries I've written in the process of writing an IRC bot. I'd like to release the code to these libraries (and maybe even the IRC bot itself :)) but I'm a bit unclear about the best way to do so. > > I've translated a few Python modules to varying degrees and written a tiny database more or less based on CDB ( http://cr.yp.to/cdb.html ). What's the best way to make these available, and what preparation should I do to the makefiles/etc. to make these actual "packages" rather than simply bundles of code? > A nice way is to provide your sources with a configure script and a makefile with the following targets : - depend : build the module dependencies in a .depend file - all : compile all your project both bytecode and native code (all: byte opt) - byte : compile all your project with ocaml or ocaml.opt - opt : compile all your project with ocamlopt or ocamlopt.opt - install : install your compiled files in a subdir of $OCAMLLIB where $OCAMLLIB is defined as /lib/ocaml - installopt (eventually) installs the nativecode files to the install directory. - doc : build the doc (you can use OCamldoc for example ;-) The 'all' target is usually the first, such that 'make' will be equivalent to 'make all'. In the install directory, you usually put .mli, .cm[i|o|x|a|xa], and .a files (.a files if you have C-libraries in your project). A good start to provide a configure script and use it in your Makefile : http://www.lri.fr/~filliatr/ftp/ocaml/misc/configure.in http://www.lri.fr/~filliatr/ftp/ocaml/misc/Makefile.in Other examples of Makefiles and configure can be found here : http://caml.inria.fr/hump.html#Makefiles__autoconf_support_____ Of course you'all add a README or INSTALL files (or both) where you explain what your project/lib is, what is required and how to compile and install it. A 'Changes' file is appreciated too to log differences between releases. When all is ok, you can tar your directory : tar cvfz myproject-0_1.tar.gz myproject/ The .tar.gz extension is better than .tgz because some browsers (for example netscape) recognize .tar.gz extension and open the 'save' dialog box when yor file is clicked, while with .tgz extension, the binary file is displayed on the screen and you have to 'File/Save as' it. Being in the parent directory of your project directory for this command is important since, this way, your future users won't have to create a specific directory to untar your code, it will be created wy the tar x... command. When your tar file is ready and available from a link on your site or somewhere on the net, you can announce the release by sending an email to caml-announce@inria.fr. You can also register it on http://www.npc.de/ocaml/linkdb/frames.html and email hump@caml.inria.fr if you want your contrib to be added to the caml hump : http://caml.inria.fr/hump.html That's it. I hope i didn't frighten you ;-) -- Maxence Guesdon ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr