From patchwork Fri Jan 18 20:43:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 10771507 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47B2313BF for ; Fri, 18 Jan 2019 20:44:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3733A23B23 for ; Fri, 18 Jan 2019 20:44:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B87228514; Fri, 18 Jan 2019 20:44:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E3F723B23 for ; Fri, 18 Jan 2019 20:44:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BAE49211B63F3; Fri, 18 Jan 2019 12:44:07 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=vishal.l.verma@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0D698211B509C for ; Fri, 18 Jan 2019 12:44:06 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2019 12:44:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,492,1539673200"; d="scan'208";a="127174697" Received: from vverma7-desk1.lm.intel.com ([10.232.112.170]) by orsmga002.jf.intel.com with ESMTP; 18 Jan 2019 12:44:05 -0800 From: Vishal Verma To: Subject: [ndctl PATCH] ndctl, Documentation: Allow for Makefile variables in Documentation Date: Fri, 18 Jan 2019 13:43:57 -0700 Message-Id: <20190118204357.7282-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP We were starting to accumulate automake variables such as configureation file paths that were also referenced in Documentation man pages. However, until now, the man pages simply hard coded these paths to their default values. If a distribution were to configure such a path to something other than the default, the man pages would be out of sync with the reality. Arrange for Makefile variables to be piped into an 'attrs.adoc' target (the variables to be piped in this manner still ahve to be listed explicitly). The different asciidoc(tor) source files can then include attrs.adoc to use these variables. Finally, convert instances of '/etc/ndctl/monitor.conf' in the monitor documentation to use this new facility. Cc: QI Fuli Cc: Dave Jiang Cc: Dan Williams Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang Acked-by: Dan Williams --- Documentation/ndctl/Makefile.am | 10 +++++++++- Documentation/ndctl/ndctl-monitor.txt | 16 ++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Documentation/ndctl/Makefile.am b/Documentation/ndctl/Makefile.am index a30b139..7e17f20 100644 --- a/Documentation/ndctl/Makefile.am +++ b/Documentation/ndctl/Makefile.am @@ -51,6 +51,13 @@ man1_MANS = \ CLEANFILES = $(man1_MANS) +.ONESHELL: +attrs.adoc: $(srcdir)/Makefile.am + $(AM_V_GEN) cat <<- EOF >$@ + :ndctl_monitorconfdir: $(ndctl_monitorconfdir) + :ndctl_monitorconf: $(ndctl_monitorconf) + EOF + XML_DEPS = \ ../../version.m4 \ Makefile \ @@ -63,7 +70,8 @@ XML_DEPS = \ xable-namespace-options.txt \ ars-description.txt \ labels-description.txt \ - labels-options.txt + labels-options.txt \ + attrs.adoc RM ?= rm -f diff --git a/Documentation/ndctl/ndctl-monitor.txt b/Documentation/ndctl/ndctl-monitor.txt index 363c398..2239f04 100644 --- a/Documentation/ndctl/ndctl-monitor.txt +++ b/Documentation/ndctl/ndctl-monitor.txt @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 +include::attrs.adoc[] + ndctl-monitor(1) ================ @@ -19,11 +21,13 @@ objects and dumping the json format notifications to syslog, standard output or a logfile. The objects to monitor and smart events to notify can be selected by -setting options and/or the default configuration file -(/etc/ndctl/monitor.conf). Both of the values in configuration file -and in options will work. If there is a conflict, the values in -options will override the values in configuration file. The changed -values in configuration file will work after the monitor is restarted. +setting options and/or the configuration file at +{ndctl_monitorconfdir}/{ndctl_monitorconf} + +Both, the values in configuration file and in options will work. If +there is a conflict, the values in options will override the values in +the configuration file. Any updated values in the configuration file will +take effect only after the monitor process is restarted. EXAMPLES -------- @@ -83,7 +87,7 @@ will not work if "--daemon" is specified. -c:: --config-file=:: Provide the config file to use. This overrides the default config - typically found in /etc/ndctl/ + typically found in {ndctl_monitorconfdir} --daemon:: Run a monitor as a daemon.