title: How can I assign new value to a variable in a makefile after ignoring an error using ||
body: <p>Lets say, I want to do something like this in my makefile.</p>
  
  <pre><code>myVar="Value1"
  
  define compare_with_expect_file
      cat $(filePath1) | diff -c ${filePath2} || myVar+=$(myVar)
      echo $(myVar) // want it to be changed
  endef
  </code></pre>
  
  <p>but this part does not work:</p>
  
  <pre><code>myVar+=$(myVar)
  </code></pre>
  
  <p>I am not able to change value of a variable that is placed after <code>||</code> </p>
  
  <p>How can I make it work?</p>