@@ -30,11 +30,13 @@ structure.
3030
3131To install this code, run the following commands:
3232
33- $ ./configure
34- $ make
35- $ make check
36- $ sudo make install
37- $ sudo ldconfig
33+ ``` bash
34+ ./configure
35+ make
36+ make check
37+ sudo make install
38+ sudo ldconfig
39+ ```
3840
3941You can skip the ` make check ` step but it's always good to know that tests are
4042passing on your platform.
@@ -47,8 +49,10 @@ you may need to add the `lib` directory in your `prefix` to your library path.
4749On most Linux distributions when using the default prefix (` /usr/local ` ), you
4850can do this by running the following commands:
4951
50- $ sudo sh -c "echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf"
51- $ ldconfig
52+ ``` bash
53+ sudo sh -c " echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf"
54+ ldconfig
55+ ```
5256
5357## From a GitHub "Source Code" Archive / Git Repo Clone (Achtung!)
5458
@@ -65,7 +69,9 @@ in addition to `make` and a compiler.
6569
6670You can clone this repository and build it by running:
6771
68- $ git clone --recursive https://github.com/maxmind/libmaxminddb
72+ ``` bash
73+ git clone --recursive https://github.com/maxmind/libmaxminddb
74+ ```
6975
7076After cloning, run ` ./bootstrap ` from the ` libmaxminddb ` directory and then
7177follow the instructions for installing from a named release tarball as
@@ -76,39 +82,57 @@ described above.
7682We provide a CMake build script. This is primarily targeted at Windows users,
7783but it can be used in other circumstances where the Autotools script does not
7884work.
79-
80- $ mkdir build && cd build
81- $ cmake ..
82- $ cmake --build .
83- $ ctest -V .
84- $ cmake --build . --target install
85+
86+ ``` bash
87+ cmake -B build
88+ cd build/
89+ cmake --build .
90+ ctest -V .
91+ cmake --build . --target install
92+ ```
8593
8694When building with Visual Studio, you may build a multithreaded (MT/MTd)
8795runtime library, using the ` MSVC_STATIC_RUNTIME ` setting:
8896
89- $ cmake -DMSVC_STATIC_RUNTIME=ON -DBUILD_SHARED_LIBS=OFF ..
97+ ``` bash
98+ cmake -DMSVC_STATIC_RUNTIME=ON -DBUILD_SHARED_LIBS=OFF ..
99+ ```
100+
101+ We also include a CMake ` uninstall ` target:
102+
103+ ``` bash
104+ cmake --build . --target uninstall
105+ ```
90106
91107## On Ubuntu via PPA
92108
93109MaxMind provides a PPA for recent version of Ubuntu. To add the PPA to your
94110APT sources, run:
95111
96- $ sudo add-apt-repository ppa:maxmind/ppa
112+ ``` bash
113+ sudo add-apt-repository ppa:maxmind/ppa
114+ ```
97115
98116Then install the packages by running:
99117
100- $ sudo apt update
101- $ sudo apt install libmaxminddb0 libmaxminddb-dev mmdb-bin
118+ ``` bash
119+ sudo apt update
120+ sudo apt install libmaxminddb0 libmaxminddb-dev mmdb-bin
121+ ```
102122
103123## On macOS via Homebrew or MacPorts
104124
105125You can install libmaxminddb on macOS using [ Homebrew] ( https://brew.sh ) :
106126
107- $ brew install libmaxminddb
127+ ``` bash
128+ brew install libmaxminddb
129+ ```
108130
109131Or with [ MacPorts] ( https://ports.macports.org/port/libmaxminddb ) :
110132
111- $ sudo port install libmaxminddb
133+ ``` bash
134+ sudo port install libmaxminddb
135+ ```
112136
113137# Requirements
114138
0 commit comments