개발/형상(?) 관리
Autotools
jjryu
2009. 7. 19. 00:12
autoconf
automake
libtool
autoscan -> configure.scan -> configure.ac
configure.ac
AC_CANONICAL_SYSTEM
$target
AC_PREFIX_DEFAULT()
configure.ac, aclocal.m4 -(autoheader)-> config.h.in
configure.ac, aclocal.m4 -(autoconf)-> configure
Makefile.am
SUBDIRS
컴파일할 소스 코드가 있는 위치?
eg. SUBDIRS=@DIRS@
{directory}_PROGRAMS
{ID}_SOURCES
{directory}는 해당 프로그램이나 파일들이 install 될 위치
AM_CFLAGS
AM_YFLAGS
make check
check_PROGRAMS
TESTS
Makefile.am -(automake)-> Makefile.in
--add-missing
-copy
Makefile.in -(configure)-> Makefile
사용은
automake
libtool
autoscan -> configure.scan -> configure.ac
configure.ac
AC_CANONICAL_SYSTEM
$target
AC_PREFIX_DEFAULT()
AC_SUBST()
configure.ac, aclocal.m4 -(autoheader)-> config.h.in
configure.ac -(aclocal)-> aclocal.m4
configure.ac, aclocal.m4 -(autoconf)-> configure
Makefile.am
SUBDIRS
컴파일할 소스 코드가 있는 위치?
eg. SUBDIRS=@DIRS@
{directory}_PROGRAMS
{ID}_SOURCES
{directory}는 해당 프로그램이나 파일들이 install 될 위치
eg.
bin_PROGRAMS=calc
calc_SOURCES=calcparser.y lex.l fmath.c const.c
{ID}_LDADDAM_CFLAGS
AM_YFLAGS
make check
check_PROGRAMS
TESTS
eg.
check_PROGRAMS = test1
test1_SOURCES = test1.c
check_SCRIPTS = test2
TESTS = test1 \
test2
check_SCRIPTS = test2
TESTS = test1 \
test2
Makefile.am -(automake)-> Makefile.in
--add-missing
-copy
Makefile.in -(configure)-> Makefile
사용은
$ aclocal
$ autoheader
$ autoconf
$ automake --add-missing -copy
$ ./configure
$ make
$ make check
$ make install
$ autoheader
$ autoconf
$ automake --add-missing -copy
$ ./configure
$ make
$ make check
$ make install
참조 사이트: