title: How to get the file size on Unix in a Makefile?
body: <p>I would like to implement this as a Makefile task:</p>
  
  <pre><code># step 1:
  curl -u username:password -X POST \
    -d '{"name": "new_file.jpg","size": 114034,"description": "Latest release","content_type": "text/plain"}' \
    https://api.github.com/repos/:user/:repo/downloads
  
  # step 2:
  curl -u username:password \
  -F "key=downloads/octocat/Hello-World/new_file.jpg" \
  -F "acl=public-read" \
  -F "success_action_status=201" \
  -F "Filename=new_file.jpg" \
  -F "AWSAccessKeyId=1ABCDEF..." \
  -F "Policy=ewogIC..." \
  -F "Signature=mwnF..." \
  -F "Content-Type=image/jpeg" \
  -F "file=@new_file.jpg" \
  https://github.s3.amazonaws.com/
  </code></pre>
  
  <p>In the first part however, I need to get the file size (and content type if it's easy, not required though), so some variable:</p>
  
  <pre><code>{"name": "new_file.jpg","size": $(FILE_SIZE),"description": "Latest release","content_type": "text/plain"}
  </code></pre>
  
  <p>I tried this but it doesn't work (Mac 10.6.7):</p>
  
  <pre><code>$(shell du path/to/file.js | awk '{print $1}')
  </code></pre>
  
  <p>Any ideas how to accomplish this?</p>