Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve rdmd help message #473

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions rdmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -805,33 +805,34 @@ private @property string helpString()
{
return
"rdmd build " ~ thisVersion ~ "
Usage: rdmd [RDMD AND DMD OPTIONS]... program [PROGRAM OPTIONS]...
Builds (with dependents) and runs a D program.
Example: rdmd -release myprog --myprogparm 5
Usage: rdmd [RDMD AND DMD OPTIONS...] program [PROGRAM OPTIONS...]
Builds a D program with its dependencies and runs it.
Example: rdmd -release myprog --myprogparameter 5

Any option to be passed to the compiler must occur before the program name. In
addition to compiler options, rdmd recognizes the following options:
Any option to be passed to the compiler must occur before the program name.
In addition to compiler options, rdmd recognizes the following options:
--build-only just build the executable, don't run it
--chatty write compiler commands to stdout before executing them
--compiler=comp use the specified compiler (e.g. gdmd) instead of %s
--dry-run do not compile, just show what commands would be run
(implies --chatty)
--eval=code evaluate code as in perl -e (multiple --eval allowed)
--exclude=package exclude a package from the build (multiple --exclude allowed)
--eval=code evaluate code, similar to perl -e (multiple allowed)
--exclude=package exclude a package from the build (multiple allowed)
--include=package negate --exclude or a standard package (%-(%s, %))
--extra-file=file include an extra source or object in the compilation
(multiple --extra-file allowed)
(multiple allowed)
--force force a rebuild even if apparently not necessary
--help this message
--loop=code like eval, but wraps code in \"foreach (line; stdin.byLine()) { ... }\"
--help show this message
--loop=code --eval, but wraps code in:
foreach (line; stdin.byLine()) { ... }
--main add a stub main program to the mix (e.g. for unittesting)
--makedepend print dependencies in makefile format and exit
(needs dmd's option `-of` to be present)
(needs dmd's option `-of` to be present)
--makedepfile=file print dependencies in makefile format to file and continue
(needs dmd's option `-of` to be present)
--man open web browser on manual page
--shebang rdmd is in a shebang line (put as first argument)
--tmpdir set an alternative temporary directory
(needs dmd's option `-of` to be present)
--man open rdmd's manual in a web browser
--shebang rdmd is in a shebang line (use as first argument)
--tmpdir set an alternative temporary directory to cache compiled code
".format(defaultCompiler, defaultExclusions);
}

Expand Down
Loading