2011-04-20 3 views
4

나는 autotools가있는 프로젝트를 가지고 있습니다 : automake, autoconf.autotools : 강제로 configure/Makefile을 재구성하지 마십시오.

make이 파일을 다시 작성하지 못하도록하고 싶습니다. configure, Makefile.in 등; 그냥 컴파일 작업을 할.

파일 중 일부는 직접 편집해야하며이를 수행하면 안됩니다. (또는 프로젝트가 CVS에서 생성 된 모든 파일로 CVS에서 업데이트되었습니다). 하지만 지금은 올바른 버전의 autotools가 설치되어 있지 않습니다.

aclocal.m4 
configure.in 
confdb/ax_prefix_config_h.m4 
Makefile.am 
Makefile.in 
Makefile 
configure 
config.status 

또는 :

은 무엇 (/ 오래된 새로운 있어야합니다)이 파일의 수정 시간이어야합니다 touch 명령을 어떤 순서 나는 나의 목표를 달성하기 위해해야 ​​하는가? 당신이 직접 생성 된 파일을 편집하는 경우 그것의 전제 조건 다음 다음 새로운 있기 때문에 automake에 & CVS와

답변

7

먼저 설명되어 있습니다, 그것은 어쨌든 재건되지 않을 것이다.

그런 다음 여기에는 두 가지 별도의 작업이 진행됩니다. 빌드 중에 config.statusMakefile이 생성됩니다. 빌드 타임 중에 새로운 타임 스탬프를 만들지 않는 한 이러한 빌드가 다시 작성되는 것을 방지하기가 어렵습니다.

다른 파일은 다양한 autotools에서 생성됩니다. 최근 버전의 Automake는 자동으로 다시 만들어주는 규칙을 기본적으로 만들지 않습니다. 패키지에 따라 옵션 --disable-maintainer-mode을 사용할 수 있습니다. Automake 문서에는 해당 옵션에 대한 몇 가지 흥미로운 정보가 들어 있습니다. 가끔 내가 대해 잘 모른다거나 꽤 엉망 빌드 시스템이있는 패키지를 사용

하나의 트릭은이 프로그램이 일어날 경우 호출 될 정도로

make all AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: 

같은 것을 실행하는 것입니다 , noop은 대체 될 것입니다.

+0

나는'configure'를 수동으로 편집했고'configure.in'도 편집합니다. 하지만 필자는 autotools의 버전이 필요하지 않으므로,'configure'의 편집은 올바른 도구로 다시 생성 된 것과 같습니다. 프로젝트가 cvs에 있고 다른 스크립트 (configure, * .m4, * .in)가 만들어져 있기 때문에 다른 autotools를 사용하지 않기를 원합니다. – osgx

+0

오,'--disable-maintainer-mode' - 고마워요.불행하게도, 프로젝트는 automake를 사용하지 않지만'--disable-maintainer-mode'를 가지고 있지 않은 simplemake (Makefile.sm)를 사용합니다. – osgx

+0

프로젝트의 새로운 버전은 그 안에 몇 개의 "configure"스크립트를 가지고 있습니다. Top configure는'--disable-maintainer-mode'를 가지고 있으며 작동하지만 내부의'configure's에는'--disable-maintainer-mode'가 없습니다. – osgx

2
touch confdb/*.m4 
touch configure.in 
touch *.m4 
touch *.am 
touch Makefile.in */Makefile.in 
touch *config.h.in */*config.h.in 
touch configure 
touch config.status 
touch config.h 
touch Makefile 

문제는 여기에 모든 http://www.gnu.org/s/hello/manual/automake/CVS.html

+0

질문에 답이없는 것처럼 보이지 않도록 직접 대답을 수락하십시오. –

1

봅니다 명시 적으로

GNU 제조업체의 설명서를

‘-o file’ 
‘--old-file=file’ 
‘--assume-old=file’ 
Do not remake the file file even if it is older than its prerequisites, and do not remake 
anything on account of changes in file. Essentially the file is treated as very old and 
its rules are ignored. See Avoiding Recompilation of Some Files. 
에서 excerpt MAKEFLAGS

$ MAKEFLAGS="-o configure -o Makefile.in" make 
사용하여 명령 줄을 통해 해당 파일이 다시 만들어해서는 안

$ make -o configure -o Makefile.in 

나에 의해을 make에게

autotools template correc 인 경우 하위 디렉토리에 $(MAKE)을 사용하면 문제가 없습니다.

관련 문제