Skip to the content ForoHackers
Log inJoin

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

Build systemsDeveloper tools
#15345 · · Quote · Report

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 · · Quote · Report

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 · · Quote · Report

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

#15483 · · Quote · Report

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 · · Quote · Report

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

#15502 · · Quote · Report

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 · · Quote · Report

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 · · Quote · Report

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

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply