I've been meaning to copy some of my personal C libraries to
CCAN, Rusty Russell's C Code Archive.
It's not yet quite as comprehensive as he would like, I suspect, but it's
certainly a good project. And I think, bold as this may be, that I have
something to offer it even if I'm not
a full-time C programmer.
The thing that's scared me off is the whole "meeting someone else's standards"
thing. So after Rusty's talk at OSDC
this year, and finding out that 'ccanlint' can prompt you with what you need
to do to make a good package, I decided to give it a go. And after I started
having a few minor problems understanding exactly what I needed to do to get
it working, I decided to write it down here for other people.
- Check out the Git repository:
git clone git://git.ozlabs.org/~ccan/ccan ; cd ccan
- Make everything:
make
- Make the thing that isn't included in everything that you really need:
make tools/ccanlint/ccanlint
- Create a directory for my work and put the already written stuff in
there:
mkdir ccan/cfile; cd ccan/cfile; cp ~/coding/pwlib-c/cfile/cfile* .
- Save yourself some typing:
export CCT=../../tools; export CCL=$CCT/ccanlint/ccanlint
- Generate a standard configuration file for the project:
$CCT/configurator/configurator > config.h
- Check what you've got so far:
$CCL
ccanlint will ask you if you want to create a _info file. This is the
file which declares the 'metadata' about a ccan module. It's a C program.
Let it generate it.
- Check what you've got so far:
$CCL
Keep repeating this step, fixing what ccanlint tells you is wrong, until you
get a module in some form.
- Submit the module for inclusion in CCAN:
haven't done this yet.