2012-04-16 4 views
0

저는 Windows XP (SP3) 사용자이고 Linux 유틸리티를 처음 사용합니다. autoconf 및 linux의 다른 자동 도구를 사용해야합니다. 다음 시스템이 내 시스템에 설치되어 있습니다.리눅스 자동 도구 사용

-Msys 버전 1.0.11 -msysDTK-1.0.1 -msysgit -wget-1.11.4-1 -autoconf - 2.68 -automake-1.11.1 -libtool-2.4.1 - libcrypt-1.1 -perl-5.8.8 -m4-1.4.14 --gettext runtime_0.18.1.1-2_win32 -glib_2.28.1-1_win32 -glib_2.28.8-1_win32 -pkg-config_0.23- 3_win32 -pkg-config-dev_0.23-3_win32

나는이 튜토리얼을 시도했다. Configure.ac 다음 줄에 생성 된 http://www.dwheeler.com/autotools에서 "autotools를 소개"는 MSYS 쉘에서

AC_INIT([hello], [0.01]) 
AC_OUTPUT 

는 명령을 실행

$ autoreconf -i 

은 내가 이전에 인터넷에서 다른 보관 튜토리얼을 시도

/usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AU 
TOOPTS 
/usr/share/aclocal/autoopts.m4:22: run info '(automake)Extending aclocal' 
/usr/share/aclocal/autoopts.m4:22: or see http://sources.redhat.com/automake/a 
utomake.html#Extending-aclocal 

다음 로그, 즉,있어에 hello-initial이라는 디렉토리가 있습니다. 'hello-initial'은 hello.c와 hello.h를 포함하는 src 디렉토리를 가지고있다. 다음 줄을 사용하여 Makefile.am을 만들었습니다.

SUBDIRS = src. 다음 줄에 Makefile.am을 만든 src 디렉토리 내에서

,의 MSYS에서 안녕하세요 - 초기 디렉토리에

helloprgdir=../ 
helloprg_PROGRAMS=hello 
hello_SOURCES=hello.c 

I에서 cd ​​에드 쉘 및 튜토리얼을 따라, 다음과 같은 로그가 생성되었다 즉,

[email protected]_1 ~ 
$ cd /gold/hello-initial 

[email protected]_1 /gold/hello-initial 
$ autoscan 

[email protected]_1 /gold/hello-initial 
$ aclocal 
/usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AU 
TOOPTS 
/usr/share/aclocal/autoopts.m4:22: run info '(automake)Extending aclocal' 
/usr/share/aclocal/autoopts.m4:22: or see http://sources.redhat.com/automake/a 
utomake.html#Extending-aclocal 
configure.ac:8: warning: macro `AM_CONFIG_HEADERS' not found in library 

[email protected]_1 /gold/hello-initial 
$ automake -ac 
configure.ac:7: installing `./install-sh' 
configure.ac:7: installing `./missing' 
automake: no `Makefile.am' found for any configure output. 

경기 수 도움이됩니다. RGDS,

AC_INIT([project name], [major.minor.revision], [[email protected]]) 
AM_INIT_AUTOMAKE([foreign])dnl foreign means that its not standard gnu project or not strict 
AC_PROG_CC 
AC_CONFIG_FILES([ 
Makefile 
]) 
AC_OUTPUT 

Autoconf의 언어는 'M4'autoconf를 정보 페이지에서 해당 검사입니다

+3

하십시오 업데이트, 어떻게 자신과 세계 부탁하고 자동 도구를 사용하지 마십시오. 예를 들어, 대신 CMake를 사용하십시오. – zvrba

+0

+1 CMake 스위치를 제안합니다. Autotools는 autohell과 비슷합니다. 물론 그들을 강제로 사용하지 않으면 (예 : 그놈 플랫폼에 기여) ... –

답변

1

configure.ac.
automake의 정보 페이지는 시작하기에 좋은 장소입니다. autotools를 설치를 위해 문서 및 autoconf를 자체
을에 geting에 대한
http://www.gnu.org/software/autoconf/ 사용
'autoreconf --install'
와 autoconf를 'autoreconf'또는 'autoconf를'