This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE3 - build: allow flexibility around fence agents


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=54a876b89a9e899285f24bf79b2a31d6ea4d5081
Commit:        54a876b89a9e899285f24bf79b2a31d6ea4d5081
Parent:        84b63e04da839c8cc6f77a6c53066f8b7a41856a
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Wed Jan 21 13:47:08 2009 +0100
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Wed Jan 21 13:47:08 2009 +0100

build: allow flexibility around fence agents

add generic option --without_fence_agents and/or allow --fence_agents=none
option to disable fence agents build.

--without_fence_agents has higher priority over --fence_agents list.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 configure             |   32 +++++++++++++++++++++++---------
 fence/agents/Makefile |    2 ++
 2 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/configure b/configure
index 8b78dc9..895c640 100755
--- a/configure
+++ b/configure
@@ -101,6 +101,7 @@ my %options = (
 	without_dlm => \$without_dlm,
 	without_group => \$without_group,
 	without_fence => \$without_fence,
+	without_fence_agents => \$without_fence_agents,
 	without_gfs => \$without_gfs,
 	without_gfs2 => \$without_gfs2,
 	without_rgmanager => \$without_rgmanager,
@@ -192,6 +193,7 @@ my $err = &GetOptions (\%options,
 		    'without_dlm',
 		    'without_group',
 		    'without_fence',
+		    'without_fence_agents',
 		    'without_gfs',
 		    'without_gfs2',
 		    'without_rgmanager',
@@ -290,6 +292,7 @@ if ($help || !$err) {
   print "--without_dlm\tDisable dlm building  (Default: enabled)\n";
   print "--without_group\tDisable group building  (Default: enabled)\n";
   print "--without_fence\tDisable fence building  (Default: enabled)\n";
+  print "--without_fence_agents\tDisable fence_agents building  (Default: enabled)\n";
   print "--without_gfs\tDisable gfs building  (Default: enabled)\n";
   print "--without_gfs2\tDisable gfs2 building  (Default: enabled)\n";
   print "--without_rgmanager\tDisable rgmanager building  (Default: enabled)\n";
@@ -654,6 +657,11 @@ if (!$without_group) {
 if (!$without_fence) {
   $without_fence="";
 }
+if (!$without_fence_agents) {
+  $without_fence_agents="";
+} else {
+  $fence_agents="none";
+}
 if (!$without_gfs) {
   $without_gfs="";
 }
@@ -684,15 +692,17 @@ if (defined($release_version) && not length $release_version) {
   $release_version="";
 }
 
-@args = "find fence/agents -mindepth 2 -maxdepth 2 -name Makefile -printf '%h'";
-open (IFILE, "@args |");
-while (<IFILE>) {
-  chomp;
-  s|fence\/agents\/| |g;
-  s|lib ||g;
-  $all_fence = $_;
+if ((!$fence_agents) || ($fence_agents eq "all") || ($fence_agents eq "help")) {
+  @args = "find fence/agents -mindepth 2 -maxdepth 2 -name Makefile -printf '%h'";
+  open (IFILE, "@args |");
+  while (<IFILE>) {
+    chomp;
+    s|fence\/agents\/| |g;
+    s|lib ||g;
+    $all_fence = $_;
+  }
+  close IFILE;
 }
-close IFILE;
 
 if ($fence_agents eq "help") {
   print "Available fence agents:\n$all_fence\n";
@@ -705,6 +715,10 @@ if ((!$fence_agents) || ($fence_agents eq "all")) {
   $fence_agents = $all_fence
 }
 
+if ($fence_agents eq "none") {
+  $fence_agents = "";
+}
+
 open IFILE, "<make/defines.mk.input" or die "Can't redirect stdin";
 open OFILE, ">${objdir}/make/defines.mk" or die "Can't redirect stdout";
 
diff --git a/fence/agents/Makefile b/fence/agents/Makefile
index 7c963ae..58f3dd9 100644
--- a/fence/agents/Makefile
+++ b/fence/agents/Makefile
@@ -1,6 +1,8 @@
 include ../../make/defines.mk
 
+ifdef fence_agents
 SUBDIRS = ${fence_agents} lib
+endif
 
 all: ${SUBDIRS}
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]