-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bugfix/cgreen-runner_nm_parsing
- Loading branch information
Showing
20 changed files
with
334 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Building and Installing Cgreen | ||
|
||
Here are your alternatives for installing `Cgreen`. | ||
|
||
## Install using your distro package manager | ||
|
||
Cgreen is available for [some Linux distros] | ||
(https://repology.org/project/cgreen/versions). If you are on one of | ||
those you can do | ||
|
||
$ sudo apt install cgreen1 | ||
|
||
or equivalent. Not all distros have an up-to-date version. | ||
|
||
|
||
## Install pre-built binary | ||
|
||
There are occassionally pre-built binaries available from [the GitHub | ||
repo](https://github.com/cgreen-devs/cgreen/releases). You can | ||
download and install these using an appropriate package manager. | ||
|
||
|
||
## Build from source | ||
|
||
### Get source and build | ||
|
||
Clone the [`Cgreen` repo](https://github.com/cgreen-devs/cgreen) | ||
|
||
$ git clone https://github.com/cgreen-devs/cgreen | ||
|
||
or get the source from the same place. | ||
|
||
Then build it | ||
|
||
$ cd cgreen | ||
$ make | ||
|
||
The Makefile is mainly for convenience as `Cgreen` is actually built | ||
using `CMake`. So you can tweak the build using normal `CMake` | ||
settings. | ||
|
||
Optional: If you have `ninja` installed the underlying `CMake` builder | ||
will use that, which is faster. | ||
|
||
You can run some tests using | ||
|
||
$ make unit | ||
$ make test | ||
|
||
### Build options | ||
|
||
You also have some extra options available | ||
|
||
- build with static libraries | ||
- build HTML or PDF documentation | ||
|
||
To enable any of these use the `CMake` graphical user interface (CMakeSetup | ||
on Windows or ccmake on UNIX) to turn these options on or off. | ||
|
||
Note on CYGWIN: Cygwin is not a WIN32 platform, but it is a | ||
DLL-platform where libraries normally goes in the bin directory. Running | ||
the self-tests handles this automatically but if you want to use the binaries | ||
in the 'build'-tree you can either: | ||
|
||
1) install before running the tests and also set your PATH to include | ||
"/usr/local/lib" | ||
|
||
2) setting the PATH to include the build directory where the libraries are | ||
there is a sh-compatible command script to do that for you. From the top | ||
of the Cgreen source directory do: | ||
|
||
. cygwin-setup.sh | ||
|
||
### Use directly | ||
|
||
You can use `Cgreen` from the source tree without actually | ||
installing. Just set your compilation includes to include | ||
`<path_to_cgreen>/include` and link with the built library by pointing | ||
the linker to `<path_to_cgreen>/build/src/` and use `-lcgreen`. E.g. | ||
|
||
$ cc ... -I/home/me/cgreen/include ... | ||
$ cc ... -L/home/me/cgreen/build/src -lcgreen ... | ||
|
||
### Install | ||
|
||
You can also install `Cgreen` with | ||
|
||
$ make install | ||
|
||
which will install `Cgreen` in what `CMake` considers standard | ||
locations for your environment. Assuming that is `/usr/local` you | ||
should now be able to compile and link using | ||
|
||
$ cc ... -I/usr/local/include ... | ||
$ cc ... -L/usr/local/lib -lcgreen ... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pycparser | ||
packaging | ||
|
Oops, something went wrong.