From 75208132d5b7a8fff59ca3bf47253179ec314951 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 21 Apr 2023 04:33:22 +0800 Subject: doc: minor cleanups following #1441 (#1442) Also fixes 1 broken link (apologies). --- Documentation/Building.md | 34 +++++++++++++++++----------------- README.md | 6 +++--- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Documentation/Building.md b/Documentation/Building.md index 288f5858..9a59082b 100644 --- a/Documentation/Building.md +++ b/Documentation/Building.md @@ -104,31 +104,31 @@ make **Note: If you had downloaded libevent from the Git repository, then you have to run `./autogen.sh` first!** You can run the regression tests by running -``` -$ make verify +```sh +make verify ``` *Before reporting any problems, please run the regression tests.* Install as root via -``` -$ make install +```sh +make install ``` To enable low-level tracing, build the library as: -``` -$ CFLAGS=-DUSE_DEBUG ./configure [...] +```sh +CFLAGS=-DUSE_DEBUG ./configure [...] ``` ### Autotools flags Standard configure flags should work. In particular, see: -``` +```sh --disable-shared Only build static libraries. --prefix Install all files relative to this directory. ``` The configure script also supports the following flags: -``` +```sh --enable-gcc-warnings Enable extra compiler checking with GCC. --disable-malloc-replacement Don't let applications replace our memory @@ -140,23 +140,23 @@ The configure script also supports the following flags: ## Building on Windows __Download CMake for Windows [here](https://cmake.org/download/)__ -``` -> md build && cd build -> cmake -G "Visual Studio 10" .. # Or use any generator you want to use. Run cmake --help for a list -> cmake --build . --config Release # Or "start libevent.sln" and build with menu in Visual Studio. +```sh +md build && cd build +cmake -G "Visual Studio 10" .. # Or use any generator you want to use. Run cmake --help for a list +cmake --build . --config Release # Or "start libevent.sln" and build with menu in Visual Studio. ``` In the above, the ".." refers to the dir containing the Libevent source code. You can build multiple versions (with different compile time settings) from the same source tree by creating other build directories. It is highly recommended to build "out of source" when using CMake instead of "in source" like the normal behaviour of autoconf for this reason. The "NMake Makefiles" CMake generator can be used to build entirely via the command line: -``` -> cmake -LH .. +```sh +cmake -LH .. ``` ## CMake Variables General options: -``` +```sh # Type of the library to build (SHARED or STATIC) # Default is: SHARED for MSVC, otherwise BOTH EVENT__LIBRARY_TYPE:STRING=DEFAULT @@ -205,13 +205,13 @@ EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF EVENT__DOXYGEN:BOOL=OFF ``` MSVC specific options: -``` +```sh # Link static runtime libraries. # Defaults to ON if EVENT_LIBRARY_TYPE is equal to "STATIC", otherwise OFF EVENT__MSVC_STATIC_RUNTIME:BOOL ``` GNUC specific options: -``` +```sh # Disable verbose warnings with GCC EVENT__DISABLE_GCC_WARNINGS:BOOL=OFF diff --git a/README.md b/README.md index debf71d4..5fc0ec57 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ See [Documentation/Building#Building on Unix using CMake](/Documentation/Buildin ## CMake (Windows) -Install CMake: +Install CMake: ```sh md build && cd build @@ -60,12 +60,12 @@ make verify # (optional) sudo make install ``` -See [Documentation/Building#Autoconf](/Documentation/Building.md#autoconf) for more information. +See [Documentation/Building#Autoconf](/Documentation/Building.md#autotools-deprecated) for more information. # 2. USEFUL LINKS: For the latest released version of Libevent, see the official website at - . + . There's a pretty good work-in-progress manual up at . -- cgit v1.2.1