Divide into sections and add headings; add leading `/' to patterns which
are only expected to match in the same directory as the `.gitignore'
file; and add trailing `/' to patterns which should match directories.
+## Pervasive build machinery.
-aclocal.m4
-configure
-config
-COPYING.LIB
-COPYING
-config.guess
-config.sub
-install-sh
-mdwopt.c
-mdwopt.h
-autom4te.cache
-precomp
+
+## Common source files.
+/ui/mdwopt.c
+/ui/mdwopt.h
+
+## Other common files.
+/COPYING.LIB
+/COPYING
+
+## Top-level generated files.
+/aclocal.m4
+/autom4te.cache/
+/configure
+/config/
+/precomp/
-files
-build-*
-tmp
-tmp-*
-substvars
-*.debhelper
-*.substvars
-stamp-*
-*.log
+/build-*/
+/files
+/substvars
+/tmp/
+/tmp-*/
+/*.debhelper
+/*.substvars
+/stamp-*
+/*.log
-mlib2
-mlib2-adns
-mlib-bin
-mlib-dev
+/mlib2/
+/mlib2-adns/
+/mlib-bin/
+/mlib-dev/