{"id":11074,"date":"2015-04-26T09:57:38","date_gmt":"2015-04-26T13:57:38","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=11074"},"modified":"2015-04-26T09:58:46","modified_gmt":"2015-04-26T13:58:46","slug":"the-one-line-you-should-add-to-every-makefile","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/04\/26\/the-one-line-you-should-add-to-every-makefile\/","title":{"rendered":"The One Line You Should Add to Every Makefile"},"content":{"rendered":"<p><a href=\"http:\/\/blog.jgc.org\/2015\/04\/the-one-line-you-should-add-to-every.html\">John Graham-Cumming<\/a>, who&rsquo;s just written the <a href=\"http:\/\/www.nostarch.com\/gnumake\">GNU Make Book<\/a> (<a href=\"http:\/\/www.amazon.com\/dp\/B00W4E0I1G\/?tag=michaeltsai-20\">Amazon<\/a>):<\/p>\n<blockquote cite=\"http:\/\/blog.jgc.org\/2015\/04\/the-one-line-you-should-add-to-every.html\">\n<p>It&rsquo;s:<\/p>\n<pre>print-%: ; @echo $*=$($*)<\/pre>\n<p>It allows you to quickly get the value of any makefile variable. For example, suppose you want to know the value of a variable called <code>SOURCE_FILES<\/code>. You&rsquo;d just type:<\/p>\n<pre>make print-SOURCE_FILES<\/pre>\n<\/blockquote>\n<p>This works with the 2006 version of GNU Make that comes with Xcode.<\/p>","protected":false},"excerpt":{"rendered":"<p>John Graham-Cumming, who&rsquo;s just written the GNU Make Book (Amazon): It&rsquo;s: print-%: ; @echo $*=$($*) It allows you to quickly get the value of any makefile variable. For example, suppose you want to know the value of a variable called SOURCE_FILES. You&rsquo;d just type: make print-SOURCE_FILES This works with the 2006 version of GNU Make [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[56,75,30,1182,71,163],"class_list":["post-11074","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-debugging","tag-developertool","tag-mac","tag-make","tag-programming","tag-unix"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/11074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=11074"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/11074\/revisions"}],"predecessor-version":[{"id":11075,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/11074\/revisions\/11075"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=11074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=11074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=11074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}