{"action":"opened","issue":{"url":"https://api.github.com/repos/ldc-developers/ldc/issues/1802","repository_url":"https://api.github.com/repos/ldc-developers/ldc","labels_url":"https://api.github.com/repos/ldc-developers/ldc/issues/1802/labels{/name}","comments_url":"https://api.github.com/repos/ldc-developers/ldc/issues/1802/comments","events_url":"https://api.github.com/repos/ldc-developers/ldc/issues/1802/events","html_url":"https://github.com/ldc-developers/ldc/issues/1802","id":180471164,"number":1802,"title":"Please output Makefile-style depfiles for ninja and make","user":{"login":"ximion","id":417468,"avatar_url":"https://avatars.githubusercontent.com/u/417468?v=3","gravatar_id":"","url":"https://api.github.com/users/ximion","html_url":"https://github.com/ximion","followers_url":"https://api.github.com/users/ximion/followers","following_url":"https://api.github.com/users/ximion/following{/other_user}","gists_url":"https://api.github.com/users/ximion/gists{/gist_id}","starred_url":"https://api.github.com/users/ximion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ximion/subscriptions","organizations_url":"https://api.github.com/users/ximion/orgs","repos_url":"https://api.github.com/users/ximion/repos","events_url":"https://api.github.com/users/ximion/events{/privacy}","received_events_url":"https://api.github.com/users/ximion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-01T18:13:30Z","updated_at":"2016-10-01T18:13:30Z","closed_at":null,"body":"GCC and other compilers emit dependency information as Make-style depfiles, allowing Make and make-replacements like Ninja to recompile dependencies as soon as some unit higher up in the dependency chain has been changed.\r\n\r\nThis is tremendously useful, especially in D, where descending units have to be rebuild e.g. on a template change or function signature change.\r\n\r\nUnfortunately, LDCs `-deps=` flag makes it output a custom format, which makes adding LDC to build systems using Ninja and Make harder than it needs to be.\r\n\r\nThe Makefile-syntax used by GCC and Clang is the de-facto standard and changing all other tools to support LDC will be impossible.\r\n\r\nSee https://ninja-build.org/manual.html#_depfile for a bit more information on depfiles. Unfortunately, no format documentation exists, but the format is simply a Makefile without variables in the form of:\r\n```\r\nthe_generated_file.o:\r\n        source1.d source2.d source3.d\r\n```\r\n\r\nNinja's tests also contain a bit of information: https://github.com/ninja-build/ninja/blob/master/src/depfile_parser_test.cc\r\n\r\nCheers,\r\n    Matthias\r\n"}}
{"actor":{"display_login":"ximion"}}