X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=doc%2Fman%2FMakefile.am;h=8f20ede92e39f3bea3508e9ea8611e11aa450736;hb=HEAD;hp=869494db9ad735942c671065e66c3e1095a5e32d;hpb=484b2a0cbefcf0c7072622a5a411ea5ed849da28;p=lttng-tools.git diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 869494db9..8f20ede92 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -7,6 +7,9 @@ # function which adds the source directory prefix and adds a given suffix manaddsuffix = $(addsuffix $(1),$(addprefix $(srcdir)/,$(2))) +# Local targets. +LOCAL = + # List only the names without the .*.txt extension here: MAN1_NAMES = \ lttng \ @@ -41,7 +44,7 @@ MAN1_NAMES = \ lttng-remove-trigger \ lttng-list-triggers MAN3_NAMES = -MAN7_NAMES = lttng-event-rule +MAN7_NAMES = lttng-event-rule lttng-concepts MAN8_NAMES = lttng-sessiond lttng-relayd MAN1_NO_ASCIIDOC_NAMES = MAN3_NO_ASCIIDOC_NAMES = lttng-health-check @@ -59,11 +62,12 @@ MAN_XML = $(patsubst $(srcdir)/%.txt,%.xml,$(MAN_TXT)) # common AsciiDoc source files COMMON_TXT = \ $(srcdir)/common-footer.txt \ - $(srcdir)/common-cmd-footer.txt \ - $(srcdir)/common-cmd-options-head.txt \ - $(srcdir)/common-cmd-help-options.txt \ + $(srcdir)/common-lttng-cmd-after-options.txt \ + $(srcdir)/common-lttng-cmd-options-head.txt \ + $(srcdir)/common-lttng-cmd-help-options.txt \ $(srcdir)/common-help-option.txt \ - $(srcdir)/common-intro.txt + $(srcdir)/common-intro.txt \ + $(srcdir)/common-daemon-cfg.txt # config ASCIIDOC_CONF = $(srcdir)/asciidoc.conf @@ -112,7 +116,7 @@ MAN_H_RECIPE = \ %.8.h: %.8 $(MAN_H_RECIPE) -all-local: $(MAN_H) +LOCAL += $(MAN_H) CLEANFILES += $(MAN_H) endif # EMBED_HELP @@ -204,6 +208,27 @@ dist_man7_MANS += $(MAN7) dist_man8_MANS += $(MAN8) endif # MAN_PAGES_OPT +MAN_HIERARCHY = man1 man3 man7 man8 + +LOCAL += $(MAN_HIERARCHY) + +CLEANFILES += $(MAN_HIERARCHY) + +# Mimic mandb(8) path hierarchy -- as if installed -- by symlinking +# sub-directories to the top man directory. This allows developers to read +# the locally generated man pages. For example `$ ./pre-inst-env man lttng'. +man1: + @ln -s $(abs_builddir) $@ + +man3: + @ln -s $(abs_builddir) $@ + +man7: + @ln -s $(abs_builddir) $@ + +man8: + @ln -s $(abs_builddir) $@ + if !MAN_PAGES_OPT dist-hook: @echo "Error: Please enable the man pages before creating a distribution tarball." @@ -214,5 +239,8 @@ endif # !MAN_PAGES_OPT EXTRA_DIST = $(MAN_TXT) $(COMMON_TXT) $(XSL_FILE) \ $(ASCIIDOC_CONF) $(ASCIIDOC_ATTRS_CONF).in +# Build local targets. +all-local: $(LOCAL) + # keep generated man pages that can be considered intermediate files .PRECIOUS: %.1 %.3 %.7 %.8