Login
Changes To HackersGuide
Login

Changes to "HackersGuide" between 2021-03-17 12:24:08 and 2021-03-17 19:05:38

14
15
16
17
18
19
20
21

22







23

24
25
26
27
28
29
30
31
32
33
34



35
36
37
38
39
40
41
42
14
15
16
17
18
19
20

21
22
23
24
25
26
27
28
29

30
31
32
33
34
35
36
37
38



39
40
41

42
43
44
45
46
47
48







-
+

+
+
+
+
+
+
+
-
+








-
-
-
+
+
+
-







  *  The "native" build platform requires GNU Make 3.81 or higher and the conventional set of Unix-side build tools. Contributions of control files (or READMEs) for other build platforms are of course welcomed.
  *  The overall style is a direct artifact (as it were) of fossil(1), and we ask that all contributors maintain the _general overall_ style. We are _not_ picky about placement of spaces around parenthesis and whatnot, mainly just the overall 2-space indentation and `{` bracing `}` styles, as well as the naming style for public symbols (e.g. a prefix of `fsl_` on most symbols). The one notable exception is how APIs are documented: libfossil uses Doxygen style and Doxygen cannot swallow fossil's native comment style.

## Getting it Running Locally (on Unix-like systems)

Because of where the libs live vs where the binaries live, the easiest ways to get the source tree running its test apps are...

The following text assumes the `{CHECKOUT}` is the top-most directory of this source tree's checkout and that the tree has been built already.
The following text assumes the `{CHECKOUT}` is the top-most directory of this source tree's checkout and that the tree has been built already, using:

```
$ ./configure
$ make
```

(FWIW, i use `./configure CC="ccache cc"; make -j4`, noting that "make" *must* be GNU Make, which is called `gmake` on some platforms.)

First, and simplest, is to add `{CHECKOUT}/src` to one's `$LD_LIBRARY_PATH` and `{CHECKOUT}/bin` to the `$PATH`. `libfossil.*` lives, as of this writing, in the `src` dir, but building from the top-most directory will also symlink those there.
First, and simplest, is to add `{CHECKOUT}/src` to one's `$LD_LIBRARY_PATH` and `{CHECKOUT}/f-apps` to the `$PATH`. `libfossil.*` lives, as of this writing, in the `src` dir, but building from the top-most directory will also symlink those there. The build tree is not set up to do out-of-tree builds (and won't be unless someone who cares about that patches it to do so).

Slightly more elaborate is to...

1) From a directory in the `$LD_LIBRARY PATH`, type: `ln -s {CHECKOUT}/src/libfossil.* .`

2) Symlink all of the [f-apps](/dir/f-apps/) to a directory in the `$PATH`. For example:

```
cd ~/bin
for i in {CHECKOUT}/f-apps/f-*; do
  test -x $i || continue # filter out .o/.c files
$ cd ~/bin
$ for i in {CHECKOUT}/f-apps/f-*; do
  test -x "$i" && ln -s "$i" . # filter out .o/.c files
  ln -s $i .
done
```

As new f-apps are added, add a symlink to the appropriate directory.


## An Introduction to structs...