Skip to content

Commit 18262ff

Browse files
authored
Clarify build instructions and fix typos in devdocs (#57399)
1 parent 39255d4 commit 18262ff

File tree

3 files changed

+39
-31
lines changed

3 files changed

+39
-31
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ The Julia community uses [GitHub issues](https://github.com/JuliaLang/julia/issu
190190
Issues and pull requests should have self explanatory titles such that they can be understood from the list of PRs and Issues.
191191
i.e. `Add {feature}` and `Fix {bug}` are good, `Fix #12345. Corrects the bug.` is bad.
192192
193-
You can make pull requests for incomplete features to get code review. The convention is to open these a draft PRs and prefix
193+
You can make pull requests for incomplete features to get code review. The convention is to open these as draft PRs and prefix
194194
the pull request title with "WIP:" for Work In Progress, or "RFC:" for Request for Comments when work is completed and ready
195195
for merging. This will prevent accidental merging of work that is in progress.
196196
@@ -209,6 +209,7 @@ Add new code to Julia's base libraries as follows (this is the "basic" approach;
209209
Build as usual, and do `make clean testall` to test your contribution. If your contribution includes changes to Makefiles or external dependencies, make sure you can build Julia from a clean tree using `git clean -fdx` or equivalent (be careful – this command will delete any files lying around that aren't checked into git).
210210
211211
#### Running specific tests
212+
212213
There are `make` targets for running specific tests:
213214
214215
make test-bitarray
@@ -346,8 +347,8 @@ please remove the `backport-X.Y` tag from the originating pull request for the c
346347

347348
### Git Recommendations For Pull Requests
348349

349-
- Avoid working from the `master` branch of your fork, creating a new branch will make it easier if Julia's `master` changes and you need to update your pull request.
350-
- Try to [squash](https://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) together small commits that make repeated changes to the same section of code so your pull request is easier to review. A reasonable number of separate well-factored commits is fine, especially for larger changes.
350+
- Avoid working from the `master` branch of your fork. Create a new branch as it will make it easier to update your pull request if Julia's `master` changes.
351+
- Try to [squash](https://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) together small commits that make repeated changes to the same section of code, so your pull request is easier to review. A reasonable number of separate well-factored commits is fine, especially for larger changes.
351352
- If any conflicts arise due to changes in Julia's `master`, prefer updating your pull request branch with `git rebase` versus `git merge` or `git pull`, since the latter will introduce merge commits that clutter the git history with noise that makes your changes more difficult to review.
352353
- Descriptive commit messages are good.
353354
- Using `git add -p` or `git add -i` can be useful to avoid accidentally committing unrelated changes.

doc/src/devdocs/build/build.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,26 @@ directory mirror, with all of the necessary Makefiles to build Julia,
3939
in the specified directory. These builds will share the source files
4040
in Julia and `deps/srccache`. Each out-of-tree build directory can
4141
have its own `Make.user` file to override the global `Make.user` file
42-
in the top-level folder.
42+
in the top-level folder. After modifying the `Make.user` file if necessary,
43+
build using: `make -C <build-directory>`.
4344

44-
If everything works correctly, you will see a Julia banner and an
45+
If everything works correctly, there will be a symlink to
46+
the julia executable in the build directory which can be run as:
47+
```sh
48+
./julia
49+
```
50+
The actual executable is in `<build-directory>/usr/bin`.
51+
After running this, you will see a Julia banner and an
4552
interactive prompt into which you can enter expressions for
4653
evaluation. (Errors related to libraries might be caused by old,
4754
incompatible libraries sitting around in your PATH. In this case, try
4855
moving the `julia` directory earlier in the PATH). Note that most of
4956
the instructions above apply to unix systems.
5057

5158
To run julia from anywhere you can:
52-
- add an alias (in `bash`: `echo "alias julia='/path/to/install/folder/bin/julia'" >> ~/.bashrc && source ~/.bashrc`), or
59+
- add an alias (in `bash`: `echo "alias julia='<build-directory>/usr/bin/julia'" >> ~/.bashrc && source ~/.bashrc`), or
5360

54-
- add a soft link to the `julia` executable in the `julia` directory to `/usr/local/bin` (or any suitable directory already in your path), or
61+
- add a soft link to the `julia` executable in the `<build-directory>/usr/bin` directory to `/usr/local/bin` (or any suitable directory already in your path), or
5562

5663
- add the `julia` directory to your executable path for this shell session (in `bash`: `export PATH="$(pwd):$PATH"` ; in `csh` or `tcsh`:
5764
`set path= ( $path $cwd )` ), or

doc/src/devdocs/build/windows.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -129,32 +129,32 @@ Note: MSYS2 requires **64 bit** Windows 7 or newer.
129129

130130
2. Open the MSYS2 shell. Update the package database and base packages:
131131

132-
```
133-
pacman -Syu
134-
```
132+
```
133+
pacman -Syu
134+
```
135135
3. Exit and restart MSYS2. Update the rest of the base packages:
136136

137-
```
138-
pacman -Syu
139-
```
137+
```
138+
pacman -Syu
139+
```
140140

141141
4. Then install tools required to build julia:
142142

143-
```
144-
pacman -S cmake diffutils git m4 make patch tar p7zip curl python
145-
```
143+
```
144+
pacman -S cmake diffutils git m4 make patch tar p7zip curl python
145+
```
146146

147-
For 64 bit Julia, install the x86_64 version:
147+
For 64 bit Julia, install the x86_64 version:
148148

149-
```
150-
pacman -S mingw-w64-x86_64-gcc
151-
```
149+
```
150+
pacman -S mingw-w64-x86_64-gcc
151+
```
152152

153-
For 32 bit Julia, install the i686 version:
153+
For 32 bit Julia, install the i686 version:
154154

155-
```
156-
pacman -S mingw-w64-i686-gcc
157-
```
155+
```
156+
pacman -S mingw-w64-i686-gcc
157+
```
158158

159159
5. Configuration of MSYS2 is complete. Now `exit` the MSYS2 shell.
160160
2. Build Julia and its dependencies with pre-build dependencies.
@@ -166,16 +166,16 @@ Note: MSYS2 requires **64 bit** Windows 7 or newer.
166166

167167
2. Clone the Julia sources:
168168

169-
```
170-
git clone https://github.com/JuliaLang/julia.git
171-
cd julia
172-
```
169+
```sh
170+
git clone https://github.com/JuliaLang/julia.git
171+
cd julia
172+
```
173173

174174
3. Start the build
175175

176-
```
177-
make -j$(nproc)
178-
```
176+
```
177+
make -j$(nproc)
178+
```
179179

180180
!!! note "Pro tip: build in dir"
181181
```sh

0 commit comments

Comments
 (0)