Execução de um arquivo

Execução de um arquivo

Como executar um makefile? Este arquivo está contido no arquivo sts-2.1.2 que pode ser baixado deaqui:

De acordo com a documentação do NIST (seção 5.3), preciso editar o arquivo makefile.

Modifique as seguintes linhas:
(a) CC(seu compilador ANSI C)
(b) ROOTDIR (o diretório raiz que foi prescrito anteriormente no processo, por exemplo, 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
 ......

Existem 94 linhas no total.

Então fiz como você disse:

 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'.

Responder1

Execute makepara executar um Makefile. Isso pressupõe que você esteja no mesmo diretório onde o arquivo Makefileestá localizado.

Se você estiver em um diretório diferente, execute make -C directory, onde directoryestá o caminho para o diretório que contém o arquivo Makefile.

Responder2

Lendo os comentários da resposta acima, você pode ter cometido o mesmo erro que eu:

Comando errado: make makefile Isso lhe dará o erro "Não há nada para fazer"

Comando certo:make -f makefile

Devo mencionar que já o transformei em um arquivo executável e encontrei a mesma série de erros. Além disso, o comando mencionado foi executado sem erros a princípio, mas o assessarquivo não apareceu como prometido. Repeti e funcionou. Eu sou um novato, então realmente não posso comentar muito.

informação relacionada