]> begriffs open source - libtap/blob - INSTALL
Add install section to README; add make check note.
[libtap] / INSTALL
1 To install libtap on a unix-like system:
2
3     $ make
4     $ make check
5     $ make install
6
7 Note that `make check` runs Perl unit-tests, which require the
8 Test::Differences module from CPAN; if you run them, make sure to install it.
9 To compile with gcc -ansi, run
10
11     $ make ANSI=1
12
13 On Windows, the library can be created by first setting up
14 the correct development environment variables. Usually this
15 is done by running vcvars32.bat included in the visual studio
16 distribution. You should also install gnu make which can be
17 found at http://gnuwin32.sourceforge.net/packages/make.htm.
18 And you should have perl to run the tests although this isnt
19 absolutely necessary. Once this is done, you should be able to
20 run the following:
21
22     > make -f Makefile.win
23     > make check
24
25 Alternatively, you might want to use the visual studio project file
26 included by Alexander Kahl (e-user).
27
28 If you want to use it directly in another project, you can copy tap.c
29 and tap.h there and it shouldn't have a problem compiling.
30
31     $ ls
32     tap.c tap.h test.c
33     $ cat test.c
34     #include "tap.h"
35     int main () {
36         plan(1);
37         ok(50 + 5, "foo %s", "bar");
38         done_testing();
39     }
40     $ gcc test.c tap.c
41     $ a.out
42     1..1
43     ok 1 - foo bar
44