[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Revised: Please review my Makefile, configure, & Misc patches



Hi,

I found several problems with the previous patch I sent out. Most of these were places where "make install" needed to be dependent on "all" but wasn't. So here is
a revised patch to review.

Regards,

Bob Peterson
Red Hat Cluster Suite

Index: Makefile
===================================================================
RCS file: /cvs/cluster/cluster/Makefile,v
retrieving revision 1.22
diff -w -u -p -p -u -r1.22 Makefile
--- Makefile    19 Jul 2006 14:45:58 -0000      1.22
+++ Makefile    9 Aug 2006 14:45:31 -0000
@@ -16,89 +16,77 @@ MAKELINE =  sbindir=${BUILDDIR}/sbin lib


all:
-       cd gnbd-kernel && ${MAKE}
-       cd cman/lib && ${MAKE}
-       cd ccs && ${MAKE}
-       cd cman && ${MAKE}
-       cd group && ${MAKE}
-       cd dlm && ${MAKE}
-       cd fence && ${MAKE}
-       cd gfs-kernel && ${MAKE}
-       cd gfs && ${MAKE}
-       cd gfs2 && ${MAKE}
-       cd gnbd && ${MAKE}
-       cd rgmanager && ${MAKE}
-#      cd cmirror && ${MAKE}
-
-copytobin:
-       cd gfs-kernel && ${MAKE} copytobin
-       cd gnbd-kernel && ${MAKE} copytobin
-       cd ccs && ${MAKE} copytobin
-       cd cman && ${MAKE} copytobin
-       cd dlm && ${MAKE} copytobin
-       cd fence && ${MAKE} copytobin
-       cd gfs && ${MAKE} copytobin
-       cd gfs2 && ${MAKE} copytobin
-       cd gnbd && ${MAKE} copytobin
-       cd rgmanager && ${MAKE} copytobin
-#      cd cmirror && ${MAKE} copytobin
+       ${MAKE} -C gnbd-kernel all
+       ${MAKE} -C cman/lib all
+       ${MAKE} -C ccs all
+       ${MAKE} -C cman all
+       ${MAKE} -C group all
+       ${MAKE} -C dlm all
+       ${MAKE} -C fence all
+       ${MAKE} -C gfs-kernel all
+       ${MAKE} -C gfs all
+       ${MAKE} -C gfs2 all
+       ${MAKE} -C gnbd all
+       ${MAKE} -C rgmanager all
+#      ${MAKE} -C cmirror all

clean:
       rm -f *tar.gz
       rm -rf build
-       cd gfs-kernel && ${MAKE} clean
-       cd gnbd-kernel && ${MAKE} clean
-       cd ccs && ${MAKE} clean
-       cd cman && ${MAKE} clean
-       cd group && ${MAKE} clean
-       cd dlm && ${MAKE} clean
-       cd fence && ${MAKE} clean
-       cd gfs && ${MAKE} clean
-       cd gfs2 && ${MAKE} clean
-       cd gnbd && ${MAKE} clean
-       cd rgmanager && ${MAKE} clean
-#      cd cmirror && ${MAKE} clean
+       ${MAKE} -C gfs-kernel clean
+       ${MAKE} -C gnbd-kernel clean
+       ${MAKE} -C ccs clean
+       ${MAKE} -C cman clean
+       ${MAKE} -C group clean
+       ${MAKE} -C dlm clean
+       ${MAKE} -C fence clean
+       ${MAKE} -C gfs clean
+       ${MAKE} -C gfs2 clean
+       ${MAKE} -C gnbd clean
+       ${MAKE} -C rgmanager clean
+#      ${MAKE} -C cmirror clean

distclean:
-       cd gfs-kernel && ${MAKE} distclean
-       cd gnbd-kernel && ${MAKE} distclean
-       cd ccs && ${MAKE} distclean
-       cd cman && ${MAKE} distclean
-       cd group && ${MAKE} distclean
-       cd dlm && ${MAKE} distclean
-       cd fence && ${MAKE} distclean
-       cd gfs && ${MAKE} distclean
-       cd gfs2 && ${MAKE} distclean
-       cd gnbd && ${MAKE} distclean
-       cd rgmanager && ${MAKE} distclean
-#      cd cmirror && ${MAKE} distclean
-
-install:
-       cd gfs-kernel && ${MAKE} install
-       cd gnbd-kernel && ${MAKE} install
-       cd ccs && ${MAKE} install
-       cd cman && ${MAKE} install
-       cd group && ${MAKE} install
-       cd dlm && ${MAKE} install
-       cd fence && ${MAKE} install
-       cd gfs && ${MAKE} install
-       cd gfs2 && ${MAKE} install
-       cd gnbd && ${MAKE} install
-       cd rgmanager && ${MAKE} install
-#      cd cmirror && ${MAKE} install
+       ${MAKE} -C gfs-kernel distclean
+       ${MAKE} -C gnbd-kernel distclean
+       ${MAKE} -C ccs distclean
+       ${MAKE} -C cman distclean
+       ${MAKE} -C group distclean
+       ${MAKE} -C dlm distclean
+       ${MAKE} -C fence distclean
+       ${MAKE} -C gfs distclean
+       ${MAKE} -C gfs2 distclean
+       ${MAKE} -C gnbd distclean
+       ${MAKE} -C rgmanager distclean
+#      ${MAKE} -C cmirror distclean
+
+install: all
+       ${MAKE} -C gfs-kernel install
+       ${MAKE} -C gnbd-kernel install
+       ${MAKE} -C ccs install
+       ${MAKE} -C cman install
+       ${MAKE} -C group install
+       ${MAKE} -C dlm install
+       ${MAKE} -C fence install
+       ${MAKE} -C gfs install
+       ${MAKE} -C gfs2 install
+       ${MAKE} -C gnbd install
+       ${MAKE} -C rgmanager install
+#      ${MAKE} -C cmirror install

uninstall:
-       cd gfs-kernel && ${MAKE} uninstall
-       cd gnbd-kernel && ${MAKE} uninstall
-       cd ccs && ${MAKE} uninstall
-       cd cman && ${MAKE} uninstall
-       cd dlm && ${MAKE} uninstall
-       cd fence && ${MAKE} uninstall
-       cd gfs && ${MAKE} uninstall
-       cd gfs2 && ${MAKE} uninstall
-       cd gnbd && ${MAKE} uninstall
-       cd rgmanager && ${MAKE} uninstall
-#      cd cmirror && ${MAKE} uninstall
+       ${MAKE} -C gfs-kernel uninstall
+       ${MAKE} -C gnbd-kernel uninstall
+       ${MAKE} -C ccs uninstall
+       ${MAKE} -C cman uninstall
+       ${MAKE} -C group uninstall
+       ${MAKE} -C dlm uninstall
+       ${MAKE} -C fence uninstall
+       ${MAKE} -C gfs uninstall
+       ${MAKE} -C gfs2 uninstall
+       ${MAKE} -C gnbd uninstall
+       ${MAKE} -C rgmanager uninstall
+#      ${MAKE} -C cmirror uninstall

latest_tags:
       ${LATEST_TAG} gfs-kernel
Index: ccs/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/ccs/Makefile,v
retrieving revision 1.9
diff -w -u -p -p -u -r1.9 Makefile
--- ccs/Makefile        29 Jun 2006 18:58:31 -0000      1.9
+++ ccs/Makefile        9 Aug 2006 14:45:31 -0000
@@ -11,38 +11,31 @@
###############################################################################

all:
-       cd daemon && ${MAKE} all
-       cd lib && ${MAKE} all
-       cd ccs_test && ${MAKE} all
-       cd ccs_tool && ${MAKE} all
-
-copytobin:
-       cd daemon && ${MAKE} copytobin
-       cd lib && ${MAKE} copytobin
-       cd ccs_test && ${MAKE} copytobin
-       cd ccs_tool && ${MAKE} copytobin
+       ${MAKE} -C daemon all
+       ${MAKE} -C lib all
+       ${MAKE} -C ccs_test all
+       ${MAKE} -C ccs_tool all

clean:
-       cd bin && ${MAKE} clean
-       cd daemon && ${MAKE} clean
-       cd lib && ${MAKE} clean
-       cd ccs_test && ${MAKE} clean
-       cd ccs_tool && ${MAKE} clean
+       ${MAKE} -C daemon clean
+       ${MAKE} -C lib clean
+       ${MAKE} -C ccs_test clean
+       ${MAKE} -C ccs_tool clean
       rm -f *~

distclean: clean
       rm -f make/defines.mk

-install:
-       cd daemon && ${MAKE} install
-       cd lib && ${MAKE} install
-       cd ccs_test && ${MAKE} install
-       cd ccs_tool && ${MAKE} install
-       cd man && ${MAKE} install
+install: all
+       ${MAKE} -C daemon install
+       ${MAKE} -C lib install
+       ${MAKE} -C ccs_test install
+       ${MAKE} -C ccs_tool install
+       ${MAKE} -C man install

uninstall:
-       cd daemon && ${MAKE} uninstall
-       cd lib && ${MAKE} uninstall
-       cd ccs_test && ${MAKE} uninstall
-       cd ccs_tool && ${MAKE} uninstall
-       cd man && ${MAKE} uninstall
+       ${MAKE} -C daemon uninstall
+       ${MAKE} -C lib uninstall
+       ${MAKE} -Cccs_test  uninstall
+       ${MAKE} -C ccs_tool uninstall
+       ${MAKE} -Cman  uninstall
Index: ccs/ccs_test/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/ccs/ccs_test/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- ccs/ccs_test/Makefile       11 Feb 2005 17:38:08 -0000      1.2
+++ ccs/ccs_test/Makefile       9 Aug 2006 14:45:31 -0000
@@ -30,16 +30,13 @@ LOADLIBES+= -lccs

all: ccs_test

-copytobin: all
-       cp ccs_test ${top_srcdir}/bin
-
ccs_test: ccs_test.c ${ccs_libdir}/libccs.a
${CC} ${CFLAGS} ${INCLUDE} ccs_test.c ${LDFLAGS} ${LOADLIBES} ${LDLIBS}-o $@

${ccs_libdir}/libccs.a:
-       cd ${ccs_libdir} && ${MAKE} libccs.a
+       ${MAKE} -C ${ccs_libdir} libccs.a

-install: ccs_test
+install: all
       install -d ${sbindir}
       install ccs_test ${sbindir}

Index: ccs/daemon/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/ccs/daemon/Makefile,v
retrieving revision 1.8
diff -w -u -p -p -u -r1.8 Makefile
--- ccs/daemon/Makefile 20 Apr 2006 18:46:54 -0000      1.8
+++ ccs/daemon/Makefile 9 Aug 2006 14:45:31 -0000
@@ -15,6 +15,7 @@ UNINSTALL = ${top_srcdir}/scripts/uninst

include ${top_srcdir}/make/defines.mk

+TARGET= ccsd
INCLUDE= -I. -I../include -I../common -I${top_srcdir}/config -I../../cman/lib

ifeq ($(DEBUG),y)
@@ -27,21 +28,18 @@ endif

LDFLAGS+= -L${libdir} `xml2-config --libs` -lpthread -ldl

-all: ccsd
-
-copytobin: all
-       cp ccsd ${top_srcdir}/bin
+all: ${TARGET}

ccsd: ccsd.c cnx_mgr.c cluster_mgr.c misc.c ../common/log.c globals.c
       ${CC} ${CFLAGS} ${INCLUDE} -o $@ $^ ${LDFLAGS} \
       ../../cman/lib/libcman.a

-install: ccsd
+install: all
       install -d ${sbindir}
-       install ccsd ${sbindir}
+       install ${TARGET} ${sbindir}

uninstall:
-       ${UNINSTALL} ccsd ${sbindir}
+       ${UNINSTALL} ${TARGET} ${sbindir}

clean:
-       rm -rf *.o ccsd *~
+       rm -rf *.o ${TARGET} *~
Index: ccs/init.d/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/ccs/init.d/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- ccs/init.d/Makefile 17 Dec 2004 20:05:32 -0000      1.1
+++ ccs/init.d/Makefile 9 Aug 2006 14:45:31 -0000
@@ -18,8 +18,7 @@ top_srcdir=..

include ${top_srcdir}/make/defines.mk

-copytobin:
-
+all:
clean:

install:
Index: ccs/lib/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/ccs/lib/Makefile,v
retrieving revision 1.3
diff -w -u -p -p -u -r1.3 Makefile
--- ccs/lib/Makefile    6 Jun 2006 09:42:43 -0000       1.3
+++ ccs/lib/Makefile    9 Aug 2006 14:45:31 -0000
@@ -24,18 +24,16 @@ endif

all: libccs.a

-copytobin: all
-
libccs.a: libccs.o log.o
       ${AR} cr libccs.a libccs.o log.o

-libccs.o: libccs.c
+libccs.o: libccs.c ccs.h
       ${CC} -c ${CFLAGS} ${INCLUDE} $^

log.o: ../common/log.c
       ${CC} -c ${CFLAGS} ${INCLUDE} $^

-install: libccs.a ccs.h
+install: all
       install -d ${libdir}
       install -m644 libccs.a ${libdir}
       install -d ${incdir}
@@ -48,4 +46,3 @@ uninstall:

clean:
       rm -rf *~ *.o libccs.a
-
Index: clumon/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/clumon/Makefile,v
retrieving revision 1.3
diff -w -u -p -p -u -r1.3 Makefile
--- clumon/Makefile     7 Dec 2005 16:16:36 -0000       1.3
+++ clumon/Makefile     9 Aug 2006 14:45:31 -0000
@@ -16,30 +16,30 @@ UNINSTALL=${top_srcdir}/scripts/uninstal
include ${top_srcdir}/make/defines.mk

all:
-       cd src && ${MAKE} all
+       ${MAKE} -C src all

clean:
-       cd src && ${MAKE} clean
+       ${MAKE} -C src clean

distclean: clean
       rm -f make/defines.mk

-install:
-       cd src && ${MAKE} install
-       cd man && ${MAKE} install
-       cd init.d && ${MAKE} install
+install: all
+       ${MAKE} -C src install
+       ${MAKE} -C man install
+       ${MAKE} -C init.d install
       install -d ${DESTDIR}/usr/share/snmp/mibs
       install REDHAT-MIB ${DESTDIR}/usr/share/snmp/mibs/
       install REDHAT-CLUSTER-MIB ${DESTDIR}/usr/share/snmp/mibs/

uninstall:
-       cd src && ${MAKE} uninstall
-       cd man && ${MAKE} uninstall
-       cd init.d && ${MAKE} uninstall
+       ${MAKE} -C src uninstall
+       ${MAKE} -C man uninstall
+       ${MAKE} -C init.d uninstall
       ${UNINSTALL} REDHAT-MIB ${DESTDIR}/usr/share/snmp/mibs/
       ${UNINSTALL} REDHAT-CLUSTER-MIB ${DESTDIR}/usr/share/snmp/mibs/

check:
-       cd src && ${MAKE} check
+       ${MAKE} -C src check

rebuild: clean all
Index: clumon/src/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/clumon/src/Makefile,v
retrieving revision 1.3
diff -w -u -p -p -u -r1.3 Makefile
--- clumon/src/Makefile 23 Nov 2005 23:30:36 -0000      1.3
+++ clumon/src/Makefile 9 Aug 2006 14:45:31 -0000
@@ -12,35 +12,35 @@


all:
-       cd common && ${MAKE} all
-       cd daemon && ${MAKE} all
-       cd snmp-agent && ${MAKE} all
-       cd cim-provider && ${MAKE} all
+       ${MAKE} -C common all
+       ${MAKE} -C daemon all
+       ${MAKE} -C snmp-agent all
+       ${MAKE} -C cim-provider all

clean:
-       cd common && ${MAKE} clean
-       cd daemon && ${MAKE} clean
-       cd snmp-agent && ${MAKE} clean
-       cd cim-provider && ${MAKE} clean
+       ${MAKE} -C common clean
+       ${MAKE} -C daemon clean
+       ${MAKE} -C snmp-agent clean
+       ${MAKE} -C cim-provider clean

check:
-       cd common && ${MAKE} check
-       cd daemon && ${MAKE} check
-       cd snmp-agent && ${MAKE} check
-       cd cim-provider && ${MAKE} check
+       ${MAKE} -C common check
+       ${MAKE} -C daemon check
+       ${MAKE} -C snmp-agent check
+       ${MAKE} -C cim-provider check

distclean: clean

-install:
-       cd common && ${MAKE} install
-       cd daemon && ${MAKE} install
-       cd snmp-agent && ${MAKE} install
-       cd cim-provider && ${MAKE} install
+install: all
+       ${MAKE} -C common install
+       ${MAKE} -C daemon install
+       ${MAKE} -C snmp-agent install
+       ${MAKE} -C cim-provider install

uninstall:
-       cd common && ${MAKE} uninstall
-       cd daemon && ${MAKE} uninstall
-       cd snmp-agent && ${MAKE} uninstall
-       cd cim-provider && ${MAKE} uninstall
+       ${MAKE} -C common uninstall
+       ${MAKE} -C daemon uninstall
+       ${MAKE} -C snmp-agent uninstall
+       ${MAKE} -C cim-provider uninstall

rebuild: clean all
Index: clumon/src/cim-provider/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/clumon/src/cim-provider/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- clumon/src/cim-provider/Makefile    7 Dec 2005 22:55:04 -0000       1.5
+++ clumon/src/cim-provider/Makefile    9 Aug 2006 14:45:31 -0000
@@ -67,7 +67,7 @@ TARGET_TEST = clusterCIM_test

all: ${TARGET} $(TARGET_TEST)

-install:
+install: all
       install -d ${pegasus_providers_dir}
       install ${TARGET} ${pegasus_providers_dir}

Index: clumon/src/daemon/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/clumon/src/daemon/Makefile,v
retrieving revision 1.3
diff -w -u -p -p -u -r1.3 Makefile
--- clumon/src/daemon/Makefile  29 Nov 2005 23:50:02 -0000      1.3
+++ clumon/src/daemon/Makefile  9 Aug 2006 14:45:31 -0000
@@ -29,7 +29,7 @@ OBJECTS = main.o \

all: ${TARGET}

-install:
+install: all
       install -d ${sbindir}
       install ${TARGET} ${sbindir}

Index: clumon/src/snmp-agent/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/clumon/src/snmp-agent/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- clumon/src/snmp-agent/Makefile      29 Nov 2005 19:57:35 -0000      1.4
+++ clumon/src/snmp-agent/Makefile      9 Aug 2006 14:45:31 -0000
@@ -43,7 +43,7 @@ TARGET = libClusterMonitorSnmp.so

all: ${TARGET}

-install:
+install: all
       install -d ${libdir}/clumon-snmp
       install ${TARGET} ${libdir}/clumon-snmp

Index: cman/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cman/Makefile,v
retrieving revision 1.9
diff -w -u -p -p -u -r1.9 Makefile
--- cman/Makefile       19 May 2006 14:41:35 -0000      1.9
+++ cman/Makefile       9 Aug 2006 14:45:31 -0000
@@ -12,38 +12,32 @@
###############################################################################

all:
-       cd lib && ${MAKE} all
-       cd cman_tool && ${MAKE} all
-       cd daemon && ${MAKE} all
-       cd qdisk && ${MAKE} all
-
-copytobin:
-       cd lib && ${MAKE} copytobin
-       cd cman_tool && ${MAKE} copytobin
-       cd daemon && ${MAKE} copytobin
-       cd qdisk && ${MAKE} copytobin
+       ${MAKE} -C lib all
+       ${MAKE} -C cman_tool all
+       ${MAKE} -C daemon all
+       ${MAKE} -C qdisk all

clean:
-       cd bin && ${MAKE} clean
-       cd lib && ${MAKE} clean
-       cd cman_tool && ${MAKE} clean
-       cd daemon && ${MAKE} clean
-       cd qdisk && ${MAKE} clean
+       ${MAKE} -C lib clean
+       ${MAKE} -C cman_tool clean
+       ${MAKE} -C daemon clean
+       ${MAKE} -C qdisk clean

distclean: clean
       rm -f make/defines.mk

-install:
-       cd lib && ${MAKE} install
-       cd cman_tool && ${MAKE} install
-       cd man && ${MAKE} install
-       cd daemon && ${MAKE} install
-       cd qdisk && ${MAKE} install
-       cd init.d && ${MAKE} install
+install: all
+       ${MAKE} -C lib install
+       ${MAKE} -C cman_tool install
+       ${MAKE} -C daemon install
+       ${MAKE} -C qdisk install
+       ${MAKE} -C init.d install
+       ${MAKE} -C man install

uninstall:
-       cd cman_tool && ${MAKE} uninstall
-       cd man && ${MAKE} uninstall
-       cd lib && ${MAKE} uninstall
-       cd qdisk && ${MAKE} uninstall
-       cd init.d && ${MAKE} uninstall
+       ${MAKE} -C lib uninstall
+       ${MAKE} -C cman_tool uninstall
+       ${MAKE} -C daemon uninstall
+       ${MAKE} -C qdisk uninstall
+       ${MAKE} -C init.d uninstall
+       ${MAKE} -C man uninstall
Index: cman/configure
===================================================================
RCS file: /cvs/cluster/cluster/cman/configure,v
retrieving revision 1.8
diff -w -u -p -p -u -r1.8 configure
--- cman/configure      7 Jul 2006 06:58:20 -0000       1.8
+++ cman/configure      9 Aug 2006 14:45:31 -0000
@@ -14,6 +14,7 @@
###############################################################################

use Getopt::Long;
+use POSIX;

print "\nConfiguring Makefiles for your system...\n";

@@ -88,8 +89,14 @@ if (!$ccsincdir) {
  $ccsincdir="${incdir}/cluster";
}
if (!$libdir) {
+  my $arch = (POSIX::uname())[4];
+  if ($arch eq "x86_64") {
+       $libdir="${prefix}/usr/lib64";
+  }
+  else {
  $libdir="${prefix}/usr/lib";
}
+}
if (!$libexecdir) {
  $libexecdir="${prefix}/usr/libexec";
}
Index: cman/cman_tool/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cman/cman_tool/Makefile,v
retrieving revision 1.17
diff -w -u -p -p -u -r1.17 Makefile
--- cman/cman_tool/Makefile     3 Jul 2006 12:13:55 -0000       1.17
+++ cman/cman_tool/Makefile     9 Aug 2006 14:45:31 -0000
@@ -28,9 +28,6 @@ TARGET=cman_tool

all: ${TARGET}

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
-
cman_tool: main.o join.o ../lib/libcman.a
       $(CC) $(LDFLAGS) -L$(ccslibdir) -o $@ $^ -L../lib -lccs

@@ -40,7 +37,7 @@ main.o: main.c cman_tool.h
join.o: join.c cman_tool.h
       $(CC) $(CFLAGS) -c -o $@ $< -DSBINDIR=\"${sbindir}\"

-install: cman_tool
+install: all
       install -d ${sbindir}
       install cman_tool ${sbindir}

Index: cman/daemon/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cman/daemon/Makefile,v
retrieving revision 1.46
diff -w -u -p -p -u -r1.46 Makefile
--- cman/daemon/Makefile        7 Jul 2006 07:53:14 -0000       1.46
+++ cman/daemon/Makefile        9 Aug 2006 14:45:31 -0000
@@ -29,9 +29,6 @@ CMAN_OBJS=daemon.o config.o logging.o ai

all:  ${TARGET}

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
-
service_cman.lcrso: ${CMAN_OBJS}
$(CC) $(CFLAGS) -shared -Wl,-soname,service_cman.lcrso -o $@ ${CMAN_OBJS} -L../lib -L${ccslibdir} -lccs

@@ -60,7 +57,7 @@ commands.o: commands.c list.h cnxman-soc
logging.o: logging.c list.h cnxman-socket.h cnxman-private.h
       $(CC) $(CFLAGS) -c -o $@ $<

-install:
+install: all
       install -d ${libexecdir}/lcrso
       install -s service_cman.lcrso ${libexecdir}/lcrso

Index: cman/daemon/ais.c
===================================================================
RCS file: /cvs/cluster/cluster/cman/daemon/ais.c,v
retrieving revision 1.34
diff -w -u -p -p -u -r1.34 ais.c
--- cman/daemon/ais.c   2 Aug 2006 11:54:36 -0000       1.34
+++ cman/daemon/ais.c   9 Aug 2006 14:45:31 -0000
@@ -24,6 +24,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#include <signal.h>

/* openais headers */
#include <openais/totem/totemip.h>
Index: cman/init.d/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cman/init.d/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- cman/init.d/Makefile        19 May 2006 14:41:35 -0000      1.2
+++ cman/init.d/Makefile        9 Aug 2006 14:45:31 -0000
@@ -18,7 +18,7 @@ top_srcdir=..

include ${top_srcdir}/make/defines.mk

-copytobin:
+all:

clean:

Index: cman/lib/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cman/lib/Makefile,v
retrieving revision 1.6
diff -w -u -p -p -u -r1.6 Makefile
--- cman/lib/Makefile   15 Sep 2005 13:26:24 -0000      1.6
+++ cman/lib/Makefile   9 Aug 2006 14:45:31 -0000
@@ -37,9 +37,6 @@ $(LIBNAME).so.${RELEASE_MAJOR}.${RELEASE
libcman.o: libcman.c
       $(CC) $(CFLAGS) -c -o $@ $< -I../daemon

-copytobin: all
-
-
install: all
       install -d ${incdir}
       install libcman.h ${incdir}
Index: cman/qdisk/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cman/qdisk/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- cman/qdisk/Makefile 23 Jun 2006 21:32:45 -0000      1.5
+++ cman/qdisk/Makefile 9 Aug 2006 14:45:31 -0000
@@ -23,10 +23,7 @@ TARGET=qdiskd mkqdisk

all: ${TARGET}

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
-
-install: ${TARGET}
+install: all
       install -d ${sbindir}
       install ${TARGET} ${sbindir}

Index: cman/tests/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cman/tests/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- cman/tests/Makefile 11 May 2006 10:35:25 -0000      1.4
+++ cman/tests/Makefile 9 Aug 2006 14:45:31 -0000
@@ -16,6 +16,8 @@ all: ${TARGET}
.c:
       $(CC) $(CFLAGS) $(OUTPUT_OPTION) $< $(LDFLAGS)

+install: all
+
clean:
       rm -f *.o ${TARGET}

Index: cmirror/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cmirror/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- cmirror/Makefile    17 Nov 2004 04:07:56 -0000      1.1
+++ cmirror/Makefile    9 Aug 2006 14:45:31 -0000
@@ -1,14 +1,14 @@
all:
-       cd src && ${MAKE} all
+       ${MAKE} -C src all

clean:
-       cd src && ${MAKE} clean
+       ${MAKE} -C src clean

-install:
-       cd src && ${MAKE} install
+install: all
+       ${MAKE} -C src install

uninstall:
-       cd src && ${MAKE} uninstall
+       ${MAKE} -C src uninstall

distclean: clean
       rm -f make/defines.mk
Index: csnap/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/csnap/Makefile,v
retrieving revision 1.14
diff -w -u -p -p -u -r1.14 Makefile
--- csnap/Makefile      8 Mar 2006 18:13:37 -0000       1.14
+++ csnap/Makefile      9 Aug 2006 14:45:32 -0000
@@ -1,15 +1,15 @@
all:
-       cd src && ${MAKE} copytobin
+       ${MAKE} -C src all

clean:
-       cd src && ${MAKE} clean
-       cd tests && ${MAKE} clean
+       ${MAKE} -C src clean
+       ${MAKE} -C tests clean

-install:
-       cd bin && ${MAKE} install
+install: all
+       ${MAKE} -C src install

uninstall:
-       cd bin && ${MAKE} uninstall
+       ${MAKE} -C src uninstall

distclean: clean
       rm -f make/defines.mk
Index: csnap/src/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/csnap/src/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- csnap/src/Makefile  8 Mar 2006 18:13:38 -0000       1.1
+++ csnap/src/Makefile  9 Aug 2006 14:45:32 -0000
@@ -34,8 +34,12 @@ csnap-create csnap-delete: create.c $(de
       cc -Wall create.c -DCREATE -o csnap-create -lpopt
       cc -Wall create.c -DDELETE -o csnap-delete -lpopt

-copytobin: all
-       cp $(binaries) $(top_srcdir)/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       strip ${TARGET}
+       install -m755 ${binaries} ${sbindir}

clean:
       rm -f $(binaries) *.o a.out
Index: csnap-kernel/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/csnap-kernel/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- csnap-kernel/Makefile       7 Mar 2006 23:21:12 -0000       1.1
+++ csnap-kernel/Makefile       9 Aug 2006 14:45:32 -0000
@@ -1,14 +1,14 @@
all:
-       cd src && ${MAKE} all
+       ${MAKE} -C src all

clean:
-       cd src && ${MAKE} clean
+       ${MAKE} -C src clean

-install:
-       cd src && ${MAKE} install
+install: all
+       ${MAKE} -C src install

uninstall:
-       cd src && ${MAKE} uninstall
+       ${MAKE} -C src uninstall

distclean: clean
       rm -f make/defines.mk
\ No newline at end of file
Index: csnap-kernel/src/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/csnap-kernel/src/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
Index: ddraid/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/ddraid/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- ddraid/Makefile     14 Jun 2005 04:52:55 -0000      1.1
+++ ddraid/Makefile     9 Aug 2006 14:45:32 -0000
@@ -41,7 +41,7 @@ devspam: devspam.c trace.h
clean:
       rm -f $(binaries) *.o a.out

-install:
+install: all
       cp $(binaries) /usr/bin

kernel:
Index: dlm/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/dlm/Makefile,v
retrieving revision 1.6
diff -w -u -p -p -u -r1.6 Makefile
--- dlm/Makefile        12 Jun 2006 16:53:27 -0000      1.6
+++ dlm/Makefile        9 Aug 2006 14:45:32 -0000
@@ -12,21 +12,17 @@
###############################################################################

all:
-       cd lib && ${MAKE} all
+       ${MAKE} -C lib all

-copytobin:
-       cd lib && ${MAKE} copytobin
-
-install:
-       cd lib && ${MAKE} install
+install: all
+       ${MAKE} -C lib install

uninstall:
-       cd lib && ${MAKE} uninstall
+       ${MAKE} -C lib uninstall

clean:
-       cd lib && ${MAKE} clean
+       ${MAKE} -C lib clean
       rm -f *~

distclean: clean
       rm -f make/defines.mk
-
Index: dlm/lib/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/dlm/lib/Makefile,v
retrieving revision 1.15
diff -w -u -p -p -u -r1.15 Makefile
--- dlm/lib/Makefile    10 Jul 2006 18:25:15 -0000      1.15
+++ dlm/lib/Makefile    9 Aug 2006 14:45:32 -0000
@@ -54,9 +54,6 @@ $(LIBNAME)_lt.so.${RELEASE_MAJOR}.${RELE
%.po: %.c
       $(CC) $(CFLAGS) -fPIC -D_REENTRANT -c -o $@ $<

-copytobin: all
-
-
install: all
       install -d ${incdir}
       install -m644 libdlm.h ${incdir}
Index: dlm/tests/usertest/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/dlm/tests/usertest/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- dlm/tests/usertest/Makefile 11 May 2006 12:29:11 -0000      1.4
+++ dlm/tests/usertest/Makefile 9 Aug 2006 14:45:32 -0000
@@ -43,6 +43,3 @@ lvb: lvb.c

clean:
       rm -f *.o $(BINARIES) *~ core
-
-copytobin:
-
Index: doc/usage.txt
===================================================================
RCS file: /cvs/cluster/cluster/doc/usage.txt,v
retrieving revision 1.32
diff -w -u -p -p -u -r1.32 usage.txt
--- doc/usage.txt       31 Jul 2006 22:35:32 -0000      1.32
+++ doc/usage.txt       9 Aug 2006 14:45:33 -0000
@@ -23,8 +23,10 @@ Compile kernel with GFS2, DLM, configfs,

Build and install the latest openais development tarball from
  http://developer.osdl.org/dev/openais/
-  useradd -u 39 ais
-  cd branches/whitetank
+or install subversion and type:
+  svn checkout http://svn.osdl.org/openais
+Then:
+  cd /path/to/openais/branches/whitetank
  make; make install DESTDIR=/

Build and install the latest libvolume_id from the udev tarball
Index: fence/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/Makefile,v
retrieving revision 1.6
diff -w -u -p -p -u -r1.6 Makefile
--- fence/Makefile      29 Jun 2006 18:58:31 -0000      1.6
+++ fence/Makefile      9 Aug 2006 14:45:33 -0000
@@ -10,28 +10,34 @@
##
###############################################################################
###############################################################################
-all: copytobin
-
-copytobin:
-       cd agents && ${MAKE} copytobin
-       cd fence_node && ${MAKE} copytobin
-       cd fence_tool && ${MAKE} copytobin
-       cd fenced && ${MAKE} copytobin
+all:
+       ${MAKE} -C agents all
+       ${MAKE} -C fence_node all
+       ${MAKE} -C fence_tool all
+       ${MAKE} -C fenced all

clean:
-       cd agents && ${MAKE} clean
-       cd bin && ${MAKE} clean
-       cd fence_node && ${MAKE} clean
-       cd fence_tool && ${MAKE} clean
-       cd fenced && ${MAKE} clean
+       ${MAKE} -C agents clean
+       ${MAKE} -C fence_node clean
+       ${MAKE} -C fence_tool clean
+       ${MAKE} -C fenced clean

distclean: clean
       rm -f make/defines.mk

-install:
-       cd bin && ${MAKE} install
-       cd man && ${MAKE} install
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       ${MAKE} -C agents install
+       ${MAKE} -C fence_node install
+       ${MAKE} -C fence_tool install
+       ${MAKE} -C fenced install
+       ${MAKE} -C man install

uninstall:
-       cd bin && ${MAKE} uninstall
-       cd man && ${MAKE} uninstall
+       ${MAKE} -C agents uninstall
+       ${MAKE} -C fence_node uninstall
+       ${MAKE} -C fence_tool uninstall
+       ${MAKE} -C fenced uninstall
+       ${MAKE} -C man uninstall
Index: fence/agents/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/Makefile,v
retrieving revision 1.12
diff -w -u -p -p -u -r1.12 Makefile
--- fence/agents/Makefile       20 Jul 2006 15:06:17 -0000      1.12
+++ fence/agents/Makefile       9 Aug 2006 14:45:33 -0000
@@ -13,74 +13,73 @@


all:
-       cd apc && ${MAKE} all
-       cd bladecenter && ${MAKE} all
-       cd brocade && ${MAKE} all
-       cd bullpap && ${MAKE} all
-       # cd cpint && ${MAKE} all
-       cd drac && ${MAKE} all
-       cd egenera && ${MAKE} all
-       # cd ibmblade && ${MAKE} all
-       cd ilo && ${MAKE} all
-       cd ipmilan && ${MAKE} all
-       cd manual && ${MAKE} all
-       cd mcdata && ${MAKE} all
-       # cd rackswitch && ${MAKE} all
-       cd rps10 && ${MAKE} all
-       cd rsa && ${MAKE} all
-       cd rsb && ${MAKE} all
-       cd scsi && ${MAKE} all
-       cd sanbox2 && ${MAKE} all
-       cd vixel && ${MAKE} all
-       cd wti && ${MAKE} all
-       # cd xcat && ${MAKE} all
-       # cd zvm && ${MAKE} all
+       ${MAKE} -C apc all
+       ${MAKE} -C bladecenter all
+       ${MAKE} -C brocade all
+       ${MAKE} -C bullpap all
+       # ${MAKE} -C cpint all
+       ${MAKE} -C drac all
+       ${MAKE} -C egenera all
+       # ${MAKE} -C ibmblade all
+       ${MAKE} -C ilo all
+       ${MAKE} -C ipmilan all
+       ${MAKE} -C manual all
+       ${MAKE} -C mcdata all
+       # ${MAKE} -C rackswitch all
+       ${MAKE} -C rps10 all
+       ${MAKE} -C rsa all
+       ${MAKE} -C rsb all
+       ${MAKE} -C scsi all
+       ${MAKE} -C sanbox2 all
+       ${MAKE} -C vixel all
+       ${MAKE} -C wti all
+       # ${MAKE} -C xcat all
+       # ${MAKE} -C zvm all

-copytobin:
-       cd apc && ${MAKE} copytobin
-       cd bladecenter && ${MAKE} copytobin
-       cd brocade && ${MAKE} copytobin
-       cd bullpap && ${MAKE} copytobin
-       # cd cpint && ${MAKE} copytobin
-       cd drac && ${MAKE} copytobin
-       cd egenera && ${MAKE} copytobin
-       # cd ibmblade && ${MAKE} copytobin
-       cd ilo && ${MAKE} copytobin
-       cd ipmilan && ${MAKE} copytobin
-       cd manual && ${MAKE} copytobin
-       cd mcdata && ${MAKE} copytobin
-       # cd rackswitch && ${MAKE} copytobin
-       cd rps10 && ${MAKE} copytobin
-       cd rsa && ${MAKE} copytobin
-       cd rsb && ${MAKE} copytobin
-       cd scsi && ${MAKE} copytobin
-       cd sanbox2 && ${MAKE} copytobin
-       cd vixel && ${MAKE} copytobin
-       cd wti && ${MAKE} copytobin
-       # cd xcat && ${MAKE} copytobin
-       # cd zvm && ${MAKE} copytobin
+install: all
+       ${MAKE} -C apc install
+       ${MAKE} -C bladecenter install
+       ${MAKE} -C brocade install
+       ${MAKE} -C bullpap install
+       # ${MAKE} -C cpint install
+       ${MAKE} -C drac install
+       ${MAKE} -C egenera install
+       # ${MAKE} -C ibmblade install
+       ${MAKE} -C ilo install
+       ${MAKE} -C ipmilan install
+       ${MAKE} -C manual install
+       ${MAKE} -C mcdata install
+       # ${MAKE} -C rackswitch install
+       ${MAKE} -C rps10 install
+       ${MAKE} -C rsa install
+       ${MAKE} -C rsb install
+       ${MAKE} -C scsi install
+       ${MAKE} -C sanbox2 install
+       ${MAKE} -C vixel install
+       ${MAKE} -C wti install
+       # ${MAKE} -C xcat install
+       # ${MAKE} -C zvm install

clean:
-       cd apc && ${MAKE} clean
-       cd bladecenter && ${MAKE} clean
-       cd brocade && ${MAKE} clean
-       cd bullpap && ${MAKE} clean
-       #cd cpint && ${MAKE} clean
-       cd drac && ${MAKE} clean
-       cd egenera && ${MAKE} clean
-       # cd ibmblade && ${MAKE} clean
-       cd ilo && ${MAKE} clean
-       cd ipmilan && ${MAKE} clean
-       cd manual && ${MAKE} clean
-       cd mcdata && ${MAKE} clean
-       # cd rackswitch && ${MAKE} clean
-       cd rps10 && ${MAKE} clean
-       cd rsa && ${MAKE} clean
-       cd rsb && ${MAKE} clean
-       cd scsi && ${MAKE} clean
-       cd sanbox2 && ${MAKE} clean
-       cd vixel && ${MAKE} clean
-       cd wti && ${MAKE} clean
-       # cd xcat && ${MAKE} clean
-       # cd zvm && ${MAKE} clean
-
+       ${MAKE} -C apc clean
+       ${MAKE} -C bladecenter clean
+       ${MAKE} -C brocade clean
+       ${MAKE} -C bullpap clean
+       # ${MAKE} -C cpint clean
+       ${MAKE} -C drac clean
+       ${MAKE} -C egenera clean
+       # ${MAKE} -C ibmblade clean
+       ${MAKE} -C ilo clean
+       ${MAKE} -C ipmilan clean
+       ${MAKE} -C manual clean
+       ${MAKE} -C mcdata clean
+       # ${MAKE} -C rackswitch clean
+       ${MAKE} -C rps10 clean
+       ${MAKE} -C rsa clean
+       ${MAKE} -C rsb clean
+       ${MAKE} -C scsi clean
+       ${MAKE} -C sanbox2 clean
+       ${MAKE} -C vixel clean
+       ${MAKE} -C wti clean
+       # ${MAKE} -C xcat clean
+       # ${MAKE} -C zvm clean
Index: fence/agents/apc/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/apc/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/apc/Makefile   24 Jun 2004 08:53:12 -0000      1.1
+++ fence/agents/apc/Makefile   9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ fence_apc: fence_apc.pl
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/baytech/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/baytech/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/baytech/Makefile       24 Jun 2004 08:53:13 -0000      1.1
+++ fence/agents/baytech/Makefile       9 Aug 2006 14:45:33 -0000
@@ -29,8 +29,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/bladecenter/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/bladecenter/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- fence/agents/bladecenter/Makefile   11 Jan 2005 22:38:47 -0000      1.2
+++ fence/agents/bladecenter/Makefile   9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ fence_bladecenter: fence_bladecenter.pl
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/brocade/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/brocade/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/brocade/Makefile       24 Jun 2004 08:53:13 -0000      1.1
+++ fence/agents/brocade/Makefile       9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/bullpap/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/bullpap/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- fence/agents/bullpap/Makefile       1 Mar 2005 14:51:45 -0000       1.2
+++ fence/agents/bullpap/Makefile       9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/cpint/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/cpint/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/cpint/Makefile 24 Jun 2004 08:53:13 -0000      1.1
+++ fence/agents/cpint/Makefile 9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/drac/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/drac/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/drac/Makefile  28 Jun 2005 15:09:07 -0000      1.1
+++ fence/agents/drac/Makefile  9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ fence_drac: fence_drac.pl
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/egenera/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/egenera/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/egenera/Makefile       24 Jun 2004 08:53:13 -0000      1.1
+++ fence/agents/egenera/Makefile       9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ fence_egenera: fence_egenera.pl
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/ibmblade/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/ibmblade/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/ibmblade/Makefile      24 Aug 2004 16:05:36 -0000      1.1
+++ fence/agents/ibmblade/Makefile      9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/ilo/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/ilo/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/ilo/Makefile   13 Sep 2004 17:04:45 -0000      1.1
+++ fence/agents/ilo/Makefile   9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ fence_ilo: $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/ipmilan/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/ipmilan/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- fence/agents/ipmilan/Makefile       1 Mar 2005 14:51:45 -0000       1.2
+++ fence/agents/ipmilan/Makefile       9 Aug 2006 14:45:33 -0000
@@ -30,8 +30,11 @@ all: ${TARGET}
fence_ipmilan: ${fence_ipmilan_SOURCE:.c=.o}
       ${CC} ${CFLAGS} ${LDFLAGS} ${fence_ipmilan_SOURCE:.c=.o} -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: fence/agents/manual/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/manual/Makefile,v
retrieving revision 1.6
diff -w -u -p -p -u -r1.6 Makefile
--- fence/agents/manual/Makefile        20 Jun 2006 18:23:25 -0000      1.6
+++ fence/agents/manual/Makefile        9 Aug 2006 14:45:33 -0000
@@ -39,8 +39,11 @@ fence_ack_manual: ack.o
ack.o: ack.c
       $(CC) $(CFLAGS) -c -o $@ $<

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: fence/agents/mcdata/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/mcdata/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/mcdata/Makefile        24 Jun 2004 08:53:14 -0000      1.1
+++ fence/agents/mcdata/Makefile        9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/rackswitch/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/rackswitch/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/rackswitch/Makefile    24 Jun 2004 08:53:14 -0000      1.1
+++ fence/agents/rackswitch/Makefile    9 Aug 2006 14:45:33 -0000
@@ -31,9 +31,11 @@ all: ${TARGET}
fence_rackswitch: ${SOURCE:.c=.o}
${CC} ${CFLAGS} ${LDFLAGS} ${SOURCE:.c=.o} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
-
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET} *~
Index: fence/agents/rps10/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/rps10/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/rps10/Makefile 16 Nov 2004 18:43:48 -0000      1.1
+++ fence/agents/rps10/Makefile 9 Aug 2006 14:45:33 -0000
@@ -30,8 +30,11 @@ all: ${TARGET}
fence_rps10: ${fence_rps10_SOURCE:.c=.o}
       ${CC} ${CFLAGS} ${LDFLAGS} ${fence_rps10_SOURCE:.c=.o} -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: fence/agents/rsa/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/rsa/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- fence/agents/rsa/Makefile   6 Feb 2006 16:34:26 -0000       1.2
+++ fence/agents/rsa/Makefile   9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ fence_rsa: fence_rsa.py
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/rsb/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/rsb/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/rsb/Makefile   19 Apr 2006 19:39:01 -0000      1.1
+++ fence/agents/rsb/Makefile   9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ fence_rsb: fence_rsb.py
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/sanbox2/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/sanbox2/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/sanbox2/Makefile       24 Aug 2004 16:05:37 -0000      1.1
+++ fence/agents/sanbox2/Makefile       9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/scsi/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/scsi/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/scsi/Makefile  29 Jun 2006 21:36:09 -0000      1.1
+++ fence/agents/scsi/Makefile  9 Aug 2006 14:45:33 -0000
@@ -27,8 +27,11 @@ fence_scsi: fence_scsi.pl
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/vixel/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/vixel/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/vixel/Makefile 24 Jun 2004 08:53:15 -0000      1.1
+++ fence/agents/vixel/Makefile 9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/vmware/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/vmware/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/vmware/Makefile        1 Sep 2005 18:25:41 -0000       1.1
+++ fence/agents/vmware/Makefile        9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/wti/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/wti/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/wti/Makefile   24 Jun 2004 08:53:15 -0000      1.1
+++ fence/agents/wti/Makefile   9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/xcat/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/xcat/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/xcat/Makefile  24 Jun 2004 08:53:15 -0000      1.1
+++ fence/agents/xcat/Makefile  9 Aug 2006 14:45:33 -0000
@@ -23,8 +23,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/xen/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/xen/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/xen/Makefile   10 Jun 2005 14:12:45 -0000      1.1
+++ fence/agents/xen/Makefile   9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/agents/zvm/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/agents/zvm/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/agents/zvm/Makefile   24 Jun 2004 08:53:17 -0000      1.1
+++ fence/agents/zvm/Makefile   9 Aug 2006 14:45:33 -0000
@@ -28,8 +28,11 @@ $(TARGET): $(SOURCE)
awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(SOURCE) >> $(TARGET)
       chmod +x $(TARGET)

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin/${TARGET}
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f $(TARGET)
Index: fence/fence_node/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/fence_node/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- fence/fence_node/Makefile   25 Apr 2006 13:51:54 -0000      1.4
+++ fence/fence_node/Makefile   9 Aug 2006 14:45:33 -0000
@@ -40,9 +40,12 @@ fence_node: ${FENCE_NODE_SRC:.c=.o}
agent.c:
       ln -s ${top_srcdir}/fenced/agent.c .

-copytobin: all
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
       strip ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -rf *~ *.o ${TARGET} agent.c
Index: fence/fence_tool/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/fence_tool/Makefile,v
retrieving revision 1.9
diff -w -u -p -p -u -r1.9 Makefile
--- fence/fence_tool/Makefile   11 May 2006 20:46:09 -0000      1.9
+++ fence/fence_tool/Makefile   9 Aug 2006 14:45:34 -0000
@@ -40,9 +40,12 @@ fence_tool: ${FENCE_TOOL_SRC:.c=.o}
agent.c:
       ln -s ${top_srcdir}/fenced/agent.c .

-copytobin: all
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
       strip ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -rf *~ *.o ${TARGET} agent.c
Index: fence/fenced/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/fenced/Makefile,v
retrieving revision 1.6
diff -w -u -p -p -u -r1.6 Makefile
--- fence/fenced/Makefile       7 Jul 2006 16:14:33 -0000       1.6
+++ fence/fenced/Makefile       9 Aug 2006 14:45:34 -0000
@@ -54,9 +54,12 @@ member_cman.o: member_cman.c fd.h
agent.o: agent.c fd.h
       $(CC) $(CFLAGS) -c -o $@ $<

-copytobin: all
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
       strip ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -rf *~ *.o ${TARGET}
Index: fence/init.d/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/fence/init.d/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- fence/init.d/Makefile       17 Dec 2004 20:09:55 -0000      1.1
+++ fence/init.d/Makefile       9 Aug 2006 14:45:34 -0000
@@ -18,8 +18,6 @@ top_srcdir=..

include ${top_srcdir}/make/defines.mk

-copytobin:
-
clean:

install:
Index: gfs/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/Makefile,v
retrieving revision 1.8
diff -w -u -p -p -u -r1.8 Makefile
--- gfs/Makefile        14 Jul 2006 18:04:01 -0000      1.8
+++ gfs/Makefile        9 Aug 2006 14:45:34 -0000
@@ -12,48 +12,52 @@
###############################################################################

all:
-       cd libgfs && ${MAKE} all
-       cd gfs_debug && ${MAKE} all
-       cd gfs_edit && ${MAKE} all
-       cd gfs_fsck && ${MAKE} all
-       cd gfs_grow && ${MAKE} all
-       cd gfs_jadd && ${MAKE} all
-       cd gfs_mkfs && ${MAKE} all
-       cd gfs_quota && ${MAKE} all
-       cd gfs_tool && ${MAKE} all
-
-copytobin:
-       cd gfs_debug && ${MAKE} copytobin
-       cd gfs_edit && ${MAKE} copytobin
-       cd gfs_fsck && ${MAKE} copytobin
-       cd gfs_grow && ${MAKE} copytobin
-       cd gfs_jadd && ${MAKE} copytobin
-       cd gfs_mkfs && ${MAKE} copytobin
-       cd gfs_quota && ${MAKE} copytobin
-       cd gfs_tool && ${MAKE} copytobin
+       ${MAKE} -C libgfs all
+       ${MAKE} -C gfs_debug all
+       ${MAKE} -C gfs_edit all
+       ${MAKE} -C gfs_fsck all
+       ${MAKE} -C gfs_grow all
+       ${MAKE} -C gfs_jadd all
+       ${MAKE} -C gfs_mkfs all
+       ${MAKE} -C gfs_quota all
+       ${MAKE} -C gfs_tool all

clean:
-       cd bin && ${MAKE} clean
-       cd libgfs && ${MAKE} clean
-       cd gfs_debug && ${MAKE} clean
-       cd gfs_edit && ${MAKE} clean
-       cd gfs_fsck && ${MAKE} clean
-       cd gfs_grow && ${MAKE} clean
-       cd gfs_jadd && ${MAKE} clean
-       cd gfs_mkfs && ${MAKE} clean
-       cd gfs_quota && ${MAKE} clean
-       cd gfs_tool && ${MAKE} clean
+       ${MAKE} -C libgfs clean
+       ${MAKE} -C gfs_debug clean
+       ${MAKE} -C gfs_edit clean
+       ${MAKE} -C gfs_fsck clean
+       ${MAKE} -C gfs_grow clean
+       ${MAKE} -C gfs_jadd clean
+       ${MAKE} -C gfs_mkfs clean
+       ${MAKE} -C gfs_quota clean
+       ${MAKE} -C gfs_tool clean

distclean: clean
       rm -f make/defines.mk

-install:
-       cd bin && ${MAKE} install
-       cd man && ${MAKE} install
-       cd init.d && ${MAKE} install
+install: all
+       ${MAKE} -C libgfs install
+       ${MAKE} -C gfs_debug install
+       ${MAKE} -C gfs_edit install
+       ${MAKE} -C gfs_fsck install
+       ${MAKE} -C gfs_grow install
+       ${MAKE} -C gfs_jadd install
+       ${MAKE} -C gfs_mkfs install
+       ${MAKE} -C gfs_quota install
+       ${MAKE} -C gfs_tool install
+       ${MAKE} -C man install
+       ${MAKE} -C init.d install

deinstall uninstall:
-       cd bin && ${MAKE} uninstall
-       cd man && ${MAKE} uninstall
-       cd init.d && ${MAKE} uninstall
-
+       ${MAKE} -C libgfs uninstall
+       ${MAKE} -C gfs_debug uninstall
+       ${MAKE} -C gfs_edit uninstall
+       ${MAKE} -C gfs_fsck uninstall
+       ${MAKE} -C gfs_grow uninstall
+       ${MAKE} -C gfs_jadd uninstall
+       ${MAKE} -C gfs_mkfs uninstall
+       ${MAKE} -C gfs_quota uninstall
+       ${MAKE} -C gfs_tool uninstall
+       ${MAKE} -C man uninstall
+       ${MAKE} -C init.d uninstall
Index: gfs/gfs_debug/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/gfs_debug/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- gfs/gfs_debug/Makefile      11 Jul 2006 20:32:42 -0000      1.4
+++ gfs/gfs_debug/Makefile      9 Aug 2006 14:45:34 -0000
@@ -47,8 +47,11 @@ all: ${TARGET}
gfs_debug: ${SOURCE}
${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gfs/gfs_edit/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/gfs_edit/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- gfs/gfs_edit/Makefile       10 Jul 2006 23:30:56 -0000      1.5
+++ gfs/gfs_edit/Makefile       9 Aug 2006 14:45:34 -0000
@@ -35,13 +35,16 @@ else
INCLUDE += -I${gfskincdir}
endif

-all: gfs_edit
+all: ${TARGET}

gfs_edit: ${SOURCE}
${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -lncurses -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gfs/gfs_fsck/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/gfs_fsck/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- gfs/gfs_fsck/Makefile       19 Jul 2006 14:11:53 -0000      1.5
+++ gfs/gfs_fsck/Makefile       9 Aug 2006 14:45:34 -0000
@@ -14,6 +14,8 @@ top_srcdir= ..

include ${top_srcdir}/make/defines.mk

+TARGET= gfs_fsck
+
INCLUDE= -I${top_srcdir}/include -I${top_srcdir}/config

.PHONY: all clean
@@ -27,7 +29,7 @@ sources = main.c initialize.c pass1.c pa

CFLAGS+=-D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM -DGFS_RELEASE_NAME=\"${RELEASE}\" -Wall -g

-all: gfs_fsck
+all: ${TARGET}

gfs_fsck: $(sources:.c=.o)
       $(CC) $(CFLAGS) $^ -o $@
@@ -44,8 +46,12 @@ test_bitmap: bitmap.o test_bitmap.o log.
clean:
       @rm -f *.o *~ *.d gfs_fsck

-copytobin: gfs_fsck
-       cp gfs_fsck ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}
+       (cd ${sbindir}; ln -f gfs_fsck fsck.gfs)

distclean: clean
@rm -f cscope.* test_inode_list *.orig *.rej test_block_list test_bitmap
Index: gfs/gfs_grow/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/gfs_grow/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- gfs/gfs_grow/Makefile       10 Jul 2006 23:34:18 -0000      1.5
+++ gfs/gfs_grow/Makefile       9 Aug 2006 14:45:34 -0000
@@ -42,8 +42,11 @@ all: ${TARGET}
gfs_grow:
${CC} ${CFLAGS} ${INCLUDE} main.c ondisk.c ${LDFLAGS} ${LOADLIBS} -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gfs/gfs_jadd/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/gfs_jadd/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- gfs/gfs_jadd/Makefile       10 Jul 2006 23:35:48 -0000      1.5
+++ gfs/gfs_jadd/Makefile       9 Aug 2006 14:45:34 -0000
@@ -43,8 +43,11 @@ all: ${TARGET}
gfs_jadd:
${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gfs/gfs_mkfs/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/gfs_mkfs/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- gfs/gfs_mkfs/Makefile       10 Jul 2006 23:39:35 -0000      1.5
+++ gfs/gfs_mkfs/Makefile       9 Aug 2006 14:45:34 -0000
@@ -47,8 +47,12 @@ all: ${TARGET}
gfs_mkfs: ${SOURCE}
${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@ -lgfs -lvolume_id

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}
+       (cd ${sbindir}; ln -f gfs_mkfs mkfs.gfs)

clean:
       rm -f *.o ${TARGET}
Index: gfs/gfs_quota/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/gfs_quota/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- gfs/gfs_quota/Makefile      19 May 2005 19:51:08 -0000      1.4
+++ gfs/gfs_quota/Makefile      9 Aug 2006 14:45:34 -0000
@@ -41,8 +41,11 @@ all: ${TARGET}
gfs_quota: ${SOURCE}
${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gfs/gfs_tool/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/gfs_tool/Makefile,v
retrieving revision 1.8
diff -w -u -p -p -u -r1.8 Makefile
--- gfs/gfs_tool/Makefile       19 May 2005 19:51:09 -0000      1.8
+++ gfs/gfs_tool/Makefile       9 Aug 2006 14:45:34 -0000
@@ -45,8 +45,11 @@ all: ${TARGET}
gfs_tool: ${SOURCE}
${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gfs/init.d/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/init.d/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- gfs/init.d/Makefile 17 Dec 2004 20:11:56 -0000      1.1
+++ gfs/init.d/Makefile 9 Aug 2006 14:45:34 -0000
@@ -18,8 +18,6 @@ top_srcdir=..

include ${top_srcdir}/make/defines.mk

-copytobin:
-
clean:

install:
Index: gfs/libgfs/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs/libgfs/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- gfs/libgfs/Makefile 10 Jul 2006 23:28:11 -0000      1.2
+++ gfs/libgfs/Makefile 9 Aug 2006 14:45:34 -0000
@@ -39,5 +39,7 @@ ${LIBGFS}: ${O}
.c.o: $<
       ${CC} ${CFLAGS} -o $@ $^

+install: all
+
clean:
       rm -f *.o ${LIBGFS}
Index: gfs-kernel/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs-kernel/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- gfs-kernel/Makefile 24 Jun 2004 17:26:13 -0000      1.1
+++ gfs-kernel/Makefile 9 Aug 2006 14:45:34 -0000
@@ -1,14 +1,14 @@
all:
-       cd src && ${MAKE} all
+       ${MAKE} -C src all

clean:
-       cd src && ${MAKE} clean
+       ${MAKE} -C src clean

-install:
-       cd src && ${MAKE} install
+install: all
+       ${MAKE} -C src install

uninstall:
-       cd src && ${MAKE} uninstall
+       ${MAKE} -C src uninstall

distclean: clean
       rm -f make/defines.mk
\ No newline at end of file
Index: gfs-kernel/src/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs-kernel/src/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- gfs-kernel/src/Makefile     13 Jul 2006 21:10:41 -0000      1.4
+++ gfs-kernel/src/Makefile     9 Aug 2006 14:45:34 -0000
@@ -12,19 +12,19 @@
###############################################################################

all:
-       cd gfs && ${MAKE} all
+       ${MAKE} -C gfs all

install:
-       cd gfs && ${MAKE} install
+       ${MAKE} -C gfs install

uninstall:
-       cd gfs && ${MAKE} uninstall
+       ${MAKE} -C gfs uninstall

clean:
       rm -rf *.patch linux-patched
-       cd gfs && ${MAKE} clean
-
-patches:
-       cd gfs && ${MAKE} patches
+       ${MAKE} -C gfs clean

+distclean: clean

+patches:
+       ${MAKE} -C gfs patches
Index: gfs-kernel/src/gfs/super.c
===================================================================
RCS file: /cvs/cluster/cluster/gfs-kernel/src/gfs/super.c,v
retrieving revision 1.20
diff -w -u -p -p -u -r1.20 super.c
--- gfs-kernel/src/gfs/super.c  2 Aug 2006 01:37:16 -0000       1.20
+++ gfs-kernel/src/gfs/super.c  9 Aug 2006 14:45:34 -0000
@@ -18,6 +18,7 @@
#include <asm/semaphore.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
+#include <linux/vmalloc.h>

#include "gfs.h"
#include "dio.h"
Index: gfs2/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/Makefile,v
retrieving revision 1.8
diff -w -u -p -p -u -r1.8 Makefile
--- gfs2/Makefile       24 Jul 2006 17:48:50 -0000      1.8
+++ gfs2/Makefile       9 Aug 2006 14:45:34 -0000
@@ -30,14 +30,6 @@ tag_quota:
tag_tool:
       ${MAKE} -C tool all

-copytobin:
-       ${MAKE} -C convert copytobin
-       ${MAKE} -C edit copytobin
-       ${MAKE} -C fsck copytobin
-       ${MAKE} -C mkfs copytobin
-       ${MAKE} -C quota copytobin
-       ${MAKE} -C tool copytobin
-
clean:
       ${MAKE} -C libgfs2 clean
       ${MAKE} -C convert clean
@@ -52,14 +44,24 @@ clean:
distclean: clean
       rm -f make/defines.mk

-install:
-       ${MAKE} -C mount install
-       ${MAKE} -C bin install
-       ${MAKE} -C man install
+install: all
+       ${MAKE} -C convert install
+       ${MAKE} -C edit install
+       ${MAKE} -C fsck install
       ${MAKE} -C init.d install
+       ${MAKE} -C man install
+       ${MAKE} -C mkfs install
+       ${MAKE} -C mount install
+       ${MAKE} -C quota install
+       ${MAKE} -C tool install

deinstall uninstall:
-       ${MAKE} -C mount uninstall
-       ${MAKE} -C bin uninstall
-       ${MAKE} -C man uninstall
+       ${MAKE} -C convert uninstall
+       ${MAKE} -C edit uninstall
+       ${MAKE} -C fsck uninstall
       ${MAKE} -C init.d uninstall
+       ${MAKE} -C man uninstall
+       ${MAKE} -C mkfs uninstall
+       ${MAKE} -C mount uninstall
+       ${MAKE} -C quota uninstall
+       ${MAKE} -C tool uninstall
Index: gfs2/convert/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/convert/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- gfs2/convert/Makefile       12 Jun 2006 20:40:32 -0000      1.4
+++ gfs2/convert/Makefile       9 Aug 2006 14:45:34 -0000
@@ -13,22 +13,30 @@
top_srcdir=..
include ${top_srcdir}/make/defines.mk

+TARGET= gfs2_convert
+
INCLUDES=-I${top_srcdir}/include -I${top_srcdir}/config -I${top_srcdir}/libgfs2 -I/usr/include -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/

LIBS=-L${top_srcdir}/libgfs2

CFLAGS+=-D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM -DGFS2_RELEASE_NAME=\"2\" -Wall -g

-all: gfs2_convert
+all: ${TARGET}

-copytobin: gfs2_convert
-       cp gfs2_convert ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

gfs2_convert.o: gfs2_convert.c
$(CC) $(INCLUDES) $(LIBS) $(CFLAGS) -c -o gfs2_convert.o gfs2_convert.c

gfs2_convert: gfs2_convert.o ../libgfs2/libgfs2.a
- $(CC) $(INCLUDES) $(LIBS) $(CFLAGS) -o gfs2_convert gfs2_convert.o -lgfs2 + $(CC) $(INCLUDES) $(LIBS) $(CFLAGS) -o ${TARGET} gfs2_convert.o -lgfs2

clean:
-       @rm -f *.o gfs2_convert
+       @rm -f *.o ${TARGET}
+
+distclean: clean
+       @rm -f {top_srcdir}/make/defines.mk
Index: gfs2/debug/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/debug/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- gfs2/debug/Makefile 19 May 2005 19:51:12 -0000      1.2
+++ gfs2/debug/Makefile 9 Aug 2006 14:45:34 -0000
@@ -48,8 +48,11 @@ all: ${TARGET}
gfs2_debug: ${SOURCE}
${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gfs2/edit/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/edit/Makefile,v
retrieving revision 1.3
diff -w -u -p -p -u -r1.3 Makefile
--- gfs2/edit/Makefile  11 May 2006 16:25:19 -0000      1.3
+++ gfs2/edit/Makefile  9 Aug 2006 14:45:34 -0000
@@ -41,8 +41,11 @@ all: gfs2_edit
gfs2_edit: ${SOURCE} hexedit.h gfs2hex.h
${CC} ${CFLAGS} ${INCLUDE} ${LIBS} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -lncurses -o $@ -lgfs2

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gfs2/fsck/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/fsck/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- gfs2/fsck/Makefile  28 Jun 2006 14:05:25 -0000      1.5
+++ gfs2/fsck/Makefile  9 Aug 2006 14:45:34 -0000
@@ -14,6 +14,8 @@ top_srcdir=..

include ${top_srcdir}/make/defines.mk

+TARGET= gfs2_fsck
+
INCLUDES= -I${top_srcdir}/include -I${top_srcdir}/config -I${top_srcdir}/libgfs2 -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/
LIBS=-L${top_srcdir}/libgfs2

@@ -25,7 +27,7 @@ sources = main.c initialize.c pass1.c pa

CFLAGS+=-D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM -DGFS_RELEASE_NAME=\"${RELEASE}\" -Wall -g

-all: gfs2_fsck
+all: ${TARGET}

gfs2_fsck: $(sources:.c=.o) ../libgfs2/libgfs2.a
       $(CC) $(CFLAGS) $(LIBS) $^ -o $@ -lgfs2
@@ -42,8 +44,12 @@ test_bitmap: test_bitmap.o log.o
clean:
       @rm -f gfs2_fsck *.o *~ *.d

-copytobin: gfs2_fsck
-       cp gfs2_fsck ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       strip ${TARGET}
+       install -m755 ${TARGET} ${sbindir}

distclean: clean
@rm -f cscope.* gfs2_fsck test_inode_list *.orig *.rej test_block_list test_bitmap
Index: gfs2/init.d/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/init.d/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- gfs2/init.d/Makefile        12 Jun 2006 16:26:32 -0000      1.2
+++ gfs2/init.d/Makefile        9 Aug 2006 14:45:34 -0000
@@ -18,8 +18,6 @@ top_srcdir=..

include ${top_srcdir}/make/defines.mk

-copytobin:
-
clean:

install:
Index: gfs2/libgfs2/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/libgfs2/Makefile,v
retrieving revision 1.3
diff -w -u -p -p -u -r1.3 Makefile
--- gfs2/libgfs2/Makefile       12 Jun 2006 20:38:27 -0000      1.3
+++ gfs2/libgfs2/Makefile       9 Aug 2006 14:45:34 -0000
@@ -39,6 +39,8 @@ ${LIBGFS2}: ${O}
.c.o: $<
       ${CC} ${CFLAGS} -o $@ $^

+install: all
+
clean:
       rm -f *.o ${LIBGFS2}

Index: gfs2/mkfs/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/mkfs/Makefile,v
retrieving revision 1.10
diff -w -u -p -p -u -r1.10 Makefile
--- gfs2/mkfs/Makefile  10 Jul 2006 22:51:10 -0000      1.10
+++ gfs2/mkfs/Makefile  9 Aug 2006 14:45:35 -0000
@@ -1,7 +1,7 @@
#
# Makefile for GFS2 mkfs
#
-.PHONY: all clean install copytobin
+.PHONY: all clean install

top_srcdir=..

@@ -9,7 +9,6 @@ include ${top_srcdir}/make/defines.mk

MKFS=mkfs.gfs2
JADD=gfs2_jadd
-INSTALLPATH=/sbin
INCLUDEPATH=-I${KERNEL_SRC}/include/ -I${top_srcdir}/include/ -I${top_srcdir}/libgfs2/ -I${top_srcdir}/config/

INSTALL=install
@@ -34,13 +33,9 @@ ${JADD}: ${MKFS}
.c.o: $<
       ${CC} ${CFLAGS} -o $@ $^

-copytobin: ${MKFS}
-       cp ${MKFS} ${top_srcdir}/bin
-       ln -sf ${MKFS} ${top_srcdir}/bin/${JADD}
-
-install: ${MKFS}
-       ${INSTALL} -m 0755 -g root -o root ${MKFS} ${INSTALLPATH}
-       ln -sf ${MKFS} ${INSTALLPATH}/${JADD}
+install: all
+       ${INSTALL} -m 0755 -g root -o root ${MKFS} ${sbindir}
+       ln -f ${MKFS} ${sbindir}/${JADD}

clean:
       rm -f *.o ${MKFS} ${JADD}
Index: gfs2/mount/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/mount/Makefile,v
retrieving revision 1.9
diff -w -u -p -p -u -r1.9 Makefile
--- gfs2/mount/Makefile 24 Jul 2006 17:48:50 -0000      1.9
+++ gfs2/mount/Makefile 9 Aug 2006 14:45:35 -0000
@@ -63,7 +63,7 @@ mount.gfs2: mount.gfs2.o ondisk1.o ondis
umount.gfs2: umount.gfs2.o ondisk1.o ondisk2.o util.o mtab.o
       ${CC} ${LDFLAGS} -o $@ $^

-install: mount.gfs2 umount.gfs2
+install: all
       install mount.gfs2 ${sbindir}
       install umount.gfs2 ${sbindir}
       (cd ${sbindir}; ln -f mount.gfs2 mount.gfs)
Index: gfs2/quota/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/quota/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- gfs2/quota/Makefile 9 Jun 2006 22:13:19 -0000       1.4
+++ gfs2/quota/Makefile 9 Aug 2006 14:45:35 -0000
@@ -42,11 +42,11 @@ all:
gfs2_quota: ${SOURCE}
${CC} ${CFLAGS} ${INCLUDE} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin:
-#copytobin: ${TARGET}
-#      cp ${TARGET} ${top_srcdir}/bin
+install: all
+#      if [ ! -d ${sbindir} ]; then \
+#              install -d ${sbindir}; \
+#      fi
+#      install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
-
-
Index: gfs2/tool/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gfs2/tool/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
--- gfs2/tool/Makefile  15 Jun 2006 16:40:48 -0000      1.4
+++ gfs2/tool/Makefile  9 Aug 2006 14:45:35 -0000
@@ -28,7 +28,7 @@ endif

LIBS=-L${top_srcdir}/libgfs2

-.PHONY: all clean copytobin distclean
+.PHONY: all clean distclean

SOURCES= counters.c df.c layout.c main.c misc.c ondisk.c sb.c tune.c util.c

@@ -46,8 +46,11 @@ gfs2_tool: ${OBJECTS} ../libgfs2/libgfs2
%.o: %.c
       $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@

-copytobin: ${TARGET}
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       install -m755 ${TARGET} ${sbindir}

clean:
       @rm -f ${TARGET} *.o *~
Index: gnbd/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- gnbd/Makefile       16 Aug 2004 18:40:40 -0000      1.2
+++ gnbd/Makefile       9 Aug 2006 14:45:35 -0000
@@ -13,24 +13,26 @@


all:
-       cd client && ${MAKE} copytobin
-       cd server && ${MAKE} copytobin
-       cd tools && ${MAKE} copytobin
+       ${MAKE} -C client all
+       ${MAKE} -C server all
+       ${MAKE} -C tools all

clean:
-       cd bin && ${MAKE} clean
-       cd client && ${MAKE} clean
-       cd server && ${MAKE} clean
-       cd tools && ${MAKE} clean
+       ${MAKE} -C client clean
+       ${MAKE} -C server clean
+       ${MAKE} -C tools clean

distclean: clean
       rm -f make/defines.mk

-install:
-       cd bin && ${MAKE} install
-       cd man && ${MAKE} install
+install: all
+       ${MAKE} -C client install
+       ${MAKE} -C server install
+       ${MAKE} -C tools install
+       ${MAKE} -C man install

deinstall uninstall:
-       cd bin && ${MAKE} uninstall
-       cd man && ${MAKE} uninstall
-
+       ${MAKE} -C client uninstall
+       ${MAKE} -C server uninstall
+       ${MAKE} -C tools uninstall
+       ${MAKE} -C man uninstall
Index: gnbd/client/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/client/Makefile,v
retrieving revision 1.8
diff -w -u -p -p -u -r1.8 Makefile
--- gnbd/client/Makefile        20 Jul 2006 15:11:16 -0000      1.8
+++ gnbd/client/Makefile        9 Aug 2006 14:45:35 -0000
@@ -45,8 +45,12 @@ gnbd_recvd: ${RECV_SOURCE}
gnbd_monitor: ${MONITOR_SRC}
${CC} ${CFLAGS} ${LDFLAGS} ${MONITOR_SRC} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       strip ${TARGET}
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o *~ ${TARGET}
Index: gnbd/man/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/man/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- gnbd/man/Makefile   2 Jun 2006 00:45:04 -0000       1.2
+++ gnbd/man/Makefile   9 Aug 2006 14:45:35 -0000
@@ -26,8 +26,6 @@ include ${top_srcdir}/make/defines.mk

all:

-copytobin:
-
clean:

install: all
Index: gnbd/server/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/server/Makefile,v
retrieving revision 1.8
diff -w -u -p -p -u -r1.8 Makefile
--- gnbd/server/Makefile        20 Jul 2006 15:11:17 -0000      1.8
+++ gnbd/server/Makefile        9 Aug 2006 14:45:35 -0000
@@ -46,8 +46,12 @@ gnbd_clusterd: ${CLU_SOURCE}
gnbd_serv: ${SRV_SOURCE}
${CC} ${CFLAGS} ${LDFLAGS} ${SRV_SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       strip ${TARGET}
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gnbd/tools/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/tools/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- gnbd/tools/Makefile 24 Jun 2004 08:53:33 -0000      1.1
+++ gnbd/tools/Makefile 9 Aug 2006 14:45:35 -0000
@@ -13,16 +13,16 @@


all:
-       cd fence_gnbd && ${MAKE} all
-       cd gnbd_export && ${MAKE} all
-       cd gnbd_import && ${MAKE} all
+       ${MAKE} -C fence_gnbd all
+       ${MAKE} -C gnbd_export all
+       ${MAKE} -C gnbd_import all

-copytobin:
-       cd fence_gnbd && ${MAKE} copytobin
-       cd gnbd_export && ${MAKE} copytobin
-       cd gnbd_import && ${MAKE} copytobin
+install: all
+       ${MAKE} -C fence_gnbd install
+       ${MAKE} -C gnbd_export install
+       ${MAKE} -C gnbd_import install

clean:
-       cd fence_gnbd && ${MAKE} clean
-       cd gnbd_export && ${MAKE} clean
-       cd gnbd_import && ${MAKE} clean
+       ${MAKE} -C fence_gnbd clean
+       ${MAKE} -C gnbd_export clean
+       ${MAKE} -C gnbd_import clean
Index: gnbd/tools/fence_gnbd/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/tools/fence_gnbd/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- gnbd/tools/fence_gnbd/Makefile      24 Jun 2004 08:53:34 -0000      1.1
+++ gnbd/tools/fence_gnbd/Makefile      9 Aug 2006 14:45:35 -0000
@@ -29,8 +29,12 @@ all: ${TARGET}
fence_gnbd: ${SOURCE:.c=.o}
${CC} ${CFLAGS} ${LDFLAGS} ${SOURCE:.c=.o} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       strip ${TARGET}
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gnbd/tools/gnbd_export/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/tools/gnbd_export/Makefile,v
retrieving revision 1.10
diff -w -u -p -p -u -r1.10 Makefile
--- gnbd/tools/gnbd_export/Makefile     20 Jul 2006 15:11:19 -0000      1.10
+++ gnbd/tools/gnbd_export/Makefile     9 Aug 2006 14:45:35 -0000
@@ -33,9 +33,13 @@ all: ${TARGET}
gnbd_export: ${SOURCE}
       ${CC} ${CFLAGS} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: all gnbd_get_uid
-       cp ${TARGET} ${top_srcdir}/bin
-       cp gnbd_get_uid ${top_srcdir}/bin
+install: all gnbd_get_uid
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       strip ${TARGET}
+       install -m755 ${TARGET} ${sbindir}
+       install -m755 gnbd_get_uid  ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gnbd/tools/gnbd_import/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd/tools/gnbd_import/Makefile,v
retrieving revision 1.7
diff -w -u -p -p -u -r1.7 Makefile
--- gnbd/tools/gnbd_import/Makefile     20 Jul 2006 15:11:19 -0000      1.7
+++ gnbd/tools/gnbd_import/Makefile     9 Aug 2006 14:45:35 -0000
@@ -42,8 +42,12 @@ all: ${TARGET}
gnbd_import: ${SOURCE}
       ${CC} ${CFLAGS} ${LDFLAGS} ${SOURCE} ${LOADLIBES} ${LDLIBS} -o $@

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
+install: all
+       if [ ! -d ${sbindir} ]; then \
+               install -d ${sbindir}; \
+       fi
+       strip ${TARGET}
+       install -m755 ${TARGET} ${sbindir}

clean:
       rm -f *.o ${TARGET}
Index: gnbd-kernel/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd-kernel/Makefile,v
retrieving revision 1.1
diff -w -u -p -p -u -r1.1 Makefile
--- gnbd-kernel/Makefile        24 Jun 2004 18:34:59 -0000      1.1
+++ gnbd-kernel/Makefile        9 Aug 2006 14:45:35 -0000
@@ -1,14 +1,14 @@
all:
-       cd src && ${MAKE} all
+       ${MAKE} -C src all

clean:
-       cd src && ${MAKE} clean
+       ${MAKE} -C src clean

-install:
-       cd src && ${MAKE} install
+install: all
+       ${MAKE} -C src install

uninstall:
-       cd src && ${MAKE} uninstall
+       ${MAKE} -C src uninstall

distclean: clean
       rm -f make/defines.mk
\ No newline at end of file
Index: gnbd-kernel/src/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/gnbd-kernel/src/Makefile,v
retrieving revision 1.4
diff -w -u -p -p -u -r1.4 Makefile
Index: group/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/group/Makefile,v
retrieving revision 1.6
diff -w -u -p -p -u -r1.6 Makefile
--- group/Makefile      19 Jul 2006 14:46:52 -0000      1.6
+++ group/Makefile      9 Aug 2006 14:45:35 -0000
@@ -11,26 +11,25 @@
###############################################################################

all:
-       cd lib && ${MAKE} all
-       cd daemon && ${MAKE} all
-       cd tool && ${MAKE} all
-       cd dlm_controld && ${MAKE} all
-       cd gfs_controld && ${MAKE} all
+       ${MAKE} -C lib all
+       ${MAKE} -C daemon all
+       ${MAKE} -C tool all
+       ${MAKE} -C dlm_controld all
+       ${MAKE} -C gfs_controld all

clean:
-       cd lib && ${MAKE} clean
-       cd daemon && ${MAKE} clean
-       cd tool && ${MAKE} clean
-       cd dlm_controld && ${MAKE} clean
-       cd gfs_controld && ${MAKE} clean
+       ${MAKE} -C lib clean
+       ${MAKE} -C daemon clean
+       ${MAKE} -C tool clean
+       ${MAKE} -C dlm_controld clean
+       ${MAKE} -C gfs_controld clean

-install:
-       cd lib && ${MAKE} install
-       cd daemon && ${MAKE} install
-       cd tool && ${MAKE} install
-       cd dlm_controld && ${MAKE} install
-       cd gfs_controld && ${MAKE} install
+install: all
+       ${MAKE} -C lib install
+       ${MAKE} -C daemon install
+       ${MAKE} -C tool install
+       ${MAKE} -C dlm_controld install
+       ${MAKE} -C gfs_controld install

distclean: clean
       rm -f make/defines.mk
-
Index: group/configure
===================================================================
RCS file: /cvs/cluster/cluster/group/configure,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 configure
--- group/configure     7 Jul 2006 16:14:33 -0000       1.2
+++ group/configure     9 Aug 2006 14:45:35 -0000
@@ -14,6 +14,7 @@
###############################################################################

use Getopt::Long;
+use POSIX;

print "\nConfiguring Makefiles for your system...\n";

@@ -94,8 +95,14 @@ if (!$iddevincdir) {
  $iddevincdir="${incdir}/cluster";
}
if (!$libdir) {
+  my $arch = (POSIX::uname())[4];
+  if ($arch eq "x86_64") {
+       $libdir="${prefix}/usr/lib64";
+  }
+  else {
  $libdir="${prefix}/usr/lib";
}
+}
if (!$iddevlibdir) {
  $iddevlibdir="${libdir}";
}
Index: group/daemon/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/group/daemon/Makefile,v
retrieving revision 1.15
diff -w -u -p -p -u -r1.15 Makefile
--- group/daemon/Makefile       7 Jul 2006 16:53:25 -0000       1.15
+++ group/daemon/Makefile       9 Aug 2006 14:45:35 -0000
@@ -46,7 +46,7 @@ main.o: main.c gd_internal.h
clean:
       rm -f *.o groupd

-install: groupd
+install: all
       install -d ${sbindir}
       install groupd ${sbindir}

Index: group/dlm_controld/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/group/dlm_controld/Makefile,v
retrieving revision 1.3
diff -w -u -p -p -u -r1.3 Makefile
--- group/dlm_controld/Makefile 7 Jul 2006 16:14:34 -0000       1.3
+++ group/dlm_controld/Makefile 9 Aug 2006 14:45:35 -0000
@@ -30,9 +30,6 @@ TARGET=dlm_controld

all: ${TARGET}

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
-
dlm_controld:  main.o \
               member_cman.o \
               group.o \
@@ -53,13 +50,13 @@ group.o: group.c
action.o: action.c
       $(CC) $(CFLAGS) -c -o $@ $<

-install: dlm_controld
+install: all
       install -d ${sbindir}
-       install dlm_controld ${sbindir}
+       install ${TARGET} ${sbindir}

uninstall:
-       ${UNINSTALL} dlm_controld ${sbindir}
+       ${UNINSTALL} ${TARGET} ${sbindir}

clean:
-       rm -f *.o dlm_controld
+       rm -f *.o ${TARGET}

Index: group/gfs_controld/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/group/gfs_controld/Makefile,v
retrieving revision 1.6
diff -w -u -p -p -u -r1.6 Makefile
--- group/gfs_controld/Makefile 31 Jul 2006 18:37:07 -0000      1.6
+++ group/gfs_controld/Makefile 9 Aug 2006 14:45:35 -0000
@@ -28,9 +28,6 @@ TARGET=gfs_controld

all: ${TARGET}

-copytobin: all
-       cp ${TARGET} ${top_srcdir}/bin
-
gfs_controld:  main.o \
               member_cman.o \
               cpg.o \
@@ -62,13 +59,12 @@ group.o: group.c
plock.o: plock.c
       $(CC) $(CFLAGS) -c -o $@ $<

-install: gfs_controld
+install: all
       install -d ${sbindir}
-       install gfs_controld ${sbindir}
+       install ${TARGET} ${sbindir}

uninstall:
-       ${UNINSTALL} gfs_controld ${sbindir}
+       ${UNINSTALL} ${TARGET} ${sbindir}

clean:
-       rm -f *.o gfs_controld
-
+       rm -f *.o ${TARGET}
Index: group/lib/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/group/lib/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- group/lib/Makefile  23 Jun 2005 15:32:30 -0000      1.2
+++ group/lib/Makefile  9 Aug 2006 14:45:35 -0000
@@ -31,8 +31,6 @@ $(LIBNAME).a: libgroup.o
libgroup.o: libgroup.c
       $(CC) $(CFLAGS) -c -o $@ $< -I../daemon

-copytobin: all
-
install: all

uninstall:
Index: group/tool/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/group/tool/Makefile,v
retrieving revision 1.5
diff -w -u -p -p -u -r1.5 Makefile
--- group/tool/Makefile 28 Jun 2006 19:57:05 -0000      1.5
+++ group/tool/Makefile 9 Aug 2006 14:45:35 -0000
@@ -29,7 +29,7 @@ main.o: main.c
clean:
       rm -f *.o group_tool

-install: group_tool
+install: all
       install -d ${sbindir}
       install group_tool ${sbindir}

Index: rgmanager/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/Makefile,v
retrieving revision 1.3
diff -w -u -p -p -u -r1.3 Makefile
--- rgmanager/Makefile  21 Mar 2005 22:51:17 -0000      1.3
+++ rgmanager/Makefile  9 Aug 2006 14:45:35 -0000
@@ -12,21 +12,21 @@
###############################################################################

all:
-       cd src && ${MAKE} all
+       ${MAKE} -C src all

clean:
-       cd src && ${MAKE} clean
+       ${MAKE} -C src clean

distclean: clean
       rm -f make/defines.mk

-install:
-       cd src && ${MAKE} install
-       cd man && ${MAKE} install
-       cd init.d && ${MAKE} install
+install: all
+       ${MAKE} -C src install
+       ${MAKE} -C man install
+       ${MAKE} -C init.d install

check:
-       cd src && ${MAKE} check
+       ${MAKE} -C src check

uninstall:
-       cd src && ${MAKE} uninstall
+       ${MAKE} -C src uninstall
Index: rgmanager/src/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/Makefile,v
retrieving revision 1.2
diff -w -u -p -p -u -r1.2 Makefile
--- rgmanager/src/Makefile      25 Jan 2005 17:31:12 -0000      1.2
+++ rgmanager/src/Makefile      9 Aug 2006 14:45:35 -0000
@@ -12,32 +12,32 @@
###############################################################################

all:
-       cd resources && ${MAKE} all
-       cd clulib && ${MAKE} all
-       cd daemons && ${MAKE} all
-       cd utils && ${MAKE} all
+       ${MAKE} -C resources all
+       ${MAKE} -C clulib all
+       ${MAKE} -C daemons all
+       ${MAKE} -C utils all

clean:
-       cd resources && ${MAKE} clean
-       cd clulib && ${MAKE} clean
-       cd daemons && ${MAKE} clean
-       cd utils && ${MAKE} clean
+       ${MAKE} -C resources clean
+       ${MAKE} -C clulib clean
+       ${MAKE} -C daemons clean
+       ${MAKE} -C utils clean

check:
-       cd resources && ${MAKE} check
-       cd daemons && ${MAKE} check
+       ${MAKE} -C resources check
+       ${MAKE} -C daemons check

distclean: clean
       rm -f make/defines.mk

-install:
-       cd resources && ${MAKE} install
-       cd clulib && ${MAKE} install
-       cd daemons && ${MAKE} install
-       cd utils && ${MAKE} install
+install: all
+       ${MAKE} -C resources install
+       ${MAKE} -C clulib install
+       ${MAKE} -C daemons install
+       ${MAKE} -C utils install

uninstall:
-       cd resources && ${MAKE} uninstall
-       cd clulib && ${MAKE} uninstall
-       cd daemons && ${MAKE} uninstall
-       cd utils && ${MAKE} uninstall
+       ${MAKE} -C  resources uninstall
+       ${MAKE} -C clulib uninstall
+       ${MAKE} -C daemons uninstall
+       ${MAKE} -C utils  uninstall


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]