Added Markdown to HACKING file
This commit is contained in:
parent
291f70edee
commit
1f68888020
2 changed files with 37 additions and 24 deletions
23
HACKING.md
23
HACKING.md
|
@ -15,15 +15,19 @@ Here are some directions to get you started:
|
||||||
Helper script to get some uniformity in the style:
|
Helper script to get some uniformity in the style:
|
||||||
$ make style
|
$ make style
|
||||||
|
|
||||||
If you use vim see the "Vim: How to prevent trailing whitespaces"
|
If you use vim see the [Vim: How to prevent trailing whitespaces](http://www.carbon-project.org/Vim__How_to_prevent_trailing_whitespaces.html).
|
||||||
http://www.carbon-project.org/Vim__How_to_prevent_trailing_whitespaces.html
|
|
||||||
|
|
||||||
2. Chase warnings: no warning should be introduced by your changes
|
2. Chase warnings: no warning should be introduced by your changes
|
||||||
Depending what you touch, you can check with:
|
Depending what you touch, you can check with:
|
||||||
|
|
||||||
2.1 When using autotools
|
2.1 When using autotools
|
||||||
|
|
||||||
$ autoreconf -Wall -vis
|
$ autoreconf -Wall -vis
|
||||||
|
|
||||||
2.2 When compiling
|
2.2 When compiling
|
||||||
|
|
||||||
2.2.1 Using extra flags:
|
2.2.1 Using extra flags:
|
||||||
|
|
||||||
$ export CFLAGS="-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing \
|
$ export CFLAGS="-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing \
|
||||||
-Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused \
|
-Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused \
|
||||||
-Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \
|
-Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \
|
||||||
|
@ -33,23 +37,32 @@ Here are some directions to get you started:
|
||||||
$ ./configure
|
$ ./configure
|
||||||
$ make clean
|
$ make clean
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
2.2.2 Using clang:
|
2.2.2 Using clang:
|
||||||
You can use same CFLAGS but also "-Wunreachable-code"
|
|
||||||
|
You can use same CFLAGS but also `-Wunreachable-code`
|
||||||
|
|
||||||
$ scan-build ./configure
|
$ scan-build ./configure
|
||||||
$ make clean
|
$ make clean
|
||||||
$ scan-build make
|
$ scan-build make
|
||||||
2.2.3 Using cppcheck (v1.58 or higher):
|
|
||||||
|
2.2.3 Using `cppcheck` (v1.58 or higher):
|
||||||
|
|
||||||
$ make cppcheck
|
$ make cppcheck
|
||||||
|
|
||||||
2.3 When Debianizing
|
2.3 When Debianizing
|
||||||
|
|
||||||
$ lintian --info --display-info --display-experimental *deb
|
$ lintian --info --display-info --display-experimental *deb
|
||||||
or (shorter version)
|
or (shorter version)
|
||||||
$ lintian -iIE *deb
|
$ lintian -iIE *deb
|
||||||
|
|
||||||
3. Preserve cross-platform compatility
|
3. Preserve cross-platform compatility
|
||||||
|
|
||||||
The source code should remain compilable across various platforms,
|
The source code should remain compilable across various platforms,
|
||||||
including some you probably cannot test alone so keep it in mind.
|
including some you probably cannot test alone so keep it in mind.
|
||||||
Supported platforms:
|
Supported platforms:
|
||||||
|
|
||||||
- Linux
|
- Linux
|
||||||
- FreeBSD
|
- FreeBSD
|
||||||
- Mac OS X
|
- Mac OS X
|
||||||
- Windows with Mingw
|
- Windows with MinGW
|
||||||
|
|
Loading…
Reference in a new issue