Home | History | Annotate | Download | only in docs
      1 Please comply with the following rules when hacking on Avahi:
      2 
      3  * Before commiting check with "git st" that all built files are ignored
      4    by git. To change the list of ignored files use
      5 
      6        $VISUAL .gitignore
      7 
      8    This is similar to the ".cvsignore" file in CVS times.
      9 
     10  * Don't forget to add the autoconf config.h inclusion to all C source files:
     11 
     12    #ifdef HAVE_CONFIG_H
     13    #include <config.h>
     14    #endif
     15 
     16    This needs to be placed in in .c files only. NOT IN HEADER FILES!
     17 
     18  * Don't hardcode any paths in source files. Either use the -D option of gcc
     19    for C sources or use "sed" to replace them based on a .in file.
     20 
     21  * Never forget that Avahi should be buildable without DBUS, GTK or python!
     22 
     23  * Before commiting, test your code! In case of C consider running it
     24    a few times through valgrind, to make sure that you got everything
     25    right.  You have to call libtool explicitly when running valgrind
     26    on binaries that depend on shared objects. e.g:
     27 
     28        libtool --mode=execute valgrind ./avahi-daemon
     29 
     30    Please note that valgrind can't find you all bugs. Please check
     31    your code thrice with your brain before committing. Valgrind is
     32    only a final check.
     33 
     34  * Whenever you add a new Makefile.am, C (.c or .h) source file, shell or
     35    python script please add this legal blurb to its header:
     36 
     37    For Makefile.am, python and shell code:
     38 
     39 <snip>
     40 # This file is part of avahi.
     41 #
     42 # avahi is free software; you can redistribute it and/or modify it
     43 # under the terms of the GNU Lesser General Public License as
     44 # published by the Free Software Foundation; either version 2 of the
     45 # License, or (at your option) any later version.
     46 #
     47 # avahi is distributed in the hope that it will be useful, but WITHOUT
     48 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     49 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
     50 # License for more details.
     51 #
     52 # You should have received a copy of the GNU Lesser General Public
     53 # License along with avahi; if not, write to the Free Software
     54 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
     55 # USA.
     56 </snip>
     57 
     58    For C source code:
     59 
     60 <snip>
     61 /***
     62   This file is part of avahi.
     63 
     64   avahi is free software; you can redistribute it and/or modify it
     65   under the terms of the GNU Lesser General Public License as
     66   published by the Free Software Foundation; either version 2.1 of the
     67   License, or (at your option) any later version.
     68 
     69   avahi is distributed in the hope that it will be useful, but WITHOUT
     70   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     71   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
     72   Public License for more details.
     73 
     74   You should have received a copy of the GNU Lesser General Public
     75   License along with avahi; if not, write to the Free Software
     76   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
     77   USA.
     78 ***/
     79 </snip>
     80