查看CUNIT下的README文档,Linux下的安装过程如下
Linux:
In addition to jam, the standard GNU build system is still supported.
The usual sequence of steps should succeed in building and installing CUnit:
1. aclocal (if necessary)
2. autoconf (if necessary)
3. automake (if necessary)
4. chmod u+x configure (if necessary)
5. ./configure --prefix <Your choice of directory for installation>
6. make
7. make install
What's installed:
1. libcunit.a (Library file)
2. CUnit Header files
3. DTD and XSL files supporting xml output files in share directory
4. Man Pages in relevant man directories under the installation path.
5. HTML users guide in the doc subdirectory of the installation path.
6. Example & test programs in the share subdirectory of the install path.
首先下载CUNIT软件,在sourceforge网站下载CUNIT源代码,
执行如下命令解压缩
[root@main dalek]# tar -vxjf CUnit-2.1-2-src.tar.bz2
CUnit-2.1-2/CUnit/Sources/Automated/Automated.c
CUnit-2.1-2/CUnit/Sources/Automated/Makefile.am
CUnit-2.1-2/CUnit/Sources/Automated/Makefile.in
CUnit-2.1-2/config.h.in
CUnit-2.1-2/COPYING
[root@main dalek]# ls
CUnit-2.1-2 CUnit-2.1-2-src.tar.bz2
[root@main dalek]#
[root@main dalek]# cd CUnit-2.1-2
[root@main CUnit-2.1-2]# ls
aclocal.m4 ChangeLog config.h.in configure COPYING cunit.pc.in depcomp Examples install-sh ltmain.sh Makefile.in missing NEWS Share
AUTHORS config.guess config.sub configure.in CUnit CUnit.spec.in doc INSTALL Jamrules.in Makefile.am Man mkinstalldirs README TODO
[root@main CUnit-2.1-2]#
[root@main CUnit-2.1-2]# aclocal
[root@main CUnit-2.1-2]# autoconf
[root@main CUnit-2.1-2]# automake
[root@main CUnit-2.1-2]# chmod 755 configure
[root@main CUnit-2.1-2]# ls
aclocal.m4 ChangeLog config.sub COPYING CUnit.spec.in Examples Jamrules.in Makefile.in mkinstalldirs Share
AUTHORS config.guess configure CUnit depcomp INSTALL ltmain.sh Man NEWS TODO
autom4te.cache config.h.in configure.in cunit.pc.in doc install-sh Makefile.am missing README
[root@main CUnit-2.1-2]#
[root@main CUnit-2.1-2]# ./configure --prefix /usr/local/CUnit
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/root/dalek/CUnit-2.1-2/missing: Unknown `--run' option
Try `/root/dalek/CUnit-2.1-2/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
---------- Disabling debug mode compilation.
++++++++++ Enabling automated(XML) mode compilation
++++++++++ Enabling basic mode compilation
++++++++++ Enabling console mode compilation
---------- Disabling curses mode compilation
---------- Disabling examples mode compilation
---------- Disabling test mode compilation
---------- Disabling memtrace functionality at compile time
---------- Disabling use of deprecated v1.1 names
。。。。。。
config.status: creating Examples/ConsoleTest/Makefile
config.status: creating Examples/CursesTest/Makefile
config.status: creating Man/Makefile
config.status: creating Man/man3/Makefile
config.status: creating Share/Makefile
config.status: creating config.h
config.status: executing depfiles commands
[root@main CUnit-2.1-2]# ls
aclocal.m4 ChangeLog config.h.in config.sub COPYING cunit.pc.in depcomp INSTALL Jamrules.in Makefile Man NEWS stamp-h1
AUTHORS config.guess config.log configure CUnit CUnit.spec doc install-sh libtool Makefile.am missing README TODO
autom4te.cache config.h config.status configure.in cunit.pc CUnit.spec.in Examples Jamrules ltmain.sh Makefile.in mkinstalldirs Share
[root@main CUnit-2.1-2]# make;make install