We no longer add these. If you use Emacs, configure it yourself.
Also, due to our "smart-tab" usage the editor anyway does a subpar
job handling our tabs. However, on the upside every user can choose
whatever tab-width he/she prefers. If "smart-tabs" are used properly
(like we do), every tab-width will work.
No manual changes, just ran commands:
F=($(git grep -l -e '-\*-'))
sed '1 { /\/\* *-\*- *[mM]ode.*\*\/$/d }' -i "${F[@]}"
sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}"
Check remaining lines with:
git grep -e '-\*-'
The ultimate purpose of this is to cleanup our files and eventually use
SPDX license identifiers. For that, first get rid of the boilerplate lines.
g-ir-scanner uses distutils that have an unfortunate misfeature of
inheriting the compiler flags it itself was built with.
This includes the hardening flags that don't work with without
redhat-rpm-build and break with clang every full moon.
A configure check makes it clear about what went wrong in case
introspection is desired, otherwise turns it off.
(Taken from network-manager commit 678890ed0347849990787e8893122a39f95cb708)
We commonly only allow tabs at the beginning of a line, not
afterwards. The reason for this style is so that the code
looks formated right with tabstop=4 and tabstop=8.
Originally m4/introspection.m4 was copied from gobject-introspection
repository. We however modified it in commit f6272144e9.
Reimport the file with latest changes, but still preserving our
workaround.
The autoconf macro for GIR passes $CFLAGS to g-ir-scanner.
g-ir-scanner extends those flags with the system-default which
includes -D_FORTIFY_SOURCE=2. Probably it should not do that,
but if you disable optimization, this results in a compler warning
in "/usr/include/features.h" [1]
export CFLAGS='-O0'
# Happens both with clang or gcc.
#export CC=clang
git clean -fdx
./autogen.sh
make
Work around that by injecting -Wno-error to $CFLAGS when invoking
g-ir-scanner.
[1] Related: https://sourceware.org/bugzilla/show_bug.cgi?id=13979
Add the necessary annotations (the mininum required, that is those
on return values. NULL parameters or container types may require
more), and the Autotools stuff to get a NetworkManager GIR for
libnm-util and a NMClient for libnm-glib.