파일 실행

파일 실행

을 실행하는 방법 makefile? 이 파일은 다음에서 다운로드할 수 있는 sts-2.1.2 파일에 포함되어 있습니다.여기:

NIST 문서(섹션 5.3)에 따르면 makefile.

다음 줄을 수정합니다.
(a) CC(ANSI C 컴파일러)
(b) ROOTDIR(프로세스 초기에 규정된 루트 디렉터리, 예: rng/)

user@SC13-VM:~/Documents/sts-2.1.2$ ./makefile
./makefile: line 1: CC: command not found
./makefile: line 2: GCCFLAGS: command not found
./makefile: line 3: ROOTDIR: command not found
./makefile: line 4: ROOTDIR: command not found
./makefile: line 4: SRCDIR: command not found
./makefile: line 5: ROOTDIR: command not found
./makefile: line 5: OBJDIR: command not found
./makefile: line 6: VPATH: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
./makefile: line 8: OBJDIR: command not found
 ......

총 94개의 라인이 있습니다.

그러면 나는 당신이 말한 대로 했습니다.

 user@SC13-VM:~/Documents/sts-2.1.2$ make makefile
 make: Nothing to be done for `makefile'.
 user@SC13-VM:~/Documents/sts-2.1.2$ ls
 data  experiments  include  makefile  makefile~  obj  src  templates

 user@SC13-VM:~/Documents/sts-2.1.2$ make  makefile
 make: Nothing to be done for `makefile'.

답변1

makeMakefile을 실행하려면 실행하세요 . 이는 파일이 Makefile있는 디렉토리와 동일한 디렉토리에 있다고 가정합니다 .

다른 디렉터리에 있는 경우 를 실행합니다. make -C directory여기서 은 directory파일이 포함된 디렉터리의 경로입니다 Makefile.

답변2

위 답변의 댓글을 읽어보면 여러분도 나와 같은 실수를 했을 수도 있습니다.

잘못된 명령: make makefile 이렇게 하면 "만들 수 있는 것이 없습니다"라는 오류가 발생합니다.

올바른 명령:make -f makefile

이미 실행 파일로 만들었지만 동일한 오류가 발생했다는 점을 언급해야 합니다. 또한 앞서 언급한 명령이 처음에는 오류 없이 실행됐으나 assess약속한 대로 파일이 나타나지 않았다. 나는 그것을 반복했고 효과가 있었다. 저는 초보자라 그 부분에 대해선 뭐라고 말씀을 드릴 수가 없네요.

관련 정보