caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Maxence Guesdon <maxence.guesdon@inria.fr>
To: Jeremy Fincher <fincher.8@osu.edu>
Cc: caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] What's the proper way to release ocaml projects?
Date: Tue, 23 Oct 2001 13:24:33 -0400	[thread overview]
Message-ID: <3BD5A7D1.2010402@inria.fr> (raw)
In-Reply-To: <20011022175711.A51427@functor.resnet.ohio-state.edu>

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 <ocaml_dir>/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


      parent reply	other threads:[~2001-10-23 11:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-22 21:57 Jeremy Fincher
2001-10-23 10:47 ` Fabrice Le Fessant
2001-10-23 17:24 ` Maxence Guesdon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BD5A7D1.2010402@inria.fr \
    --to=maxence.guesdon@inria.fr \
    --cc=caml-list@pauillac.inria.fr \
    --cc=fincher.8@osu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).