<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/make/tags/search</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Mon, 20 May 2013 13:22:59 GMT</pubDate>
<item>
<title>(Makefile) Search For or Replace Spaces - michaelaskew</title>
<link>http://snipplr.com/view/26103/search-for-or-replace-spaces/</link>
<description><![CDATA[ <p>Make (and GMake) ignore spaces in many constructs, making it difficult to use a single space as a search string or a replacement string, for example. This trick works around the problem by assigning the space to a variable named SPACE and using that instead. So given this makefile:

    NOTHING:=
    SPACE:=$(NOTHING) $(NOTHING)
    NAME_WITH_UNDERSCORES:=$(subst $(SPACE),_,$(NAME))
    print : ; @echo $(NAME_WITH_UNDERSCORES)

The command

    gmake NAME="Professor Hubert Farnsworth"

would print

    Professor_Hubert_Farnsworth</p> ]]></description>
<pubDate>Thu, 07 Jan 2010 20:21:16 GMT</pubDate>
<guid>http://snipplr.com/view/26103/search-for-or-replace-spaces/</guid>
</item>
</channel>
</rss>