make
버전 3.77.Copyright © 1988, ’89, ’90, ’91, ’92, ’93, ’94, ’95, ’96, ’97 Free Software Foundation, Inc.
Published by the Free Software Foundation
59 Temple Place – Suite 330,
Boston, MA 02111-1307 USA
Printed copies are available for $20 each.
ISBN 1-882114-80-9
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.
Cover art by Etienne Suvasa.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
make
의 개관make
유틸리티는 큰 프로그램 내의 어떤 부분들을 다시 컴파일해야
하는지 자동으로 판단하고, 다시 컴파일하는 명령어를 실행한다. 이
매뉴얼에서는 Richard Stallman과 Roland McGrath가 구현한 GNU
make
에 대해 설명한다. GNU make
는 IEEE Standard
1003.2-1992(POSIX.2)의 section 6.2에 따르는 프로그램이다.
여기서 우리가 사용하는 예제는 C 프로그램이다. C 프로그램이 가장 많이
쓰이기 때문에 여기서 C 프로그램을 사용했지만, make
는 셸에서
실행시킬 수 있는 어떠한 프로그래밍 언어의 컴파일러와도 함께 사용할 수
있다. 게다가 make
는 프로그램에만 사용되도록 국한된 도구가
아니다. 어떤 파일이 바뀌었을 때 그 파일로부터 자동으로 또 다른 파일을
갱신해야 하는 경우가 있는 어떠한 작업에서도 make
를 사용할 수
있다.
• 준비 | ||
1.1 이 매뉴얼 읽는 법 | ||
1.2 문제점과 버그 |
make
를 사용할 준비 작업으로,
메이크파일(makefile)이라고 하는 파일을 작성해야 한다.
메이크파일(makefile)에는 프로그램 내의 파일들 사이의 관계 및 각 파일을
갱신할 때 사용하는 명령어들이 들어 있다. 흔한 경우로, 어떤 프로그램에서
실행 파일은 오브젝트 파일에서부터 갱신되고, 그 오브젝트 파일은 소스
파일을 컴파일해서 만들어 진다.
일단 적당한 메이크파일(makefile)이 있으면, 소스 파일을 바꿨을 때마다 다음 간단한 셸 명령어를 실행하면:
make
모든 재컴파일 과정을 수행한다. make
프로그램은 메이크파일을
데이타베이스로 사용하고 파일의 마지막 변경 시각을 보고 어떤 파일이
업데이트되어야 할 지 결정한다. 각 파일에 대해서 데이타베이스에 쓰여
있는 명령어를 실행한다.
어떤 파일이, 어떻게 재컴파일되야 하는지 지정하고 싶을 때 make
이
명령행에 인자를 쓴다. See section make
실행하는 법.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on February 24, 2015 using texi2html 5.0.