Files
NetworkManager/docs/libnm/Makefile.am
Thomas Haller 03b9a255d2 libnm: remove unused "nm-property-compare.c"
"nm-property-compare.c" only contains nm_property_compare(), which is
broken.

It tries to compare string dictionaries as equal regardless of the
order of elements. It gets it wrong, for dictionaries with duplicate
keys. Which means, it can only be used with trusted variants that are
known to not contain duplicates. Which is quite a non-starter.

Also, the idea of a compare function for GVariant that ignores the order
of dictionary elements seems wrong. Even if for a certain application
the order does not matter, it still depends what the upper layer makes
of duplicate keys (will they bail out, or take the first/last occurrence
of a duplicate key?). nm_property_compare() doesn't have the knowledge
how upper layer handles it, and it's not obvious what's the right
choice. For example, if you use g_variant_lookup(), the first occurrence
is preferred. If you iterate over the children, possibly later
occurrences overwrite earlier ones.

It's ill defined, and maybe shouldn't be done. What should instead
happen, is that upper layers normalize (sort, uniquify) the keys, so
that we can do a full comparison. For that we have nm_g_variant_cmp().

Drop the now unused code. The core of the function still exists as
nm_g_variant_cmp().
2024-01-04 10:03:00 +01:00

118 lines
3.1 KiB
Makefile

## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = 1.6
check_local =
# The name of the module
DOC_MODULE=libnm
# The top-level SGML file.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
# The directory containing the source code. Relative to $(srcdir).
# gtk-doc will search all .c & .h files beneath here for inline comments
# documenting functions and macros.
DOC_SOURCE_DIR= \
$(top_builddir)/src/libnm-core-public \
$(top_srcdir)/src/libnm-core-public \
$(top_builddir)/src/libnm-core-impl \
$(top_srcdir)/src/libnm-core-impl \
$(top_srcdir)/src/libnm-client-public \
$(top_builddir)/src/libnm-client-public \
$(top_srcdir)/src/libnm-client-impl \
$(top_builddir)/src/libnm-client-impl \
$(NULL)
# Extra options to supply to gtkdoc-scan.
SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators='NM_AVAILABLE_IN_\d+_\d+|NM_DEPRECATED_IN_\d+_\d+|NM_DEPRECATED_IN_\d+_\d+_FOR\(\)'
# Extra options to supply to gtkdoc-mkdb.
MKDB_OPTIONS=--sgml-mode --output-format=xml
# Extra options to supply to gtkdoc-fixref.
FIXXREF_OPTIONS=
# Used for dependencies.
HFILE_GLOB=$(top_srcdir)/src/libnm-core-public/*.h $(top_srcdir)/src/libnm-client-public/*.h
CFILE_GLOB=$(top_srcdir)/src/libnm-core-impl/*.c $(top_srcdir)/src/libnm-client-impl/*.c
# Header files to ignore when scanning.
IGNORE_HFILES= \
nm-dbus-helpers.h \
nm-default-libnm.h \
nm-device-private.h \
nm-dhcp4-config.h \
nm-dhcp6-config.h \
nm-dns-manager.h \
nm-ip4-config.h \
nm-ip6-config.h \
nm-libnm-utils.h \
nm-object-private.h \
nm-remote-connection-private.h \
\
nm-connection-private.h \
nm-default-libnm-core.h \
nm-setting-private.h \
nm-team-utils.h \
nm-utils-private.h \
\
nm-core-tests-enum-types.h \
test-general-enums.h \
\
$(NULL)
# Images to copy into HTML directory.
HTML_IMAGES = libnm.png
# Extra XML files that are included by $(DOC_MAIN_SGML_FILE).
content_files = version.xml
# Other files to distribute.
extra_files = libnm.png
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
GTKDOC_CFLAGS = \
-I$(top_builddir)/src/libnm-core-public \
-I$(top_srcdir)/src/libnm-core-public \
-I$(top_srcdir)/src/libnm-client-public \
-I$(top_builddir)/src/libnm-client-public \
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
$(GLIB_CFLAGS) \
$(SANITIZER_EXEC_CFLAGS)
GTKDOC_LIBS = \
$(top_builddir)/src/libnm-client-impl/libnm.la \
$(GLIB_LIBS) \
$(SANITIZER_EXEC_LDFLAGS)
# include common portion ...
include $(top_srcdir)/gtk-doc.make
EXTRA_DIST += \
version.xml.in \
meson.build \
$(NULL)
CLEANFILES += \
html/* \
tmpl/* \
xml/* \
libnm-overrides.txt \
libnm-sections.txt \
libnm.actions \
$(NULL)
if GTK_DOC_BUILD_HTML
check-local-gtk-doc-patch:
@if grep -q -F '<a href="libnm-nm-setting-user.html">nm-setting-user</a>' "$(top_builddir)/docs/libnm/html/index.html"; then \
echo "WARNING: The generated documentation has issues. Patch your gtk-doc (see https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/2). Let this check fail with NMTST_CHECK_GTK_DOC=1"; \
test "$$NMTST_CHECK_GTK_DOC" != 1; \
fi
check_local += check-local-gtk-doc-patch
endif
check-local: $(check_local)