2012-01-12 22:34:09 +07:00
|
|
|
MAN5 = depmod.d.5 modprobe.d.5 modules.dep.5
|
2014-09-17 10:12:27 +07:00
|
|
|
MAN8 = kmod.8 depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8
|
2012-02-01 07:16:47 +07:00
|
|
|
MAN_STUB = modules.dep.bin.5
|
2012-01-12 20:48:21 +07:00
|
|
|
|
2024-06-11 22:05:03 +07:00
|
|
|
AM_V_SCDOC = $(AM_V_SCDOC_$(V))
|
|
|
|
AM_V_SCDOC_ = $(AM_V_SCDOC_$(AM_DEFAULT_VERBOSITY))
|
|
|
|
AM_V_SCDOC_0 = @echo " SCDOC " $@;
|
2017-02-24 09:28:27 +07:00
|
|
|
|
2012-02-01 07:16:47 +07:00
|
|
|
if BUILD_TOOLS
|
2012-01-12 22:34:09 +07:00
|
|
|
dist_man_MANS = $(MAN5) $(MAN8) $(MAN_STUB)
|
2012-02-01 07:16:47 +07:00
|
|
|
endif
|
2012-01-12 20:48:21 +07:00
|
|
|
|
2024-06-11 22:05:03 +07:00
|
|
|
EXTRA_DIST = $(MAN5:%.5=%.5.scd) $(MAN8:%.8=%.8.scd)
|
|
|
|
CLEANFILES = $(filter-out $(MAN_STUB), $(dist_man_MANS))
|
2012-02-03 05:24:03 +07:00
|
|
|
|
2024-02-17 23:01:26 +07:00
|
|
|
define generate_manpage
|
2024-07-08 20:43:14 +07:00
|
|
|
$(AM_V_SCDOC)cat $< | \
|
2024-07-08 20:43:15 +07:00
|
|
|
sed -e 's|@SYSCONFDIR@|$(sysconfdir)|g' | \
|
2024-07-08 20:43:14 +07:00
|
|
|
sed -e 's|@DISTCONFDIR@|$(distconfdir)|g' | \
|
2023-11-10 19:13:54 +07:00
|
|
|
sed -e 's|@MODULE_DIRECTORY@|$(module_directory)|g' | \
|
2024-06-11 22:05:03 +07:00
|
|
|
$(SCDOC) > $@
|
2024-02-17 23:01:26 +07:00
|
|
|
endef
|
|
|
|
|
2024-06-11 22:05:03 +07:00
|
|
|
%.5: %.5.scd
|
2024-02-17 23:01:26 +07:00
|
|
|
$(generate_manpage)
|
|
|
|
|
2024-06-11 22:05:03 +07:00
|
|
|
%.8: %.8.scd
|
2024-02-17 23:01:26 +07:00
|
|
|
$(generate_manpage)
|