NetworkManager/libnm-glib
Thomas Haller a75ab799e4 build: create "config-extra.h" header instead of passing directory variables via CFLAGS
1) the command line gets shorter. I frequently run `make V=1` to see
   the command line arguments for the compiler, and there is a lot
   of noise.

2) define each of these variables at one place. This makes it easy
   to verify that for all compilation units, a particular
   define has the same value. Previously that was not obvious or
   even not the case (see commit e5d1a71396
   and commit d63cf1ef2f).
   The point is to avoid redundancy.

3) not all compilation units need all defines. In fact, most modules
   would only need a few of these defines. We aimed to pass the necessary
   minium of defines to each compilation unit, but that was non-obvious
   to get right and often we set a define that wasn't used. See for example
   "src_settings_plugins_ibft_cppflags" which needlessly had "-DSYSCONFDIR".
   This question is now entirely avoided by just defining all variables in
   a header. We don't care to find the minimum, because every component
   gets anyway all defines from the header.

4) this also avoids the situation, where a module that previously did
   not use a particular define gets modified to require it. Previously,
   that would have required to identify the missing define, and add
   it to the CFLAGS of the complation unit. Since every compilation
   now includes "config-extra.h", all defines are available everywhere.

5) the fact that each define is now available in all compilation units
   could be perceived as a downside. But it isn't, because these defines
   should have a unique name and one specific value. Defining the same
   name with different values, or refer to the same value by different
   names is a bug, not a desirable feature. Since these defines should
   be unique accross the entire tree, there is no problem in providing
   them to every compilation unit.

6) the reason why we generate "config-extra.h" this way, instead of using
   AC_DEFINE() in configure.ac, is due to the particular handling of
   autoconf for directory variables. See [1].
   With meson, it would be trivial to put them into "config.h.meson".
   While that is not easy with autoconf, the "config-extra.h" workaround
   seems still preferable to me.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html
2018-07-17 17:46:39 +02:00
..
tests build: create "config-extra.h" header instead of passing directory variables via CFLAGS 2018-07-17 17:46:39 +02:00
libnm-glib-test.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
libnm-glib-vpn.pc.in
libnm-glib-vpn.ver
libnm-glib.pc.in
libnm-glib.ver
libnm_glib.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
libnm_glib.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
meson.build meson: run the check-export.sh in test phase 2018-06-28 20:38:52 +02:00
nm-access-point.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-access-point.h all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-active-connection.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-active-connection.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-client.c all: use the elvis operator wherever possible 2018-05-10 14:36:58 +02:00
nm-client.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-dbus-helpers-private.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-dbus-helpers.c
nm-device-adsl.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-adsl.h
nm-device-bond.c all/trivial: grammar fix 2018-07-10 13:12:02 +02:00
nm-device-bond.h
nm-device-bridge.c all/trivial: grammar fix 2018-07-10 13:12:02 +02:00
nm-device-bridge.h
nm-device-bt.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-bt.h
nm-device-ethernet.c doc: add units to some libnm (and libnm-glib) function docs 2018-05-23 16:17:03 +02:00
nm-device-ethernet.h
nm-device-generic.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-generic.h
nm-device-infiniband.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-infiniband.h
nm-device-modem.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-modem.h
nm-device-olpc-mesh.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-olpc-mesh.h
nm-device-private.h
nm-device-team.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-team.h
nm-device-vlan.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-vlan.h
nm-device-wifi.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-wifi.h
nm-device-wimax.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-device-wimax.h all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-device.c doc: add units to some libnm (and libnm-glib) function docs 2018-05-23 16:17:03 +02:00
nm-device.h
nm-dhcp4-config.c libnm-glib: do not use deprecated Gtk-Doc Type: and Virtual: tags 2018-03-26 12:46:22 +02:00
nm-dhcp4-config.h
nm-dhcp6-config.c libnm-glib: do not use deprecated Gtk-Doc Type: and Virtual: tags 2018-03-26 12:46:22 +02:00
nm-dhcp6-config.h
nm-glib-enum-types.c.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-glib-enum-types.h.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-ip4-config.c doc: fix GTK-Doc NMRoute links 2018-05-11 16:49:25 +02:00
nm-ip4-config.h
nm-ip6-config.c doc: fix GTK-Doc NMRoute links 2018-05-11 16:49:25 +02:00
nm-ip6-config.h
nm-object-cache.c
nm-object-cache.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-object-private.h libnm-glib: silence some build warnings 2016-11-21 13:53:03 +01:00
nm-object.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-object.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-remote-connection-private.h
nm-remote-connection.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-remote-connection.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-remote-settings.c all: use the elvis operator wherever possible 2018-05-10 14:36:58 +02:00
nm-remote-settings.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-secret-agent.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-secret-agent.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-types-private.h libnm-glib: drop some unneeded code 2016-11-21 13:53:03 +01:00
nm-types.c libnm-glib: drop some unneeded code 2016-11-21 13:53:03 +01:00
nm-types.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-vpn-connection.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-vpn-connection.h
nm-vpn-enum-types.c.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-vpn-enum-types.h.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-vpn-plugin-ui-interface.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-vpn-plugin-ui-interface.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-vpn-plugin-utils.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-vpn-plugin-utils.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-vpn-plugin.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-vpn-plugin.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-wimax-nsp.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-wimax-nsp.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00