phobos icon indicating copy to clipboard operation
phobos copied to clipboard

*.mak: Change the meaning of DMD_DIR to the path of the compiler source

Open the-horo opened this issue 9 months ago • 3 comments

Change the meaning of DMD_DIR from the path of the dmd repository, including the compiler and druntime, to the path of the compiler source. This becomes consistent with its usage in druntime's makefiles.

the-horo avatar Sep 21 '23 20:09 the-horo

Thanks for your pull request and interest in making D better, @the-horo! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8820"

dlang-bot avatar Sep 21 '23 20:09 dlang-bot

This PR seems to add complexity to the paths in the makefile (by adding an extra ..) rather than simplify anything.

RazvanN7 avatar Oct 17 '23 13:10 RazvanN7

I ask for this change because of the layout of the linux source archives at https://downloads.dlang.org where the 3 main components of dmd (the compiler, druntime and phobos) are found under src/{dmd,druntime,phobos}. Being able to specify the directory of the compiler sources will help avoid having to mv directories in a way that include $(DMD_DIR)/compiler/src/osmodel.mak is satisfied.

Technically, this is not an issue because I already have to move the directories to satisfy include $(DMD_DIR)/src/osmodel.mak, the line prior to the druntime and dmd merge, (src/dmd would have to become dmd/src).

Merging this PR would simplify my workflow a little bit but, given that this has been an issue since the dmd and druntime merge, and I didn't find anyone else requesting such a change perhaps not that many people are affected, in which case I understand the complexity I add is not worth it. In this case I would still like to add a comment explaining how the DMD_DIR variable has a different meaning in phobos/posix.mak compared to druntime/posix.mak though it has the same name. What do you think?

the-horo avatar Oct 18 '23 04:10 the-horo