Ejecución de un archivo

Ejecución de un archivo

¿Cómo ejecutar un makefile? Este archivo está contenido en el archivo sts-2.1.2 que se puede descargar desdeaquí:

Según la documentación del NIST (sección 5.3), necesito editar el archivo makefile.

Modifique las siguientes líneas:
(a) CC (su compilador ANSI C)
(b) ROOTDIR (el directorio raíz que se prescribió anteriormente en el proceso, por ejemplo, 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
 ......

Hay 94 líneas en total.

Entonces hice lo que dijiste:

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

Respuesta1

Ejecutar makepara ejecutar un Makefile. Esto supone que está en el mismo directorio donde Makefilese encuentra el archivo.

Si estás en un directorio diferente, ejecuta make -C directory, donde directoryestá la ruta al directorio que contiene el archivo Makefile.

Respuesta2

Al leer los comentarios de la respuesta anterior, es posible que haya cometido el mismo error que yo:

Comando incorrecto: make makefile esto le dará el error "No hay nada que hacer".

Comando correcto:make -f makefile

Debo mencionar que ya lo convertí en un archivo ejecutable y encontré la misma serie de errores. Además, el comando antes mencionado se ejecutó sin errores al principio, pero el assessarchivo no apareció como se prometió. Lo repetí y funcionó. Soy un novato así que realmente no puedo comentar mucho sobre eso.

información relacionada