Add installation instructions.
[sgt/halibut] / INSTALL
1 Installation guide for Halibut
2 ==============================
3
4 This file is a guide to building and installing the documentation
5 utility `Halibut' from its source archive.
6
7 If you are reading this, then you have probably already unpacked the
8 source archive somewhere.
9
10 Building Halibut
11 ----------------
12
13 If you have GNU make and gcc, you should simply be able to type
14 `make'. The Makefile will generate a `build' subdirectory, and will
15 put all the object files and binaries in there.
16
17 Halibut unfortunately does not yet come with an autoconf-generated
18 makefile, so if you do not have these utilities then you will have
19 to do the build manually. Look in the master `Makefile' to find the
20 list of source modules (they will be listed on the line starting
21 `MODULES :=', and continued on lines starting `MODULES +='), compile
22 those files with the C compiler of your choice, and link them
23 together into a binary. In addition to the modules on that list, you
24 will also need to compile `version.c', and if you wish your Halibut
25 binary to identify itself with a version number then you will have
26 to define the preprocessor symbol `VERSION' to the required version
27 number string. On Unix this can be done with a command such as
28
29 cc -c -DVERSION=\"0.9\" version.c
30
31 Halibut's source files are intended to be almost entirely portable
32 ANSI C. If they fail to compile and run correctly on your compiler,
33 this might very well be considered a bug.
34
35 Building the Halibut manual
36 ---------------------------
37
38 Once you have built Halibut itself, you might well want to build its
39 manual. If you're using GNU make, you can do this just by changing
40 into the `doc' subdirectory and typing `make'. (This relies on the
41 Halibut binary you built in the previous step being present in the
42 `build' subdirectory.)
43
44 Failing that, you will need to read the Makefile and run a manual
45 Halibut command, of the form
46
47 halibut --text=halibut.txt --html blurb.but intro.but [...] index.but
48
49 (The precise list of .but files is given at the top of doc/Makefile.)
50
51 This will build plain text documentation in `halibut.txt', and a set
52 of HTML files (*.html). It will also build a short man page
53 `halibut.1', although this is by no means a replacement for the full
54 manual.
55
56 Installing Halibut
57 ------------------
58
59 Halibut requires no additional data files. Simply install the
60 binary, man page and full documentation in appropriate places for
61 your system.