title: How do I check if file exists in Makefile so I can delete it?
body: <p>In the clean section of my <code>Makefile</code> I am trying to check if the file exists before deleting permanently. I use this code but I receive errors.</p>
  <p>What's wrong with it?</p>
  <pre class="lang-sh prettyprint-override"><code> if [ -a myApp ]
   then
       rm myApp
   fi
  </code></pre>
  <p>I get this error message</p>
  <pre class="lang-sh prettyprint-override"><code> if [ -a myApp ]
   /bin/sh: Syntax error: end of file unexpected (expecting &quot;then&quot;)
   make: *** [clean] Error 2
  </code></pre>