Skip to content

Commit

Permalink
Remove backconfig in favor of using DMD's copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Geod24 committed Mar 2, 2022
1 parent 95f9973 commit 3a46e92
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 570 deletions.
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,41 @@ https://digitalmars.com/ctg/sc.html
`shared stdout = &_iob[1];`
with
`enum stdout = &_iob[1];`.
4. Change directory to `dm\src\dmc`
5. Make sure the `dm\bin\make.exe` program is on your `PATH`.
6. Execute the commands:
4. Run `git submodule update --init` to make sure you have up-to-date submodules.
5. Change directory to `dm\src\dmc`
6. Make sure the `dm\bin\make.exe` program is on your `PATH`.
7. Execute the commands:
`make CC=dmc clean`
`make CC=dmc scppn`
You might need to edit the `makefile` to set the path to your DMD installation.

Note that DMC runs on Win32, and hasn't been ported to other platforms.
It can generate code for Win32, 16 bit DOS, 16 and 32 bit Windows, 286 DOS extenders,
and 386 DOS extenders.

# Updating the backend

In order to update the backend to a more recent version, do the following:
1. Go to the DMD submodule: `cd dm/src/dmd`;
2. Fetch the latest commits: `git fetch`
3. Checkout the desired commit, e.g.:
- `git checkout origin/master`: Checkout the latest version of the DMD backend;
- `git checkout v2.095.0`: Checkout the state of the backend as of DMD v2.095.0;
- `git checkout 385312b93`: Checkout the state of the backend as of commit `385312b93`;
4. Leave the `dmd` repository, e.g. `cd ../../` to come back to the root of this repository;
5. Commit the change to the submodule: `git add dm/src/dmd && git commit -m "Update DMD backend to master"`

Alternatively, when pulling from this repository, remember to always run `git submodule update --init`
if the submodule have been updated. This is visible from `git status`:
```shell
$ git diff
diff --git a/dm/src/dmd b/dm/src/dmd
index 123456789..abcdef123 160000
--- a/dm/src/dmd
+++ b/dm/src/dmd
@@ -1 +1 @@
-Subproject commit 67ca0a14c4d4d3161541eda27a4126f889d53546
+Subproject commit 385312b93239311c038ffd8c221ac62738006382
```

To learn more about `git submodule`, see [this section of the Pro Git book](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
Loading

0 comments on commit 3a46e92

Please sign in to comment.