Skip to content
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
44 changes: 34 additions & 10 deletions dcompiler.dd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(D_S dmd - $(WINDOWS Windows)$(LINUX Linux)$(OSX Mac OS X)$(FREEBSD FreeBSD) D
$(H2 $(LNAME2 requirements, Requirements and Downloads))

$(OL
$(LI $(LINK2 https://dlang.org/download.html, Download D Compiler))
$(LI $(LINK2 https://dlang.org/download.html, DMD Compiler))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D compiler might be confusing, because this documentation is about DMD and not every D compiler.
Also Download is already in title and it's marked as a link, but I only feel strongly about using DMD.


$(WINDOWS
$(LI Windows operating system, Windows 7 or later, 32 or 64 bit)
Expand All @@ -35,7 +35,11 @@ $(H2 $(LNAME2 requirements, Requirements and Downloads))
)
)
$(LINUX
$(LI 32 bit x86 and 64 bit x86-64 Linux operating system)
$(LI 32 bit x86 and 64 bit x86-64 Linux operating system
($(LINK2 https://github.com/ldc-developers/ldc, LDC)
and $(LINK2 https://github.com/D-Programming-GDC/GDC, GDC)
provide support for more architectures)
)

$(LI Gnu C compiler (gcc) or LLVM C compiler (clang))
)
Expand All @@ -45,7 +49,7 @@ $(H2 $(LNAME2 requirements, Requirements and Downloads))
$(LI Xcode)
)
$(FREEBSD
$(LI 32 bit x86 FreeBSD 7.1 operating system)
$(LI 32 bit x86 and 64 bit x86-64 FreeBSD operating system (11 or later))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can put comments in the .dd file by putting them inside $(COMMENT my illuminating explanation) which expands to nothing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that comment was just intended as a help for the reviewers, s.t. it's clear why I made this change.


$(LI Gnu C compiler (gcc))
)
Expand All @@ -54,6 +58,9 @@ $(H2 $(LNAME2 requirements, Requirements and Downloads))
$(H2 $(LNAME2 installation, Installation))

$(WINDOWS
$(MESSAGE_BOX gray, $(B Hint) - The official $(LINK2 $(ROOT_DIR)download.sh, installer)
performs these steps automatically.
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation is also displayed via e.g. -man and linked from the release pages, so chances are actually very high that the user has already installed DMD and just looks for a documentation of the CLI flags.

Copy link
Contributor

@JinShil JinShil Apr 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That install script requires a posix/bash environment, and I suspect most Windows users don't have that.

$(P Open a console window (for Windows XP this is done by
clicking on [Start][Command Prompt]).
All the tools are command line tools, which means
Expand All @@ -75,6 +82,9 @@ C:\>unzip dmc.zip
)
)
$(LINUX

$(INSTALLATION_SCRIPT_HINT)

$(LI Unzip the archive into your home directory.
It will create
a $(D ~/dmd) directory with all the files in it.
Expand All @@ -100,6 +110,9 @@ cp $(DMDDIR)/linux/lib/$(LIB) /usr/lib
)
)
$(FREEBSD

$(INSTALLATION_SCRIPT_HINT)

$(LI Unzip the archive into your home directory.
It will create
a $(D ~/dmd) directory with all the files in it.
Expand All @@ -125,6 +138,9 @@ cp $(DMDDIR)/freebsd/lib/$(LIB) /usr/lib
)
)
$(OSX

$(INSTALLATION_SCRIPT_HINT)

$(LI Put the dmd zip file into your home directory,
and unzip it:

Expand Down Expand Up @@ -504,7 +520,8 @@ set LIB=$(DMDDIR)\lib;\dm\lib
)

$(P Linking 64 bit programs is done using the
Microsoft linker.
Microsoft linker by default. If the Microsoft linker is not found,
the included LLVM linker LLD will be used.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

)
)
$(UNIX
Expand Down Expand Up @@ -548,7 +565,7 @@ set LINKCMD=\dmd\windows\bin\link
$(B LINKCMD64) environment variable to it. For example:)

$(CONSOLE
set LINKCMD64=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\link.exe
set LINKCMD64=C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\bin\amd64\link.exe
)

$(DT $(B PATH))
Expand Down Expand Up @@ -764,6 +781,7 @@ $(H2 $(LNAME2 executable, Building Executables))
invocation of $(B dmd) is that $(B dmd) will be able to do some level
of cross-module optimizations, such as function inlining across modules.
)
$(P The $(D -i) flag can be used to automatically compile imported modules)

$(H2 $(LNAME2 library, Building Libraries))

Expand Down Expand Up @@ -851,17 +869,15 @@ $(H2 $(LEGACY_LNAME2 compiling_phobos, compiling-phobos, Compiling Phobos))
$(WINDOWS
$(CONSOLE
cd $(DMDDIR)\src\druntime
make -f win32.mak DMD=$(DMDDIR)\$(OS)\bin\dmd
make -f win32.mak
cd ..\phobos
make -f win32.mak DMD=$(DMDDIR)\$(OS)\bin\dmd
make -f win32.mak
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

)
)
$(UNIX
$(CONSOLE
cd ~/$(DMDDIR)/src/druntime
make -f posix.mak DMD=~/$(DMDDIR)/$(OS)/bin/dmd
cd ../phobos
make -f posix.mak DMD=~/$(DMDDIR)/$(OS)/bin/dmd
make -f posix.mak
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DRuntime is built automatically since a few months (though currently the source can't be built - https://forum.dlang.org/post/bmfzbxcmwuhcduldjtdx@forum.dlang.org)

)
)

Expand All @@ -885,3 +901,11 @@ Macros:
CLI_SWITCHES=$1
SHELL=$(HTTP digitalmars.com/ctg/shell.html, shell)
SUBNAV=$(SUBNAV_CLI_REFERENCE)
INSTALLATION_SCRIPT_HINT=
$(P
$(MESSAGE_BOX gray, $(B Hint) - The official $(LINK2 $(ROOT_DIR)download.sh, packages)
performs these steps automatically.
Alternatively, you can install DMD in your user directory with
the $(LINK2 $(ROOT_DIR)install.sh, install script).
))
_ =