<p>Let's say you have a variable in a makefile fragment like the following:</p>

<pre><code>MY_LIST=a b c d
</code></pre>

<p>How do I then reverse the order of that list?  I need:</p>

<pre><code>$(warning MY_LIST=${MY_LIST}) 
</code></pre>

<p>to show</p>

<pre><code>MY_LIST=d c b a
</code></pre>

<p>Edit:  the real problem is that </p>

<pre><code>ld -r some_object.o ${MY_LIST}
</code></pre>

<p>produces an <code>a.out</code> with undefined symbols because the items in <code>MY_LIST</code> are actually archives, but in the wrong order.  If the order of <code>MY_LIST</code> is reversed, it will link correctly (I think).  If you know a smarter way to get the link order right, clue me in.</p>

Doh!  I could have just used a shell script-let:
```
(for d in ${MY_LIST}; do echo $$d; done) | tac
```