title: If condition inside a target in a Makefile
body: <p>I want to do something like this, where I want to run a svn commit if a file has changed. The file has a timestamp which always changes. So if anything more than timestamp changes , then I want to commit the file. </p>
  
  <p>The makefile will have something similar to this. But the If condition is not working properly. It is getting executed even when if is not satisfied. Can someone help me out what is the problem in If here. </p>
  
  <pre><code>    UPDATE_STATE_FILE :
          $(eval NO_LINES_CHANGES_IN_STATE = $(shell svn di STATE/build.state --diff-cmd=diff -x --normal | grep "^[&lt;&gt;]" | wc -l))
          @echo $(NO_LINES_CHANGES_IN_STATE)
      ifneq ($(strip $(NO_LINES_CHANGES_IN_STATE)), 2)
      ifneq ($(strip $(NO_LINES_CHANGES_IN_STATE)), 0)
          @echo $(NO_LINES_CHANGES_IN_STATE)
          $(SVN) commit;
          $(SVN) update;
      endif
      endif
  </code></pre>