From d3226d2bcd88c7e49b6335ee06b1ca15c105bdb1 Mon Sep 17 00:00:00 2001 From: Tedd Ho-Jeong An Date: Mon, 3 May 2021 22:02:04 -0700 Subject: [PATCH] build: Fix manpage enable flag This patch fixes the manpages installation with --enable-manpages option so the manpages are not installed by default if the option is not set during the configuration. Signed-off-by: Ayush Garg --- Makefile.am | 19 ++++++++----------- Makefile.tools | 27 ++++++++++++++++----------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/Makefile.am b/Makefile.am index cce0c50..02f57df 100755 --- a/Makefile.am +++ b/Makefile.am @@ -12,10 +12,6 @@ bin_PROGRAMS = noinst_PROGRAMS = -dist_man_MANS = - -dist_noinst_MANS = - CLEANFILES = EXTRA_DIST = @@ -61,6 +57,10 @@ else build_plugindir = $(plugindir) endif +if MANPAGES +man_MANS = +endif +manual_pages = plugin_LTLIBRARIES = @@ -327,7 +327,10 @@ nodist_src_bluetoothd_SOURCES = $(builtin_files) CLEANFILES += $(builtin_files) src/bluetooth.service -man_MANS = src/bluetoothd.8 +if MANPAGES +man_MANS += src/bluetoothd.8 +endif +EXTRA_DIST += src/bluetoothd.8 EXTRA_DIST += src/genbuiltin src/bluetooth.conf \ src/main_m.conf src/main_w.conf profiles/network/network.conf \ @@ -585,12 +588,6 @@ if LIBRARY pkgconfig_DATA = lib/bluez.pc endif -manual_pages = doc/btmon.1 - -if MANPAGES -dist_noinst_MANS += $(manual_pages) -endif - EXTRA_DIST += $(manual_pages:.1=.txt) DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --enable-library \ diff --git a/Makefile.tools b/Makefile.tools index 46a762d..b0a8048 100755 --- a/Makefile.tools +++ b/Makefile.tools @@ -46,7 +46,11 @@ monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \ monitor/tty.h monitor_btmon_LDADD = lib/libbluetooth-internal.la \ src/libshared-mainloop.la $(UDEV_LIBS) -ldl +if MANPAGES +man_MANS += doc/btmon.1 endif +endif +manual_pages += doc/btmon.1 if LOGGER libexec_PROGRAMS += tools/btmon-logger @@ -245,16 +249,17 @@ tools_hex2hcd_SOURCES = tools/hex2hcd.c tools_mpris_proxy_SOURCES = tools/mpris-proxy.c tools_mpris_proxy_LDADD = gdbus/libgdbus-internal.la $(GLIB_LIBS) $(DBUS_LIBS) -dist_man_MANS += tools/hciattach.1 tools/hciconfig.1 \ +if MANPAGES +man_MANS += tools/hciattach.1 tools/hciconfig.1 \ tools/hcitool.1 tools/hcidump.1 \ tools/rfcomm.1 tools/rctest.1 tools/l2ping.1 \ tools/sdptool.1 tools/ciptool.1 -else +endif +endif EXTRA_DIST += tools/hciattach.1 tools/hciconfig.1 \ tools/hcitool.1 tools/hcidump.1 \ tools/rfcomm.1 tools/rctest.1 tools/l2ping.1 \ tools/sdptool.1 tools/ciptool.1 -endif if HID2HCI udevdir = $(UDEV_DIR) @@ -263,10 +268,11 @@ udev_PROGRAMS = tools/hid2hci tools_hid2hci_LDADD = $(UDEV_LIBS) -dist_man_MANS += tools/hid2hci.1 -else -EXTRA_DIST += tools/hid2hci.1 +if MANPAGES +man_MANS += tools/hid2hci.1 endif +endif +EXTRA_DIST += tools/hid2hci.1 if MESH bin_PROGRAMS += tools/meshctl @@ -400,12 +406,11 @@ tools_btgatt_server_SOURCES = tools/btgatt-server.c src/uuid-helper.c tools_btgatt_server_LDADD = src/libshared-mainloop.la \ lib/libbluetooth-internal.la -dist_man_MANS += tools/btattach.1 - -EXTRA_DIST += tools/bdaddr.1 -else -EXTRA_DIST += tools/btattach.1 +if MANPAGES +man_MANS += tools/btattach.1 +endif endif +EXTRA_DIST += tools/btattach.1 tools/bdaddr.1 if READLINE noinst_PROGRAMS += attrib/gatttool tools/btmgmt \ -- 2.7.4