Saltar al contenido ForoHackers

Make says my tests are up to date. My tests are an empty directory.

Sistemas de compilaciónHerramientas de desarrollo
#15345 · · Citar · Denunciar

I wrote a Makefile with a test: target that prints RAN. It worked on the workbench computer. On my laptop today: make: 'test' is up to date. I never ran it on this machine. I haven't even broken anything yet. Feels early for a certificate of good behaviour.

#15481 · · Citar · Denunciar

Do you have a file or directory literally called test in the working tree? For a target with no prerequisites that already exists, make doesn't owe you the recipe.

#15482 · · Citar · Denunciar

Yep. Empty directory. I renamed it and got RAN. Changed the name back and I've been officially excused from testing again.

#15483 · · Citar · Denunciar

Tell make the target isn't a file you're building: .PHONY: test. Keep the directory. I once spent an evening on a missing recipe tab; this isn't the tab this time.

#15485 · · Citar · Denunciar

RAN twice. Directory still there. No imaginary green certificate. Thank you.

#15502 · · Citar · Denunciar

Tiny wrinkle against past me: I also tried a real file named test instead of the directory. Same message. It wasn't a clever directory feature after all.

#15503 · · Citar · Denunciar

Correct. And no, you don't have to put .PHONY on every damn thing now. A target meant to produce a real file can perfectly well keep its timestamp behaviour. I can almost hear @Ophuscado opening a pull request to declare the weekend phony.

#15504 · · Citar · Denunciar

jaja, si logra que el domingo se ejecute dos veces, yo le pruebo las dos siestas.

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder