{"id":2709,"date":"2012-08-06T18:52:34","date_gmt":"2012-08-06T16:52:34","guid":{"rendered":"http:\/\/glandium.org\/blog\/?p=2709"},"modified":"2019-09-03T15:30:34","modified_gmt":"2019-09-03T06:30:34","slug":"the-depth-of-me","status":"publish","type":"post","link":"https:\/\/glandium.org\/blog\/?p=2709","title":{"rendered":"The DEPTH of me"},"content":{"rendered":"<p>When adding a new directory to the Mozilla codebase, one usually needs to add a <code>Makefile.in<\/code> file, with some magic incantations at the beginning of it:<\/p>\n<blockquote>\n<pre>DEPTH = ..\/..\r\ntopsrcdir = @top_srcdir@\r\nsrcdir = @srcdir@\r\nVPATH = @srcdir@\r\n\r\ninclude $(DEPTH)\/config\/autoconf.mk\r\n\r\n<i>etc.<\/i>\r\n<\/pre>\n<\/blockquote>\n<p>Some even add:<\/p>\n<blockquote>\n<pre>relativesrcdir = foo\/bar\r\n<\/pre>\n<\/blockquote>\n<p>In the above, <code>DEPTH<\/code> and <code>relativesrcdir<\/code> both need to be carefully filled depending where the <code>Makefile.in<\/code> is.<\/p>\n<p>As of <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=774032\">bug 774032<\/a>, landed over the week-end (along with some now hopefully fixed tree breakage for some people, sorry for the inconvenience), there are two additional substitution variables for <code>Makefile.in<\/code> that replace the need to be careful.<\/p>\n<p>Now the boilerplate for a new <code>Makefile.in<\/code> is:<\/p>\n<blockquote>\n<pre>DEPTH = @DEPTH@\r\ntopsrcdir = @top_srcdir@\r\nsrcdir = @srcdir@\r\nVPATH = @srcdir@\r\n\r\ninclude $(DEPTH)\/config\/autoconf.mk\r\n\r\n<i>etc.<\/i>\r\n<\/pre>\n<\/blockquote>\n<p>And, if needed,<\/p>\n<blockquote>\n<pre>relativesrcdir = @relativesrcdir@\r\n<\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>When adding a new directory to the Mozilla codebase, one usually needs to add a Makefile.in file, with some magic incantations at the beginning of it: DEPTH = ..\/.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)\/config\/autoconf.mk etc. Some even add: relativesrcdir = foo\/bar In the above, DEPTH and relativesrcdir both need [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[23],"class_list":["post-2709","post","type-post","status-publish","format-standard","hentry","category-planet-mozilla","tag-en"],"_links":{"self":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2709"}],"version-history":[{"count":3,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2709\/revisions"}],"predecessor-version":[{"id":2712,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2709\/revisions\/2712"}],"wp:attachment":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}