title: Shell script call from Android.mk, standard output and missing separator error
body: <p>I have a simple Android.mk file:</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  include $(CLEAR_VARS)
  
  $(shell ($(LOCAL_PATH)/echo_test.sh))
  
  LOCAL_MODULE := libecho_test
  LOCAL_MODULE_TAGS := optional
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>The interesting thing that it does is to call the 'echo_test.sh' bash script. In the case when the contents of the script are</p>
  
  <pre><code>#!/bin/bash
  echo 'echo is working' &gt;&amp;2
  </code></pre>
  
  <p>or</p>
  
  <pre><code>#!/bin/bash
  echo 'echo is working' &gt;/dev/null
  </code></pre>
  
  <p>everything is OK.</p>
  
  <p>Things go wrong when the bash script is</p>
  
  <pre><code>#!/bin/bash
  echo 'echo is working'
  </code></pre>
  
  <p>or</p>
  
  <pre><code>#!/bin/bash
  echo 'echo is working' &gt;&amp;1
  </code></pre>
  
  <p>Then the returned error is</p>
  
  <pre><code>Android.mk:4: *** missing separator.  Stop. 
  </code></pre>
  
  <p>This happens both with Android NDK 7 and when you include this module during the build of Android Ice Cream Sandwich 4.0.3.</p>
  
  <p>I really can't understand what's the deal with the standard output and the Android build system. Does anyone have an explanation?</p>