picrin-scheme / picrin

lightweight scheme interpreter
MIT License
414 stars 35 forks source link

Makefile: Remove redirected target on fail #349

Closed okuoku closed 7 years ago

okuoku commented 7 years ago

When we use shell-redirection to generate target in Makefile, we have to remove failed output explicitly. Otherwise, we will get empty file as target even on failure case and next make invocation may fail on wrong place.

NOTE: Since I don't have OSX box right now, the patch haven't tested at all. (https://github.com/picrin-scheme/picrin/commit/d66ce6413018f31ac34c87b4c7a6b54daa72939b requires OSX to build the repository)

Alternatively, you may use .DELETE_ON_ERROR special target ( http://stackoverflow.com/questions/3587182 ) but it is gmake extension and I do not recommend doing so.

okuoku commented 7 years ago

Oops, it's master branch. Changing branch. CLOSE.