Permalink
Browse files

Conditionalize build of man pages properly (Closes: #49)

  • Loading branch information...
superm1 committed May 22, 2018
1 parent ec86866 commit 055ddef9a9959bb4d85c4eb47804522b4f118e53
Showing with 23 additions and 13 deletions.
  1. +2 −0 Makefile.am
  2. +2 −1 configure.ac
  3. +19 −12 src/bin/Makefile.am
View
@@ -104,12 +104,14 @@ export DOT HAVE_DOT top_builddir top_srcdir
out/libsmbios_c/html/index.html: $(top_srcdir)/pkg/libsmbios_c.dox $(wildcard $(top_srcdir)/src/include/smbios_c/*.h)
doxygen $< > out/$$(basename $< .dox).out
if HAVE_HELP2MAN
out/scripts/%.1 : src/bin/%
mkdir -p out/scripts
-$(HELP2MAN) --output=$@ --name=$^ "LD_LIBRARY_PATH=$$PWD/out/.libs python3 $^"
out/%.1 : out/%
-$(HELP2MAN) --output=$@ --name=$^ $^
endif
########## END DOCS ################
View
@@ -167,7 +167,8 @@ if test x$wantgraphviz != xyes ; then
fi
#generate man pages for anything executable
AC_PATH_PROG(HELP2MAN, help2man, false)
AC_PATH_PROG(HELP2MAN, help2man)
AM_CONDITIONAL(HAVE_HELP2MAN, [test $HELP2MAN])
# the manual assembly in the media direct sources fails to build on ia64 as it
# relies on more registers than available on ia64; there's no ia64 system with
View
@@ -20,40 +20,44 @@ if HAVE_PYTHON
dist_sbin_SCRIPTS += src/bin/smbios-token-ctl
DATA_HOOK_REPLACE += $(sbindir)/smbios-token-ctl
nodist_pkgdata_DATA = doc/token_list.csv doc/token_blacklist.csv
man1_MANS += out/scripts/smbios-token-ctl.1
dist_sbin_SCRIPTS += src/bin/smbios-passwd
DATA_HOOK_REPLACE += $(sbindir)/smbios-passwd
man1_MANS += out/scripts/smbios-passwd.1
dist_sbin_SCRIPTS += src/bin/smbios-sys-info
DATA_HOOK_REPLACE += $(sbindir)/smbios-sys-info
man1_MANS += out/scripts/smbios-sys-info.1
dist_sbin_SCRIPTS += src/bin/smbios-wakeup-ctl
DATA_HOOK_REPLACE += $(sbindir)/smbios-wakeup-ctl
man1_MANS += out/scripts/smbios-wakeup-ctl.1
dist_sbin_SCRIPTS += src/bin/smbios-wireless-ctl
DATA_HOOK_REPLACE += $(sbindir)/smbios-wireless-ctl
man1_MANS += out/scripts/smbios-wireless-ctl.1
dist_sbin_SCRIPTS += src/bin/smbios-lcd-brightness
DATA_HOOK_REPLACE += $(sbindir)/smbios-lcd-brightness
man1_MANS += out/scripts/smbios-lcd-brightness.1
dist_sbin_SCRIPTS += src/bin/smbios-keyboard-ctl
DATA_HOOK_REPLACE += $(sbindir)/smbios-keyboard-ctl
man1_MANS += out/scripts/smbios-keyboard-ctl.1
dist_sbin_SCRIPTS += src/bin/smbios-thermal-ctl
DATA_HOOK_REPLACE += $(sbindir)/smbios-thermal-ctl
man1_MANS += out/scripts/smbios-thermal-ctl.1
dist_sbin_SCRIPTS += src/bin/smbios-battery-ctl
DATA_HOOK_REPLACE += $(sbindir)/smbios-battery-ctl
if HAVE_HELP2MAN
man1_MANS += out/scripts/smbios-keyboard-ctl.1
man1_MANS += out/scripts/smbios-lcd-brightness.1
man1_MANS += out/scripts/smbios-wireless-ctl.1
man1_MANS += out/scripts/smbios-wakeup-ctl.1
man1_MANS += out/scripts/smbios-sys-info.1
man1_MANS += out/scripts/smbios-passwd.1
man1_MANS += out/scripts/smbios-token-ctl.1
man1_MANS += out/scripts/smbios-thermal-ctl.1
man1_MANS += out/scripts/smbios-battery-ctl.1
endif
endif # HAVE_HELP2MAN #
endif # HAVE_PYTHON #
#
# C
@@ -62,19 +66,22 @@ sbin_PROGRAMS += out/smbios-sys-info-lite
out_smbios_sys_info_lite_SOURCES = src/bin/smbios-sys-info-lite.c
out_smbios_sys_info_lite_LDADD = out/libsmbios_c.la out/libgetopt.la $(AM_LDADD)
out_smbios_sys_info_lite_LDFLAGS = $(AM_LDFLAGS) -static
man1_MANS += out/smbios-sys-info-lite.1
sbin_PROGRAMS += out/smbios-get-ut-data
out_smbios_get_ut_data_SOURCES = src/bin/smbios-get-ut-data.c
out_smbios_get_ut_data_LDADD = out/libsmbios_c.la out/libgetopt.la $(AM_LDADD)
man1_MANS += out/smbios-get-ut-data.1
sbin_PROGRAMS += out/smbios-state-byte-ctl
out_smbios_state_byte_ctl_SOURCES = src/bin/smbios-state-byte-ctl.c
out_smbios_state_byte_ctl_LDADD = out/libsmbios_c.la out/libgetopt.la $(AM_LDADD)
man1_MANS += out/smbios-state-byte-ctl.1
sbin_PROGRAMS += out/smbios-upflag-ctl
out_smbios_upflag_ctl_SOURCES = src/bin/smbios-upflag-ctl.c
out_smbios_upflag_ctl_LDADD = out/libsmbios_c.la out/libgetopt.la $(AM_LDADD)
if HAVE_HELP2MAN
man1_MANS += out/smbios-upflag-ctl.1
man1_MANS += out/smbios-state-byte-ctl.1
man1_MANS += out/smbios-get-ut-data.1
man1_MANS += out/smbios-sys-info-lite.1
endif

0 comments on commit 055ddef

Please sign in to comment.