Skip to content

Commit 8b517da

Browse files
authored
Update README.md to include instructions for the Git submodule
1 parent f5c67b8 commit 8b517da

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ x86, ARM, RISC-V, POWER, S390X; many others known to work
6363
## Quickstart
6464

6565
<picture>
66-
<source media="(prefers-color-scheme: dark)" width="787px" srcset="https://github.com/user-attachments/assets/1886bc4b-2e05-4827-af83-e4ed45f25ab1">
67-
<img alt="Recording of a terminal session showing the PCRE2 quickstart; reproduced in text form below" width="787px" src="https://github.com/user-attachments/assets/7b90180e-276e-4202-b590-b72871cff91a">
66+
<source media="(prefers-color-scheme: dark)" width="787px" srcset="https://github.com/user-attachments/assets/f38bd06c-abda-44bf-a3b1-3f9b59d3a287">
67+
<img alt="Recording of a terminal session showing the PCRE2 quickstart; reproduced in text form below" width="787px" src="https://github.com/user-attachments/assets/9d3e9d99-96e3-430a-83c1-e08024d83d27">
6868
</picture>
6969

7070
<details>
@@ -77,9 +77,13 @@ git clone https://github.com/PCRE2Project/pcre2.git ./pcre2 \
7777
--branch pcre2-$PCRE2_VERSION \
7878
-c advice.detachedHead=false --depth 1
7979

80+
# If using the JIT, remember to fetch the Git submodule:
81+
(cd ./pcre2; git submodule update --init)
82+
8083
# Now let's build PCRE2:
8184
(cd ./pcre2; \
82-
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -B build; \
85+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug \
86+
-DPCRE2_SUPPORT_JIT=ON -B build; \
8387
cmake --build build/)
8488

8589
# Great, PCRE2 is built.
@@ -127,7 +131,7 @@ int main(int argc, char* argv[]) {
127131
&error_offset, /* for error offset */
128132
NULL); /* use default compile context */
129133
if (re == NULL) {
130-
fprintf(stderr, "Invalid pattern: %s\n", argv[1]);
134+
fprintf(stderr, "Invalid pattern: %s\n", pattern);
131135
return 1;
132136
}
133137

@@ -174,9 +178,15 @@ The main ways of obtaining PCRE2 are:
174178
175179
Please use a release tag in production, not the development branch!
176180
177-
2. Via download of the [release tarball](https://github.com/PCRE2Project/pcre2/releases/latest).
181+
Because PCRE2's JIT uses code from a Git submodule, you must check this out after a fresh clone:
182+
183+
```
184+
git submodule update --init
185+
```
186+
187+
3. Via download of the [release tarball](https://github.com/PCRE2Project/pcre2/releases/latest).
178188
179-
3. Finally, PCRE2 is also bundled by various downstream package managers (such as Linux distributions, or [vcpkg](https://vcpkg.io/)). These are provided by third parties, not the PCRE2 project.
189+
4. Finally, PCRE2 is also bundled by various downstream package managers (such as Linux distributions, or [vcpkg](https://vcpkg.io/)). These are provided by third parties, not the PCRE2 project.
180190
181191
The main ways of building PCRE2 are:
182192

0 commit comments

Comments
 (0)