X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=docs%2FHACKING;h=94a8366ab8f03d124be31023bc52b2a9150fe11e;hb=b9cafcae35680b33ba1e0d6da08a355c5b62faab;hp=a31878d0d498f4a8af04c53cf5edb16a7b2db9b8;hpb=e2bd3f23a80ac9f59e406688e92a36ca843d364a;p=catta diff --git a/docs/HACKING b/docs/HACKING index a31878d..94a8366 100644 --- a/docs/HACKING +++ b/docs/HACKING @@ -1,19 +1,14 @@ Please comply with the following rules when hacking on Avahi: - * When you add a new textual file to the repository please enable SVN - keyword expansion for it: - - svn ps svn:keywords Id foo.c + * Before commiting check with "git st" that all built files are ignored + by git. To change the list of ignored files use - * Before commiting check with "svn st" that all built files are ignored - by svn. To change the list of ignored files use - - svn pe svn:ignore . + $VISUAL .gitignore This is similar to the ".cvsignore" file in CVS times. * Don't forget to add the autoconf config.h inclusion to all C source files: - + #ifdef HAVE_CONFIG_H #include #endif @@ -25,33 +20,16 @@ Please comply with the following rules when hacking on Avahi: * Never forget that Avahi should be buildable without DBUS, GTK or python! - * When you code in C, please compile with the following gcc options from time - to time: - - -Wextra - -Wfloat-equal - -Wmissing-declarations - -Wmissing-prototypes - -Wstrict-prototypes - -Wredundant-decls - -Wold-style-definition - -Wmissing-noreturn - -Wdeclaration-after-statement - -Wshadow - -Wendif-labels - -Wlarger-than-4000 - -Wpointer-arith - -Wbad-function-cast - -Wcast-qual - -Wcast-align - -Wwrite-strings - -Winline - - This will show you a bunch of issues which might be problems in your source - code. Not all options are available on all GCC versions. Just pass these - options in $CFLAGS when running bootstrap.sh: - - CFLAGS="-Wextra ..." ./bootstrap.sh + * Before commiting, test your code! In case of C consider running it + a few times through valgrind, to make sure that you got everything + right. You have to call libtool explicitly when running valgrind + on binaries that depend on shared objects. e.g: + + libtool --mode=execute valgrind ./avahi-daemon + + Please note that valgrind can't find you all bugs. Please check + your code thrice with your brain before committing. Valgrind is + only a final check. * Whenever you add a new Makefile.am, C (.c or .h) source file, shell or python script please add this legal blurb to its header: @@ -59,8 +37,6 @@ Please comply with the following rules when hacking on Avahi: For Makefile.am, python and shell code: -# $Id$ - # This file is part of avahi. # # avahi is free software; you can redistribute it and/or modify it @@ -82,8 +58,6 @@ Please comply with the following rules when hacking on Avahi: For C source code: -/* $Id$ */ - /*** This file is part of avahi. @@ -103,6 +77,3 @@ Please comply with the following rules when hacking on Avahi: USA. ***/ - - -$Id$