2015-11-19 00:02:16 +00:00
|
|
|
if BUILD_NMCLI
|
|
|
|
|
|
2010-02-25 09:52:30 -08:00
|
|
|
bin_PROGRAMS = \
|
|
|
|
|
nmcli
|
|
|
|
|
|
2013-08-22 10:47:21 -04:00
|
|
|
AM_CPPFLAGS = \
|
2010-02-25 09:52:30 -08:00
|
|
|
-I${top_srcdir} \
|
2014-05-30 16:45:02 -04:00
|
|
|
-I${top_builddir} \
|
2010-02-25 09:52:30 -08:00
|
|
|
-I${top_srcdir}/include \
|
build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h"
For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus
paths of NetworkManager. It is desirable to have this header usable without
having a dependency on "glib.h", for example for a QT application. For that,
commit c0852964a890cf43cc2dcaeff41ac6edc5028f24 removed that dependancy.
For libnm-glib library, the analog to "nm-dbus-interface.h" is
"NetworkManager.h", and the same applies there. Commit
159e827a72f420048e12d318f8ba1edd3f641fc8 removed that include.
However, that broke build on PackageKit [1] which expected to get the
version macros by including "NetworkManager.h". So at least for libnm-glib,
we need to preserve old behavior so that a user including
"NetworkManager.h" gets the version macros, but not "glib.h".
Extract the version macros to a new header file "nm-version-macros.h".
This header doesn't include "glib.h" and can be included from
"NetworkManager.h". This gives as previous behavior and a glib-free
include.
For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h".
Very few users will actually need the version macros, but not using
libnm.
Users that use libnm, should just include (libnm's) "NetworkManager.h" to
get all headers.
As a special case, a user who doesn't want to use glib/libnm, but still
needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include
them both separately.
[1] https://github.com/hughsie/PackageKit/issues/85
Fixes: 4545a7fe9670ce4d7c259c11c2cc853bfae6729b
2015-09-25 16:07:50 +02:00
|
|
|
-I$(top_builddir)/include \
|
2014-05-19 13:44:02 -04:00
|
|
|
-I${top_srcdir}/libnm-core \
|
|
|
|
|
-I${top_builddir}/libnm-core \
|
|
|
|
|
-I${top_srcdir}/libnm \
|
|
|
|
|
-I${top_builddir}/libnm \
|
2014-10-06 15:25:53 +02:00
|
|
|
-I${top_srcdir}/clients/common \
|
2013-08-22 10:47:21 -04:00
|
|
|
$(GLIB_CFLAGS) \
|
2014-04-07 16:14:47 -04:00
|
|
|
-DG_LOG_DOMAIN=\""nmcli"\" \
|
2014-02-12 12:28:52 -05:00
|
|
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
2013-08-22 10:47:21 -04:00
|
|
|
-DNMCLI_LOCALEDIR=\"$(datadir)/locale\"
|
2010-02-25 09:52:30 -08:00
|
|
|
|
|
|
|
|
nmcli_SOURCES = \
|
2014-10-30 15:45:43 +01:00
|
|
|
agent.c \
|
|
|
|
|
agent.h \
|
2012-01-06 13:51:33 +01:00
|
|
|
common.c \
|
|
|
|
|
common.h \
|
2010-02-25 09:52:30 -08:00
|
|
|
connections.c \
|
|
|
|
|
connections.h \
|
|
|
|
|
devices.c \
|
|
|
|
|
devices.h \
|
2014-09-30 15:53:51 +02:00
|
|
|
general.c \
|
|
|
|
|
general.h \
|
2010-03-31 17:14:35 +02:00
|
|
|
settings.c \
|
|
|
|
|
settings.h \
|
2010-02-25 09:52:30 -08:00
|
|
|
nmcli.c \
|
|
|
|
|
nmcli.h \
|
|
|
|
|
utils.c \
|
2014-10-06 15:25:53 +02:00
|
|
|
utils.h \
|
2014-10-30 11:25:55 +01:00
|
|
|
polkit-agent.c \
|
|
|
|
|
polkit-agent.h \
|
2014-10-06 15:25:53 +02:00
|
|
|
\
|
|
|
|
|
$(srcdir)/../common/nm-secret-agent-simple.c \
|
|
|
|
|
$(srcdir)/../common/nm-secret-agent-simple.h \
|
|
|
|
|
$(NULL)
|
2010-02-25 09:52:30 -08:00
|
|
|
|
|
|
|
|
nmcli_LDADD = \
|
|
|
|
|
$(GLIB_LIBS) \
|
2014-05-13 15:50:38 +02:00
|
|
|
$(READLINE_LIBS) \
|
2014-05-19 13:44:02 -04:00
|
|
|
$(top_builddir)/libnm/libnm.la
|
2010-02-25 09:52:30 -08:00
|
|
|
|
2014-10-30 11:25:55 +01:00
|
|
|
if WITH_POLKIT_AGENT
|
|
|
|
|
AM_CPPFLAGS += $(POLKIT_CFLAGS)
|
|
|
|
|
nmcli_SOURCES += $(srcdir)/../common/nm-polkit-listener.c $(srcdir)/../common/nm-polkit-listener.h
|
|
|
|
|
nmcli_LDADD += $(POLKIT_LIBS)
|
|
|
|
|
endif
|
|
|
|
|
|
2014-06-27 12:25:54 -04:00
|
|
|
if BUILD_SETTING_DOCS
|
2014-11-16 17:07:56 -05:00
|
|
|
settings-docs.c: settings-docs.xsl $(top_builddir)/libnm/nm-property-docs.xml
|
2014-05-30 16:45:02 -04:00
|
|
|
$(AM_V_GEN) xsltproc --output $@ $^
|
2010-02-25 09:52:30 -08:00
|
|
|
|
2014-05-30 16:45:02 -04:00
|
|
|
BUILT_SOURCES = settings-docs.c
|
docs: make the settings docs work from tarball builds
docs/api/settings-spec.xml was accidentally not getting disted,
because gtk-doc.make explicitly removes all DISTCLEANFILES from
distdir. However, it doesn't actually make sense for the settings docs
files to be in DISTCLEANFILES anyway; they were put there rather than
CLEANFILES (IIRC) so that "make clean" in a tarball build wouldn't
delete them and break things. But the right fix is to just make them
only be in CLEANFILES when BUILD_SETTING_DOCS is true, and not ever
get deleted otherwise.
Also adjust the build rules to ensure that the generated docs don't
get rebuilt in tarball builds, since that can cause problems when
building from a read-only source tree, etc.
Meanwhile, in an unrelated but also fatal bug, configure.ac's check
for if the generated docs were already present never got updated for
the cli/src -> clients/cli move, and so even if we had been disting
settings-spec.xml, configure would still think that the tarball didn't
have all of the generated docs in it, so SETTING_DOCS_AVAILABLE would
be set false and none of the generated docs would get used.
https://bugzilla.gnome.org/show_bug.cgi?id=740035
2014-11-12 15:50:39 -05:00
|
|
|
CLEANFILES = settings-docs.c
|
2014-05-30 16:45:02 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
EXTRA_DIST = settings-docs.c settings-docs.xsl
|
2014-07-22 17:55:13 -04:00
|
|
|
|
|
|
|
|
completiondir = $(datadir)/bash-completion/completions
|
|
|
|
|
|
|
|
|
|
install-data-hook:
|
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(completiondir)
|
|
|
|
|
$(INSTALL_DATA) $(srcdir)/nmcli-completion $(DESTDIR)$(completiondir)/nmcli
|
|
|
|
|
|
|
|
|
|
uninstall-hook:
|
|
|
|
|
rm -f $(DESTDIR)$(completiondir)/nmcli
|
|
|
|
|
|
|
|
|
|
EXTRA_DIST += nmcli-completion
|
2015-11-19 00:02:16 +00:00
|
|
|
|
|
|
|
|
endif
|