From: fabbione@sourceware.org <fabbione@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster ./Makefile ./configure make/defines.mk ...
Date: 24 Sep 2007 14:39:42 -0000 [thread overview]
Message-ID: <20070924143942.22569.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2007-09-24 14:39:42
Modified files:
. : Makefile configure
make : defines.mk.input
Log message:
Add support to allow disable the build/install targets for each specific
subsystem in the tree.
Major clean up of top level Makefile thanks to Joel Becker input/suggestions.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/Makefile.diff?cvsroot=cluster&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/configure.diff?cvsroot=cluster&r1=1.32&r2=1.33
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/make/defines.mk.input.diff?cvsroot=cluster&r1=1.4&r2=1.5
--- cluster/Makefile 2007/09/19 19:47:07 1.30
+++ cluster/Makefile 2007/09/24 14:39:41 1.31
@@ -1,7 +1,7 @@
###############################################################################
###############################################################################
## Copyright (C) 2004 Red Hat, Inc. All rights reserved.
-##
+##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
## of the GNU General Public License v.2.
@@ -11,88 +11,63 @@
include make/defines.mk
-KERNEL=gnbd-kernel gfs-kernel
-USERLAND=cman-lib ccs cman dlm group fence gfs gfs2 gnbd rgmanager
-
-MODULES=${KERNEL} ${USERLAND}
-
-KSUBDIRS=gnbd-kernel/src gfs-kernel/src/gfs
-SUBDIRS=ccs cman dlm group fence gfs gfs2 gnbd rgmanager
+REALSUBDIRS = gnbd-kernel/src gfs-kernel/src/gfs \
+ cman/lib ccs cman dlm group fence gfs gfs2 gnbd rgmanager
-all: build
+SUBDIRS = $(filter-out \
+ $(if ${without_gnbd},gnbd-kernel/src) \
+ $(if ${without_gfs},gfs-kernel/src/gfs) \
+ $(if ${without_cman},cman/lib) \
+ $(if ${without_ccs},ccs) \
+ $(if ${without_cman},cman) \
+ $(if ${without_dlm},dlm) \
+ $(if ${without_group},group) \
+ $(if ${without_fence},fence) \
+ $(if ${without_gfs},gfs) \
+ $(if ${without_gfs2},gfs2) \
+ $(if ${without_gnbd},gnbd) \
+ $(if ${without_rgmanager},rgmanager) \
+ , $(REALSUBDIRS))
-build: kernel-modules userland
+all: scripts ${SUBDIRS}
-# scripts details
+# Fix scripts permissions
scripts:
- chmod 755 ${BUILDDIR}/scripts/*.pl
- chmod 755 ${BUILDDIR}/scripts/define2var
-
-# kernel stuff
-
-kernel-modules: ${KERNEL}
-
-gnbd-kernel:
- ${MAKE} -C gnbd-kernel/src all
+ chmod 755 ${BUILDDIR}/scripts/*.pl ${BUILDDIR}/scripts/define2var
-gfs-kernel:
- ${MAKE} -C gfs-kernel/src/gfs
+${SUBDIRS}:
+ [ -n "${without_$@}" ] || ${MAKE} -C $@ all
-# userland stuff
-# make all target can't be folded in a for loop otherwise make -j breaks
-# because we can't express dependencies.
+# Kernel
-userland: scripts ${USERLAND}
+gnbd-kernel: gnbd-kernel/src
+gfs-kernel: gfs-kernel/src/gfs
-cman-lib:
- ${MAKE} -C cman/lib all
-
-ccs: cman-lib
- ${MAKE} -C ccs all
+# Dependencies
+cman/lib:
+ccs: cman/lib
cman: ccs
- ${MAKE} -C cman all
-
dlm:
- ${MAKE} -C dlm all
-
group: ccs dlm
- ${MAKE} -C group all
-
fence: group dlm
- ${MAKE} -C fence all
-
gfs:
- ${MAKE} -C gfs all
-
gfs2:
- ${MAKE} -C gfs2 all
-
-gnbd: cman-lib
- ${MAKE} -C gnbd all
-
+gnbd: cman/lib
rgmanager: ccs dlm
- ${MAKE} -C rgmanager all
-# end of build
+install: all
+ set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
+
+uninstall:
+ set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
clean:
- set -e && for i in ${KSUBDIRS} ${SUBDIRS}; do ${MAKE} -C $$i $@; done
+ set -e && for i in ${REALSUBDIRS}; do ${MAKE} -C $$i $@; done
distclean: clean
rm -f make/defines.mk
rm -f *tar.gz
rm -rf build
-kernel-install: kernel-modules
- set -e && for i in ${KSUBDIRS}; do ${MAKE} -C $$i install; done
-
-userland-install: userland
- set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i install; done
-
-install: kernel-install userland-install
-
-uninstall:
- set -e && for i in ${KSUBDIRS} ${SUBDIRS}; do ${MAKE} -C $$i $@; done
-
-.PHONY: scripts ${MODULES}
+.PHONY: scripts ${REALSUBDIRS}
--- cluster/configure 2007/09/19 11:07:21 1.32
+++ cluster/configure 2007/09/24 14:39:41 1.33
@@ -68,6 +68,15 @@
enable_xen => \$enable_xen,
release_major => \$release_major,
release_minor => \$release_minor,
+ without_ccs => \$without_ccs,
+ without_cman => \$without_cman,
+ without_dlm => \$without_dlm,
+ without_group => \$without_group,
+ without_fence => \$without_fence,
+ without_gfs => \$without_gfs,
+ without_gfs2 => \$without_gfs2,
+ without_gnbd => \$without_gnbd,
+ without_rgmanager => \$without_rgmanager,
);
$err = &GetOptions (\%options,
@@ -114,7 +123,16 @@
'release_major=s',
'release_minor=s',
'fence_agents=s',
- 'enable_xen');
+ 'enable_xen',
+ 'without_ccs',
+ 'without_cman',
+ 'without_dlm',
+ 'without_group',
+ 'without_fence',
+ 'without_gfs',
+ 'without_gfs2',
+ 'without_gnbd',
+ 'without_rgmanager');
if(!$err) {
$ret = 1;
@@ -171,6 +189,15 @@
print "--fence_agents=\tlist of fence agents to configure. (Default: all)\n";
print "\t\tUse --fence_agents=help for a list\n";
print "--enable_xen\tEnable building of Xen-specific pieces\n";
+ print "--without_ccs\tDisable ccs building (Default: enabled)\n";
+ print "--without_cman\tDisable cman building (Default: enabled)\n";
+ 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_gfs\tDisable gfs building (Default: enabled)\n";
+ print "--without_gfs2\tDisable gfs2 building (Default: enabled)\n";
+ print "--without_gnbd\tDisable gnbd building (Default: enabled)\n";
+ print "--without_rgmanager\tDisable rgmanager building (Default: enabled)\n";
exit $ret;
}
@@ -376,6 +403,16 @@
$_ =~ s/\@SHAREDIR\@/$sharedir/;
$_ =~ s/\@FENCE_AGENTS\@/$fence_agents/;
$_ =~ s/\@ENABLE_XEN\@/$enable_xen/;
+ $_ =~ s/\@DISABLE_CCS\@/$without_ccs/;
+ $_ =~ s/\@DISABLE_CMAN\@/$without_cman/;
+ $_ =~ s/\@DISABLE_DLM\@/$without_dlm/;
+ $_ =~ s/\@DISABLE_GROUP\@/$without_group/;
+ $_ =~ s/\@DISABLE_FENCE\@/$without_fence/;
+ $_ =~ s/\@DISABLE_GFS\@/$without_gfs/;
+ $_ =~ s/\@DISABLE_GFS2\@/$without_gfs2/;
+ $_ =~ s/\@DISABLE_GNBD\@/$without_gnbd/;
+ $_ =~ s/\@DISABLE_RGMANAGER\@/$without_rgmanager/;
+
print OFILE "$_\n";
}
--- cluster/make/defines.mk.input 2007/09/19 11:07:21 1.4
+++ cluster/make/defines.mk.input 2007/09/24 14:39:42 1.5
@@ -63,6 +63,18 @@
virtlibdir ?= @VIRTLIBDIR@
fence_agents ?= @FENCE_AGENTS@
enable_xen ?= @ENABLE_XEN@
+without_gnbd-kernel/src ?= @DISABLE_GNBD@
+without_gfs-kernel/src/gfs ?= @DISABLE_GFS@
+without_cman/lib ?= @DISABLE_CMAN@
+without_ccs ?= @DISABLE_CCS@
+without_cman ?= @DISABLE_CMAN@
+without_dlm ?= @DISABLE_DLM@
+without_group ?= @DISABLE_GROUP@
+without_fence ?= @DISABLE_FENCE@
+without_gfs ?= @DISABLE_GFS@
+without_gfs2 ?= @DISABLE_GFS2@
+without_gnbd ?= @DISABLE_GNBD@
+without_rgmanager ?= @DISABLE_RGMANAGER@
UNINSTALL = @BUILDDIR@/scripts/uninstall.pl
DEF2VAR = @BUILDDIR@/scripts/define2var
reply other threads:[~2007-09-24 14:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070924143942.22569.qmail@sourceware.org \
--to=fabbione@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).