build: improve documentation and test configure options
Use --enable-doc and --enable-tests instead of --with-docs and --with-tests. This is consistent with other features and with --enable-gtk-doc option. Support current variants as fallback. Don't build tests unless --enable-tests is specified.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
SUBDIRS=. tests
|
||||
SUBDIRS = . tests
|
||||
|
||||
###########################################
|
||||
# Test libraries
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I${top_builddir}/include \
|
||||
@@ -25,16 +27,13 @@ test_dispatcher_envp_LDADD = \
|
||||
|
||||
###########################################
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-dispatcher-envp
|
||||
$(abs_builddir)/test-dispatcher-envp $(abs_srcdir)
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST= \
|
||||
dispatcher-old-down \
|
||||
dispatcher-old-up \
|
||||
dispatcher-old-vpn-down \
|
||||
dispatcher-old-vpn-up
|
||||
|
||||
endif
|
||||
|
60
configure.ac
60
configure.ac
@@ -80,20 +80,6 @@ GETTEXT_PACKAGE=NetworkManager
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
|
||||
|
||||
dnl
|
||||
dnl Documentation
|
||||
dnl
|
||||
AC_ARG_WITH(docs, AS_HELP_STRING([--with-docs], [Build NetworkManager documentation]))
|
||||
AM_CONDITIONAL(WITH_DOCS, test "x$with_docs" = "xyes")
|
||||
case $with_docs in
|
||||
yes)
|
||||
enable_gtk_doc=yes
|
||||
;;
|
||||
*)
|
||||
with_docs=no
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl
|
||||
dnl Make sha1.c happy on big endian systems
|
||||
dnl
|
||||
@@ -658,29 +644,32 @@ AM_CONDITIONAL(WITH_CONCHECK, test "${enable_concheck}" = "yes")
|
||||
|
||||
NM_COMPILER_WARNINGS
|
||||
|
||||
GTK_DOC_CHECK(1.0)
|
||||
|
||||
|
||||
dnl -------------------------
|
||||
dnl Vala bindings
|
||||
dnl -------------------------
|
||||
|
||||
VAPIGEN_CHECK(0.17.1.24)
|
||||
|
||||
dnl
|
||||
dnl Tests
|
||||
dnl
|
||||
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build NetworkManager tests]))
|
||||
AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
|
||||
case $with_tests in
|
||||
yes)
|
||||
with_tests=yes
|
||||
;;
|
||||
*)
|
||||
with_tests=no
|
||||
;;
|
||||
esac
|
||||
|
||||
# Tests, utilities and documentation
|
||||
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests], [Build NetworkManager tests (default: yes)]))
|
||||
AC_ARG_ENABLE(doc, AS_HELP_STRING([--enable-doc], [Build NetworkManager documentation (default: no)]))
|
||||
# Fallback to --with-tests and with-docs
|
||||
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build NetworkManager tests (deprecated)]))
|
||||
AC_ARG_WITH(docs, AS_HELP_STRING([--with-docs], [Build NetworkManager documentation (deprecated)]))
|
||||
AS_IF([test -n "$with_tests"], enable_tests="$with_tests")
|
||||
AS_IF([test -n "$with_docs"], enable_doc="$with_docs")
|
||||
# Default to --enable-tests and --disable-docs
|
||||
AS_IF([test -z "$enable_tests"], enable_tests="yes")
|
||||
AS_IF([test -z "$enable_doc"], enable_doc="no")
|
||||
# Normalize values
|
||||
AS_IF([test "$enable_tests" != "yes"], enable_tests="no")
|
||||
AS_IF([test "$enable_doc" != "yes"], enable_doc="no")
|
||||
# Add conditionals
|
||||
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "yes")
|
||||
AM_CONDITIONAL(ENABLE_DOC, test "$enable_tests" = "yes")
|
||||
# Add gtk-doc conditionals
|
||||
enable_gtk_doc="$enable_doc"
|
||||
GTK_DOC_CHECK(1.0)
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
@@ -848,9 +837,10 @@ if test "${ac_with_wext}" = "yes"; then
|
||||
else
|
||||
echo WEXT support: no
|
||||
fi
|
||||
|
||||
echo
|
||||
echo Building documentation: ${with_docs}
|
||||
echo Building tests: ${with_tests}
|
||||
echo
|
||||
|
||||
echo "Miscellaneous:"
|
||||
echo " documentation: $enable_doc"
|
||||
echo " tests: $enable_tests"
|
||||
echo
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
if WITH_DOCS
|
||||
if ENABLE_DOC
|
||||
|
||||
SUBDIRS = api libnm-glib libnm-util
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -2,7 +2,7 @@ GENERATE_SETTINGS_SPEC_SOURCE = generate-settings-spec.c
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
|
||||
if WITH_DOCS
|
||||
if ENABLE_DOC
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
@@ -85,6 +85,4 @@ CLEANFILES =
|
||||
endif
|
||||
|
||||
EXTRA_DIST += version.xml.in
|
||||
|
||||
CLEANFILES += html/* tmpl/* xml/*
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
include $(GLIB_MAKEFILE)
|
||||
|
||||
SUBDIRS=. tests
|
||||
SUBDIRS = . tests
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
@@ -232,7 +232,7 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
CLEANFILES += $(gir_DATA) $(typelib_DATA)
|
||||
endif
|
||||
|
||||
if WITH_TESTS
|
||||
if ENABLE_TESTS
|
||||
|
||||
check-local:
|
||||
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-glib.so $(SYMBOL_VIS_FILE)
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/include \
|
||||
@@ -28,10 +30,7 @@ TEST_RSS_BIN = test-remote-settings-service.py
|
||||
|
||||
EXTRA_DIST = $(TEST_RSS_BIN)
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-remote-settings-client
|
||||
$(abs_builddir)/test-remote-settings-client $(abs_srcdir) $(TEST_RSS_BIN)
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
include $(GLIB_MAKEFILE)
|
||||
|
||||
SUBDIRS=. tests
|
||||
SUBDIRS = . tests
|
||||
|
||||
INCLUDES = -I${top_srcdir} -I${top_srcdir}/include -I${top_builddir}/include
|
||||
|
||||
@@ -164,7 +164,7 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
CLEANFILES += $(gir_DATA) $(typelib_DATA)
|
||||
endif
|
||||
|
||||
if WITH_TESTS
|
||||
if ENABLE_TESTS
|
||||
|
||||
check-local:
|
||||
$(top_srcdir)/tools/check-exports.sh $(builddir)/.libs/libnm-util.so $(SYMBOL_VIS_FILE)
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
SUBDIRS=certs
|
||||
|
||||
INCLUDES = \
|
||||
@@ -73,8 +75,6 @@ test_setting_8021x_LDADD = \
|
||||
$(GLIB_LIBS) \
|
||||
$(DBUS_LIBS)
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-settings-defaults test-crypto test-secrets
|
||||
$(abs_builddir)/test-settings-defaults
|
||||
$(abs_builddir)/test-secrets
|
||||
@@ -137,4 +137,3 @@ check-local: test-settings-defaults test-crypto test-secrets
|
||||
"1234567890"
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SUBDIRS=. tests
|
||||
SUBDIRS = . tests
|
||||
|
||||
INCLUDES = \
|
||||
-I${top_srcdir} \
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/include \
|
||||
@@ -21,10 +23,7 @@ test_dhcp_dhclient_LDADD = \
|
||||
$(top_builddir)/libnm-util/libnm-util.la \
|
||||
$(GLIB_LIBS)
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-dhcp-dhclient
|
||||
$(abs_builddir)/test-dhcp-dhclient
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SUBDIRS=plugins . tests
|
||||
SUBDIRS = plugins . tests
|
||||
|
||||
INCLUDES = -I${top_srcdir} \
|
||||
-I${top_builddir}/include \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SUBDIRS=. tests
|
||||
SUBDIRS = . tests
|
||||
|
||||
nm-ifcfg-rh-glue.h: nm-ifcfg-rh.xml
|
||||
$(AM_V_GEN) dbus-binding-tool --prefix=nm_ifcfg_rh --mode=glib-server --output=$@ $<
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
SUBDIRS=network-scripts
|
||||
|
||||
INCLUDES = \
|
||||
@@ -36,14 +38,10 @@ test_ifcfg_rh_utils_CPPFLAGS = \
|
||||
test_ifcfg_rh_utils_LDADD = \
|
||||
$(builddir)/../libifcfg-rh-io.la
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-ifcfg-rh
|
||||
$(abs_builddir)/test-ifcfg-rh-utils
|
||||
$(abs_builddir)/test-ifcfg-rh
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
iscsiadm-test-dhcp \
|
||||
iscsiadm-test-static \
|
||||
@@ -54,4 +52,5 @@ EXTRA_DIST = \
|
||||
iscsiadm-test-bad-entry \
|
||||
iscsiadm-test-bad-record
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
SUBDIRS = . tests
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/src/wifi \
|
||||
-I$(top_srcdir)/src/settings \
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
INCLUDES=-I$(srcdir)/../ \
|
||||
-I$(top_srcdir)/libnm-glib \
|
||||
-I$(top_srcdir)/libnm-util \
|
||||
@@ -17,3 +19,5 @@ EXTRA_DIST = hostname \
|
||||
net.all \
|
||||
nm-system-settings.conf \
|
||||
wpa_supplicant.conf
|
||||
|
||||
endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SUBDIRS=. tests
|
||||
SUBDIRS = . tests
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/src/logging \
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/libnm-util \
|
||||
@@ -20,14 +22,12 @@ test_ifupdown_LDADD = \
|
||||
$(builddir)/../libifupdown-io.la \
|
||||
$(DBUS_LIBS)
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-ifupdown
|
||||
$(abs_builddir)/test-ifupdown
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
test1 test2 test3 test4 test5 test6 test7 test8 test9 test11 test12 \
|
||||
test13 test14 test15 test16 test17-wired-static-verify-ip4 \
|
||||
test18-wired-static-verify-ip6 test19-wired-static-verify-ip4-plen
|
||||
|
||||
endif
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SUBDIRS=. tests
|
||||
SUBDIRS = . tests
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/src/settings \
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
SUBDIRS=keyfiles
|
||||
|
||||
INCLUDES = \
|
||||
@@ -25,10 +27,7 @@ test_keyfile_LDADD = \
|
||||
$(top_builddir)/libnm-util/libnm-util.la \
|
||||
$(DBUS_LIBS)
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-keyfile
|
||||
$(abs_builddir)/test-keyfile
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/include \
|
||||
@@ -24,10 +26,7 @@ test_wired_defname_LDADD = \
|
||||
|
||||
###########################################
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-wired-defname
|
||||
$(abs_builddir)/test-wired-defname
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SUBDIRS=. tests
|
||||
SUBDIRS = . tests
|
||||
|
||||
INCLUDES = \
|
||||
-I${top_srcdir}/src \
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/include \
|
||||
@@ -20,10 +22,7 @@ test_supplicant_config_LDADD = \
|
||||
$(top_builddir)/src/supplicant-manager/libsupplicant-manager.la \
|
||||
$(DBUS_LIBS)
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-supplicant-config
|
||||
$(abs_builddir)/test-supplicant-config
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
if ENABLE_TESTS
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/include \
|
||||
@@ -64,12 +66,9 @@ EXTRA_DIST = test-secret-agent.py
|
||||
|
||||
###########################################
|
||||
|
||||
if WITH_TESTS
|
||||
|
||||
check-local: test-dhcp-options test-policy-hosts test-wifi-ap-utils
|
||||
$(abs_builddir)/test-dhcp-options
|
||||
$(abs_builddir)/test-policy-hosts
|
||||
$(abs_builddir)/test-wifi-ap-utils
|
||||
|
||||
endif
|
||||
|
||||
|
Reference in New Issue
Block a user