Makefile error exit with a message

Viewed 14335

Is there any way to output a error message when the error happens.Let's go into details,I want to know whether one file content equal to another or not.If not ,make should exit and output a error message.

test:
    cmp --silent tmp/test.txt tmp/test_de.txt ||    (error DecryptFile is different from original)

When tmp/test.txt does not equal to tmp/test_de.txt,the output is:

cmp --silent tmp/test.txt tmp/test_de.txt | (error DecryptFile is different from original)
/bin/sh: 1: error: not found
makefile:38: recipe for target 'test' failed
make: *** [test] Error 127

/bin/sh: 1: error: not found

The result isn't what I want.I just want like this kind of error message:

makefile:38: *** missing separator. Stop.
2 Answers
Related