Movatterモバイル変換


[0]ホーム

URL:


D Logo
Menu
Search

Library Reference

version 2.112.0

overview

Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinga local clone.

dmd.deps

Implement the-deps and-makedeps switches, which output dependencies of modules for build tools.
The grammar of the-deps output is:
     ImportDeclaration         ::= BasicImportDeclaration [" : " ImportBindList ] [" -> "     ModuleAliasIdentifier ]"\n"     BasicImportDeclaration         ::= ModuleFullyQualifiedName" (" FilePath") : " Protection|"string"" [ "static" ] : " ModuleFullyQualifiedName" (" FilePath")"     FilePath         - any stringwith '(', ')' and '\' escaped with the '\' character
Make dependencies as generated by-makedeps look like this:
source/app.d:  source/importa.d \  source/importb.d
License:
Boost License 1.0

Sourcemakedeps.d

Documentationhttps://dlang.org/phobos/dmd_deps.html

Coveragehttps://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/deps.d

pure voidwriteMakeDeps(ref OutBufferbuf, ref const Paramparams, boollink, boollib, const(char)[]libExt);
Output the makefile dependencies for the -makedeps switch
Parameters:
OutBufferbufoutbuffer to write into
Paramparamsdmd params
boollinkan executable is being generated
boolliba library is being generated
const(char)[]libExtfile extension of libraries for current target
voidaddImportExpDep(ref OutputmoduleDeps, ref OutputmakeDeps, const(char)[]fileNameZ, const(char)[]importString, Moduleimod);
Add an import expression to module dependencies
Parameters:
OutputmoduleDepsoutput settings for-deps
OutputmakeDepsoutput settings for-makedeps
const(char)[]fileNameZ0-termminated string containing the import expression's resolved filename
const(char)[]importStringraw string passed to import exp
Moduleimodmodule import exp is in
voidaddImportDep(ref OutputmoduleDeps, Importimp, Moduleimod);
Add an import statement to module dependencies
Parameters:
OutputmoduleDepsoutput settings
Importimpimport to add
Moduleimodmodule that the import is in
pure voidwriteEscapedMakePath(ref OutBufferbuf, const(char)*fname);
Takes a path, and make it compatible with GNU Makefile format.
GNU make uses a weird quoting scheme for white space. A space or tab preceded by 2N+1 backslashes represents N backslashes followed by space; a space or tab preceded by 2N backslashes represents N backslashes at the end of a file name; and backslashes in other contexts should not be doubled.
Parameters:
OutBufferbufBuffer to write the escaped path to
const(char)*fnamePath to escape
Examples:
version (Windows){enum input =`C:\My Project\file#4$.ext`;enum expected =`C:\My\ Project\file\#4$$.ext`;}else{enum input =`/foo\bar/weird$.:name#\ with spaces.ext`;enum expected =`/foo\bar/weird$$.\:name\#\\\ with\ spaces.ext`;}OutBufferbuf;buf.writeEscapedMakePath(input);assert(buf[] == expected);
Copyright © 1999-2026 by theD Language Foundation | Page generated byDdoc on Sat Feb 21 00:04:54 2026

[8]ページ先頭

©2009-2026 Movatter.jp