makefile - Fail in make (gmake) -
I have a bunch of variables in my GNU makefile, and users can change their values if some values mean any If not, then I want to fail the makefile before executing.
For example:
FOODIR = foo BARDIR = bar
OK, but if the user has it
< Sets up for> FOODIR = foo BARDIR = foo
, I'm looking for the right syntax to do the makefile to fail. Something like this:
ifeq ($ (food), $ (bardir)) exit 1; Endiff
But this does not work What is the best way to do this?
The makefile shell script is not; You can not use shell commands like exit
.
A GNU make function is $ (error ...)
you can use (if you have recently enough to make your GNU):
ifeq ($ (edible), $ (boder)) $ (error food is similar to bankrupt bird: $ (edible)) endif
Comments
Post a Comment