fence-agents: master - Add fence_na to the build

Fabio M. Di Nitto fabbione at fedoraproject.org
Tue Sep 7 08:18:43 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=ae8ee07ad63567264bcd5da282ea6a338c039cc2
Commit:        ae8ee07ad63567264bcd5da282ea6a338c039cc2
Parent:        96be5000aeb30ad0f5d76046bd15ceb2c150485b
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Tue Sep 7 10:16:03 2010 +0200
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Tue Sep 7 10:16:03 2010 +0200

Add fence_na to the build

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 configure.ac                           |   11 +++++++
 fence/agents/Makefile.am               |    1 +
 fence/agents/node_assassin/Makefile.am |   49 ++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index e3f20f3..71bc6d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,6 +135,12 @@ AC_ARG_WITH([default-config-dir],
 	[ DEFAULT_CONFIG_DIR="$withval" ],
 	[ DEFAULT_CONFIG_DIR="$sysconfdir/cluster" ])
 
+AC_ARG_WITH([default-config-file],
+	[  --default-config-file=FILE
+			  cluster config file. ],
+	[ DEFAULT_CONFIG_FILE="$withval" ],
+	[ DEFAULT_CONFIG_FILE="cluster.conf" ])
+
 ## random vars
 
 LOGDIR=${localstatedir}/log/cluster
@@ -147,6 +153,10 @@ AC_SUBST([DEFAULT_CONFIG_DIR])
 AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_DIR], "$(eval echo ${DEFAULT_CONFIG_DIR})",
 		   [Default config directory])
 
+AC_SUBST([DEFAULT_CONFIG_FILE])
+AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_FILE], "$(eval echo ${DEFAULT_CONFIG_FILE})",
+		   [Default config file])
+
 AC_SUBST([LOGDIR])
 AC_DEFINE_UNQUOTED([LOGDIR], "$(eval echo ${LOGDIR})",
 		   [Default logging directory])
@@ -249,6 +259,7 @@ AC_CONFIG_FILES([Makefile
 		 fence/agents/lpar/Makefile
 		 fence/agents/manual/Makefile
 		 fence/agents/mcdata/Makefile
+		 fence/agents/node_assassin/Makefile
 		 fence/agents/nss_wrapper/Makefile
 		 fence/agents/rackswitch/Makefile
 		 fence/agents/rsa/Makefile
diff --git a/fence/agents/Makefile.am b/fence/agents/Makefile.am
index 29e6dd7..2159558 100644
--- a/fence/agents/Makefile.am
+++ b/fence/agents/Makefile.am
@@ -24,6 +24,7 @@ SUBDIRS 		= lib \
 			  lpar \
 			  manual \
 			  mcdata \
+			  node_assassin \
 			  nss_wrapper \
 			  rackswitch \
 			  rsa \
diff --git a/fence/agents/node_assassin/Makefile.am b/fence/agents/node_assassin/Makefile.am
new file mode 100644
index 0000000..af7906b
--- /dev/null
+++ b/fence/agents/node_assassin/Makefile.am
@@ -0,0 +1,49 @@
+MAINTAINERCLEANFILES	= Makefile.in
+
+TARGET			= fence_na
+
+EXTRA_DIST		= $(TARGET).pl \
+			  $(TARGET).conf.in \
+			  $(TARGET).lib.in \
+			  $(TARGET).pod.in
+
+fencelibdir		= ${FENCEAGENTSLIBDIR}
+
+fencelib_DATA		= $(TARGET).lib
+
+conffiledir		= ${DEFAULT_CONFIG_DIR}
+
+conffile_DATA		= $(TARGET).conf
+
+sbin_SCRIPTS		= $(TARGET)
+
+dist_man_MANS		= $(TARGET).8
+
+$(TARGET): $(TARGET).pl
+	cat $^ |  sed \
+		-e 's#@''NACONFFILE@#${conffiledir}/$(TARGET).conf#g' \
+		-e 's#@''FENCEAGENTSLIBDIR@#${FENCEAGENTSLIBDIR}#g' \
+	> $@
+
+$(TARGET).pod: $(TARGET).pod.in
+	cat $^ | sed \
+		-e 's#@''NACONFFILE@#${conffiledir}/$(TARGET).conf#g' \
+	> $@
+
+$(TARGET).8: $(TARGET).pod
+	pod2man --section=8 $< $@
+
+$(TARGET).conf: $(TARGET).conf.in
+	cat $^ | sed \
+		-e 's#@''LOGDIR@#${LOGDIR}#g' \
+		-e 's#@''CONFDIR@#${DEFAULT_CONFIG_DIR}#g' \
+		-e 's#@CONFFILE@#${DEFAULT_CONFIG_FILE}#g' \
+	> $@
+
+$(TARGET).lib: $(TARGET).lib.in
+	cat $^ | sed \
+		-e 's#@''NACONFFILE@#${conffiledir}/$(TARGET).conf#g' \
+	> $@
+
+clean-local:
+	rm -f $(TARGET) $(TARGET).pod $(TARGET).8 $(TARGET).conf $(TARGET).lib


More information about the cluster-commits mailing list