For general instructions, please see the build instructions in README.md
.
Basic Development:
- autoconf
- automake
- bash
- bison or yacc
- flex
- gcc
- make
- php
- pkg-config or pkgconf
Linting:
- astyle
- mandoc
Static Analysis:
- cppcheck
- sparse
Testing:
- check
- lcov
- printf
- sed
- strace
- valgrind
Nice to Have:
- draw-title (from my bin repo)
make
make internals
Check code formatting:
astyle --style=kr --indent-switches --add-braces --pad-oper --pad-header $(ls src/*.[ch] | grep -E -v 'config_file_(lex|yacc)')
Check formatting on man pages:
mandoc -T lint man/*.[15]
Check formatting on translation tables:
# if you have draw-title in your path
find table/ -type f -exec draw-title '{}' ';' -exec src/check-table '{}' ';'
# otherwise
find table/ -type f -exec echo ';' -exec src/check-table '{}' ';'
Confirm tests reference correct GitHub issue:
grep -ri github tests/legacy/ | sed -e s'/[^0-9 ]//g' -e s'/ \+/ /g' -e s'/^0\+//'
./configure --enable-debug --with-check
make clean
make
make internals
make check
cat tests/unit/*.log
./configure --with-check
make clean
make
make internals
make check
Neither of these work particularly well, but it's what we have.
make clean
make
cppcheck src/*.[ch]
sparse src/*.[ch]
./configure --with-coverage --with-check
make clean
make
make check
make coverage
A directory, coverage/
, will be created. Open index.html to see the code
coverage report. One of the following might work:
gio open coverage/index.html
# or
firefox coverage/index.html
# or
chromium coverage/index.html
./configure --with-coverage --with-check
make clean
make
( cd tests/unit/ && make check )
make coverage
./configure --with-coverage --with-check
make clean
make
( cd tests/legacy/ && make check )
make coverage
For some reason, if you pass -ftest-coverage
to gcc when you're linking
objects into an executable, whichever object is first on the command line will
have its .gcno
file wiped out. There is a hack in src/Makefile.am
that
puts -ftest-coverage
on the DEFS
variable.
- Review the diff. If any manpages are in the changeset, confirm that the date has been updated.
- Run the lint checks from earlier in this document,
astyle
andmandoc
. Note thatastyle
sometimes confuses a multiplication operator with a pointer, andmandoc
complains about missing references. - Run the translation table lint checker, using
find
andcheck-table
, and look for any warnings. Thedraw-title
script is from my bin repo, and completely optional. I just find it easier to read. - Run
make internals
. Confirm no changes are recorded.
./configure && make clean && make && make internals
git status -s
- Run
make distcheck
.
./configure && make clean && make && make distcheck
- Update version at head of
CHANGELOG.md
. - Update version link at footer of
CHANGELOG.md
. - Update version in
configure.ac
. - Commit and push.
git diff
git commit -a -m "Release v1.4.0"
git tag v1.4.0
git tag # confirm your tag was created correctly
git push
git push --tags
- Build tarballs.
TAR_OPTIONS="--owner=0 --group=0 --numeric-owner"
export TAR_OPTIONS
make dist
make dist-bzip2
make dist-zip
- Create a new release on GitHub, using the raw contents of the CHANGELOG, and attaching the release files.
- Create a new release on Sourceforge, using the same items. In the project,
click on Files, then the
detox
folder. Click on Add Folder, add a version folder, then click in to it. Add files to the folder. - Update the "latest stable" version in README.md, if appropriate.
- Play A Void Hope.