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):

< Pre> ifeq ($ (edible), $ (boder)) $ (error food is similar to bankrupt bird: $ (edible)) endif

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -