From mboxrd@z Thu Jan 1 00:00:00 1970 From: fabbione@sourceware.org Date: 20 Dec 2007 22:10:13 -0000 Subject: [Cluster-devel] cluster ./Makefile ./configure ccs/ccs_test/Ma ... Message-ID: <20071220221013.6433.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Changes by: fabbione at sourceware.org 2007-12-20 22:10:05 Modified files: . : Makefile configure ccs/ccs_test : Makefile ccs/ccs_tool : Makefile ccs/daemon : Makefile ccs/lib : Makefile ccs/man : Makefile cman/cman_tool : Makefile cman/daemon : Makefile cman/init.d : Makefile cman/lib : Makefile cman/man : Makefile cman/qdisk : Makefile cman/tests : Makefile dlm/lib : Makefile dlm/man : Makefile dlm/tests/usertest: Makefile dlm/tool : Makefile fence : Makefile fence/agents/ipmilan: Makefile fence/agents/manual: Makefile fence/agents/rackswitch: Makefile fence/agents/rps10: Makefile fence/agents/scsi: Makefile fence/agents/xvm: Makefile fence/fence_node: Makefile fence/fence_tool: Makefile fence/fenced : Makefile fence/man : Makefile gfs/gfs_debug : Makefile gfs/gfs_edit : Makefile gfs/gfs_fsck : Makefile gfs/gfs_grow : Makefile gfs/gfs_jadd : Makefile gfs/gfs_mkfs : Makefile gfs/gfs_quota : Makefile gfs/gfs_tool : Makefile gfs/init.d : Makefile gfs/libgfs : Makefile gfs/man : Makefile gfs/tests/filecon2: Makefile gfs2/convert : Makefile gfs2/edit : Makefile gfs2/fsck : Makefile gfs2/init.d : Makefile gfs2/libgfs2 : Makefile gfs2/man : Makefile gfs2/mkfs : Makefile gfs2/mount : Makefile gfs2/quota : Makefile gfs2/tool : Makefile gnbd/client : Makefile gnbd/man : Makefile gnbd/server : Makefile gnbd/tools/fence_gnbd: Makefile gnbd/tools/gnbd_export: Makefile gnbd/tools/gnbd_import: Makefile gnbd/utils : Makefile group/daemon : Makefile group/dlm_controld: Makefile group/gfs_controld: Makefile group/lib : Makefile group/man : Makefile group/test : Makefile group/tool : Makefile make : defines.mk.input fenceperl.mk fencepy.mk rgmanager/init.d: Makefile rgmanager/man : Makefile rgmanager/src/clulib: Makefile rgmanager/src/daemons: Makefile rgmanager/src/resources: Makefile rgmanager/src/utils: Makefile Log message: * globally rename BUILDDIR to SRCDIR to reflect what it really is. * top level configure: - add --objdir=/path option (default to current tree - it does not change current behaviour if not specified and different from current tree) - add a perl subroutine to handle symlinks - check and setup /path - switch all libdirs to use the objdir directly - propagate objdir to make/defines.mk NOTE: those changes require 2 perl modules that should be available everywhere: Cwd 'abs_path'; and File::Basename;. NOTE2: you will need to rerun ./configure after applying the patch. * make/defines.mk.input: - suck in OBJDIR from top level configure - define THISDIR as a relative path from the top level. For example: if PWD /usr/src/cluster/cman/lib, THISDIR will contain cman/lib. - define S as full path to SRCDIR/THISDIR/ * all Makefiles: - convert includes path to use $(S) and always point to the source as defined in make/defines.mk. - fix all object generation targets to use $(S). - fix all install targets to $(S) where required. * Random cleanup: - ccs/daemon/Makefile: do not kill files that are not around. - dlm/tool/Makefile: use ${dlmincdir} and $(SRCDIR)/group/dlm_controld/ instead of relative paths and do not include itself as there are no header files. Also use ${dlmlibdir} for linking. - fence/Makefile: change build order as this is required to avoid extra hacks due to shared C files around. - gfs/gfs_fsck/Makefile: fix symlinking to be relative and not absolute or the symlink is useless. - gfs2/fsck/Makefile: likewise. - gfs2/mkfs/Makefile: likewise. - gnbd/utils/Makefile: create bits. This is to avoid even more hacks than fence/Makefile to cope with shared objects. One day we will need to review all of this. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/Makefile.diff?cvsroot=cluster&r1=1.32&r2=1.33 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/configure.diff?cvsroot=cluster&r1=1.42&r2=1.43 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/ccs_test/Makefile.diff?cvsroot=cluster&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/ccs_tool/Makefile.diff?cvsroot=cluster&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/Makefile.diff?cvsroot=cluster&r1=1.17&r2=1.18 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/Makefile.diff?cvsroot=cluster&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/man/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/cman_tool/Makefile.diff?cvsroot=cluster&r1=1.25&r2=1.26 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/daemon/Makefile.diff?cvsroot=cluster&r1=1.56&r2=1.57 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/init.d/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/man/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/Makefile.diff?cvsroot=cluster&r1=1.13&r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/tests/Makefile.diff?cvsroot=cluster&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/Makefile.diff?cvsroot=cluster&r1=1.22&r2=1.23 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/man/Makefile.diff?cvsroot=cluster&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tests/usertest/Makefile.diff?cvsroot=cluster&r1=1.13&r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tool/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/Makefile.diff?cvsroot=cluster&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ipmilan/Makefile.diff?cvsroot=cluster&r1=1.8&r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/manual/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/rackswitch/Makefile.diff?cvsroot=cluster&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/rps10/Makefile.diff?cvsroot=cluster&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/Makefile.diff?cvsroot=cluster&r1=1.14&r2=1.15 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/Makefile.diff?cvsroot=cluster&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/Makefile.diff?cvsroot=cluster&r1=1.10&r2=1.11 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_tool/Makefile.diff?cvsroot=cluster&r1=1.17&r2=1.18 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/Makefile.diff?cvsroot=cluster&r1=1.13&r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/man/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_debug/Makefile.diff?cvsroot=cluster&r1=1.10&r2=1.11 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_edit/Makefile.diff?cvsroot=cluster&r1=1.10&r2=1.11 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_fsck/Makefile.diff?cvsroot=cluster&r1=1.13&r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_grow/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_jadd/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_mkfs/Makefile.diff?cvsroot=cluster&r1=1.12&r2=1.13 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_quota/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/gfs_tool/Makefile.diff?cvsroot=cluster&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/init.d/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/libgfs/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/man/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/tests/filecon2/Makefile.diff?cvsroot=cluster&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/convert/Makefile.diff?cvsroot=cluster&r1=1.12&r2=1.13 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/Makefile.diff?cvsroot=cluster&r1=1.12&r2=1.13 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/Makefile.diff?cvsroot=cluster&r1=1.16&r2=1.17 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/init.d/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/Makefile.diff?cvsroot=cluster&r1=1.13&r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/man/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/Makefile.diff?cvsroot=cluster&r1=1.21&r2=1.22 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/Makefile.diff?cvsroot=cluster&r1=1.19&r2=1.20 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/Makefile.diff?cvsroot=cluster&r1=1.13&r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/Makefile.diff?cvsroot=cluster&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/client/Makefile.diff?cvsroot=cluster&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/man/Makefile.diff?cvsroot=cluster&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/Makefile.diff?cvsroot=cluster&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/tools/fence_gnbd/Makefile.diff?cvsroot=cluster&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/tools/gnbd_export/Makefile.diff?cvsroot=cluster&r1=1.16&r2=1.17 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/tools/gnbd_import/Makefile.diff?cvsroot=cluster&r1=1.13&r2=1.14 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/utils/Makefile.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/Makefile.diff?cvsroot=cluster&r1=1.21&r2=1.22 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/Makefile.diff?cvsroot=cluster&r1=1.12&r2=1.13 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/Makefile.diff?cvsroot=cluster&r1=1.14&r2=1.15 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/lib/Makefile.diff?cvsroot=cluster&r1=1.8&r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/man/Makefile.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/test/Makefile.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/tool/Makefile.diff?cvsroot=cluster&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/make/defines.mk.input.diff?cvsroot=cluster&r1=1.8&r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/make/fenceperl.mk.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/make/fencepy.mk.diff?cvsroot=cluster&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/init.d/Makefile.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/man/Makefile.diff?cvsroot=cluster&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/Makefile.diff?cvsroot=cluster&r1=1.19&r2=1.20 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/Makefile.diff?cvsroot=cluster&r1=1.26&r2=1.27 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/Makefile.diff?cvsroot=cluster&r1=1.21&r2=1.22 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/Makefile.diff?cvsroot=cluster&r1=1.19&r2=1.20 --- cluster/Makefile 2007/10/01 03:29:38 1.32 +++ cluster/Makefile 2007/12/20 22:09:56 1.33 @@ -33,7 +33,7 @@ # Fix scripts permissions scripts: - chmod 755 ${BUILDDIR}/scripts/*.pl ${BUILDDIR}/scripts/define2var + chmod 755 ${SRCDIR}/scripts/*.pl ${SRCDIR}/scripts/define2var ${SUBDIRS}: [ -n "${without_$@}" ] || ${MAKE} -C $@ all --- cluster/configure 2007/12/20 04:39:06 1.42 +++ cluster/configure 2007/12/20 22:09:56 1.43 @@ -16,7 +16,8 @@ use warnings; use Getopt::Long; use POSIX qw(uname); - +use Cwd 'abs_path'; +use File::Basename; print "\nConfiguring Makefiles for your system...\n"; @@ -36,6 +37,7 @@ extracflags => \$extracflags, ldflags => \$ldflags, extraldflags => \$extraldflags, + objdir => \$objdir, kernel_build => \$kernel_build, kernel_src => \$kernel_src, module_dir => \$module_dir, @@ -97,6 +99,7 @@ 'extracflags=s', 'ldflags=s', 'extraldflags=s', + 'objdir=s', 'kernel_build=s', 'kernel_src=s', 'module_dir=s', @@ -175,6 +178,7 @@ print "--extracflags=\tadd extra compiler options to default CFLAGS setting. (Default: none)\n"; print "--ldflags=\toverride default LDFLAGS settings. (Default: none)\n"; print "--extraldflags=\tadd extra linking options to default LDFLAGS settings. (Default: none)\n"; + print "--objdir=\tspecify directory where to store object files. (Defaults: current build dir)\n"; print "--kernel_build=\tthe directory containing the kernel object tree you wish to\n\t\tcompile against. (Default: /lib/modules/`uname -r`/build\n\t\tif available or /usr/src/linux as fallback)\n"; print "--kernel_src=\tthe directory containing the kernel source you wish to\n\t\tcompile against. (Default: /lib/modules/`uname -r`/source\n\t\tif available or \$kernel_build as fallback)\n"; print "--incdir=\tthe base directory for include files. (Default: {prefix}/include)\n"; @@ -280,6 +284,23 @@ } } +sub symlinks { + my $dir = shift; + my $pattern = shift; + @args = "find $dir -name $pattern"; + open (IFILE, "@args |"); + while () { + chomp; + s|\./||g; + $dirname = dirname($_); + $filename = basename($_); + system("mkdir -p $objdir/$dirname"); + symlink("${pwd}/$_","$objdir/$dirname/$filename"); + } + close IFILE; + return 0; +} + $pwd = `pwd`; chomp($pwd); @@ -308,6 +329,24 @@ $prefix="/usr"; } +if (!$objdir) { + $objdir="${pwd}"; +} else { + $objdir = abs_path( $objdir ); + if (! -d $objdir) { + print "\nSetting up objdir in $objdir\n"; + mkdir "$objdir"; + symlinks(".","Makefile"); + symlinks(".","*.mk"); + symlinks("gnbd-kernel","*.c"); + symlinks("gnbd-kernel","*.h"); + symlinks("gfs-kernel","*.c"); + symlinks("gfs-kernel","*.h"); + } else { + print "\nFound old objdir in $objdir: no actions taken\n"; + } +} + my @un = POSIX::uname(); if (!$kernel_build) { if (-d "/lib/modules/$un[2]/build") { @@ -345,19 +384,19 @@ $ccsincdir="${pwd}/ccs/lib"; } if (!$ccslibdir) { - $ccslibdir="${pwd}/ccs/lib"; + $ccslibdir="${objdir}/ccs/lib"; } if (!$cmanincdir) { $cmanincdir="${pwd}/cman/lib"; } if (!$cmanlibdir) { - $cmanlibdir="${pwd}/cman/lib"; + $cmanlibdir="${objdir}/cman/lib"; } if (!$dlmincdir) { $dlmincdir="${pwd}/dlm/lib"; } if (!$dlmlibdir) { - $dlmlibdir="${pwd}/dlm/lib"; + $dlmlibdir="${objdir}/dlm/lib"; } if (!$volidincdir) { $volidincdir="${incdir}"; @@ -492,16 +531,17 @@ } open IFILE, "make/defines.mk" or die "Can't redirect stdout"; +open OFILE, ">${objdir}/make/defines.mk" or die "Can't redirect stdout"; print OFILE "# This file was generated by configure from defines.mk.input\n"; while () { chomp; - $_ =~ s/\@BUILDDIR\@/$pwd/; + $_ =~ s/\@SRCDIR\@/$pwd/; $_ =~ s/\@CC\@/$cc/; $_ =~ s/\@CFLAGS\@/$cflags/; $_ =~ s/\@LDFLAGS\@/$ldflags/; + $_ =~ s/\@OBJDIR\@/$objdir/; $_ =~ s/\@KERNEL_BUILD\@/$kernel_build/; $_ =~ s/\@KERNEL_SRC\@/$kernel_src/; $_ =~ s/\@MODULE_DIR\@/$module_dir/; --- cluster/ccs/ccs_test/Makefile 2007/08/28 04:35:38 1.9 +++ cluster/ccs/ccs_test/Makefile 2007/12/20 22:09:56 1.10 @@ -27,7 +27,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/ccs/ccs_tool/Makefile 2007/08/28 04:35:39 1.15 +++ cluster/ccs/ccs_tool/Makefile 2007/12/20 22:09:56 1.16 @@ -22,7 +22,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS += -I${ccsincdir} -I${cmanincdir} `xml2-config --cflags` -CFLAGS += -I../include +CFLAGS += -I$(S)/../include CFLAGS += -I${incdir} LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lccs -lcman @@ -33,7 +33,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/ccs/daemon/Makefile 2007/08/28 04:35:39 1.17 +++ cluster/ccs/daemon/Makefile 2007/12/20 22:09:56 1.18 @@ -22,7 +22,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS += -I${cmanincdir} `xml2-config --cflags` -CFLAGS += -I. -I../include -I../common +CFLAGS += -I$(S) -I$(S)/../include -I$(S)/../common CFLAGS += -I${incdir} LDFLAGS += -L${cmanlibdir} -lcman -L${ccslibdir} -lccs @@ -33,7 +33,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: @@ -47,6 +47,6 @@ ${UNINSTALL} ${TARGET} ${sbindir} clean: - rm -rf *.o ${TARGET} *~ log.c + rm -rf *.o ${TARGET} *~ .PHONY: all ${TARGET} --- cluster/ccs/lib/Makefile 2007/11/12 08:16:59 1.9 +++ cluster/ccs/lib/Makefile 2007/12/20 22:09:56 1.10 @@ -19,7 +19,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -fPIC -CFLAGS += -I../include -I../common +CFLAGS += -I$(S)/../include -I$(S)/../common CFLAGS += -I${incdir} all: ${TARGET} @@ -28,17 +28,17 @@ ${AR} cr $@ $^ ${RANLIB} $@ -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< log.c: - ln -sf ../common/log.c log.c + ln -sf $(S)/../common/log.c log.c install: all install -d ${libdir} install -m644 ${TARGET} ${libdir} install -d ${incdir} - install -m644 ccs.h ${incdir} + install -m644 $(S)/ccs.h ${incdir} uninstall: ${UNINSTALL} ${TARGET} ${libdir} --- cluster/ccs/man/Makefile 2007/04/30 11:21:59 1.4 +++ cluster/ccs/man/Makefile 2007/12/20 22:09:56 1.5 @@ -17,9 +17,9 @@ install -d ${mandir}/man5 install -d ${mandir}/man7 install -d ${mandir}/man8 - install cluster.conf.5 ${mandir}/man5 - install ccs.7 ${mandir}/man7 - install ccsd.8 ccs_test.8 ccs_tool.8 ${mandir}/man8 + install $(S)/cluster.conf.5 ${mandir}/man5 + install $(S)/ccs.7 ${mandir}/man7 + install $(S)/ccsd.8 $(S)/ccs_test.8 $(S)/ccs_tool.8 ${mandir}/man8 uninstall: ${UNINSTALL} cluster.conf.5 ${mandir}/man5 --- cluster/cman/cman_tool/Makefile 2007/09/07 14:21:30 1.25 +++ cluster/cman/cman_tool/Makefile 2007/12/20 22:09:56 1.26 @@ -28,7 +28,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/cman/daemon/Makefile 2007/11/27 14:54:53 1.56 +++ cluster/cman/daemon/Makefile 2007/12/20 22:09:56 1.57 @@ -34,7 +34,7 @@ ${TARGET}: ${OBJS} $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/cman/init.d/Makefile 2007/04/30 11:22:01 1.4 +++ cluster/cman/init.d/Makefile 2007/12/20 22:09:57 1.5 @@ -20,7 +20,7 @@ install: install -d ${DESTDIR}/etc/init.d - install ${TARGET} ${DESTDIR}/etc/init.d + install $(S)/cman $(S)/qdiskd ${DESTDIR}/etc/init.d uninstall: ${UNINSTALL} ${TARGET} ${DESTDIR}/etc/init.d --- cluster/cman/lib/Makefile 2007/08/28 04:35:39 1.11 +++ cluster/cman/lib/Makefile 2007/12/20 22:09:57 1.12 @@ -19,7 +19,7 @@ STATICLIB=$(TARGET).a CFLAGS += -fPIC -CFLAGS += -I. -I../daemon +CFLAGS += -I${cmanincdir} -I$(S)/../daemon CFLAGS += -I${incdir} all: $(STATICLIB) $(SHAREDLIB) @@ -33,12 +33,12 @@ ln -sf $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET).so ln -sf $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET).so.$(RELEASE_MAJOR) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all install -d ${incdir} - install $(TARGET).h ${incdir} + install $(S)/$(TARGET).h ${incdir} install -d ${libdir} install $(TARGET).a ${libdir} install $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) ${libdir} --- cluster/cman/man/Makefile 2007/05/15 14:37:30 1.4 +++ cluster/cman/man/Makefile 2007/12/20 22:09:57 1.5 @@ -20,8 +20,8 @@ install: install -d ${mandir}/man5 install -d ${mandir}/man8 - install cman.5 qdisk.5 ${mandir}/man5 - install cman_tool.8 qdiskd.8 mkqdisk.8 ${mandir}/man8 + install $(S)/cman.5 $(S)/qdisk.5 ${mandir}/man5 + install $(S)/cman_tool.8 $(S)/qdiskd.8 $(S)/mkqdisk.8 ${mandir}/man8 uninstall: ${UNINSTALL} cman.5 qdisk.5 ${mandir}/man5 --- cluster/cman/qdisk/Makefile 2007/08/28 04:35:39 1.13 +++ cluster/cman/qdisk/Makefile 2007/12/20 22:09:57 1.14 @@ -15,7 +15,7 @@ CFLAGS += -D_GNU_SOURCE CFLAGS += -Werror -Wstrict-prototypes -Wshadow CFLAGS += -I${ccsincdir} -I${cmanincdir} -CFLAGS += -I. +CFLAGS += -I$(S) CFLAGS += -I${incdir} EXTRA_LDFLAGS += -L${cmanlibdir} -L${ccslibdir} -lcman -lccs @@ -50,7 +50,7 @@ install -d ${sbindir} install ${TARGET1} ${TARGET2} ${sbindir} -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/cman/tests/Makefile 2007/08/29 02:50:15 1.9 +++ cluster/cman/tests/Makefile 2007/12/20 22:09:57 1.10 @@ -24,7 +24,7 @@ depends: $(MAKE) -C ../lib all -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< %: %.o --- cluster/dlm/lib/Makefile 2007/08/28 04:35:40 1.22 +++ cluster/dlm/lib/Makefile 2007/12/20 22:09:57 1.23 @@ -19,7 +19,7 @@ SHAREDLIB=$(TARGET).so.${RELEASE_MAJOR}.${RELEASE_MINOR} $(TARGET)_lt.so.${RELEASE_MAJOR}.${RELEASE_MINOR} STATICLIB=$(TARGET).a $(TARGET)_lt.a -CFLAGS += -I. +CFLAGS += -I$(S) CFLAGS += -I${incdir} CFLAGS += -I$(KERNEL_SRC)/include @@ -45,24 +45,24 @@ ln -sf $(TARGET)_lt.so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET)_lt.so ln -sf $(TARGET)_lt.so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET)_lt.so.$(RELEASE_MAJOR) -%_lt.o: %.c +%_lt.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< -%_lt.po: %.c +%_lt.po: $(S)/%.c $(CC) $(CFLAGS) -fPIC -c -o $@ $< -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -D_REENTRANT -c -o $@ $< -%.po: %.c +%.po: $(S)/%.c $(CC) $(CFLAGS) -fPIC -D_REENTRANT -c -o $@ $< install: all install -d ${incdir} - install -m644 $(TARGET).h ${incdir} + install -m644 $(S)/$(TARGET).h ${incdir} install -d ${libdir} install -d ${DESTDIR}/etc/udev/rules.d - install -m644 ../scripts/51-dlm.rules ${DESTDIR}/etc/udev/rules.d + install -m644 $(S)/../scripts/51-dlm.rules ${DESTDIR}/etc/udev/rules.d install $(TARGET).a ${libdir} install $(TARGET)_lt.a ${libdir} install $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) ${libdir} --- cluster/dlm/man/Makefile 2007/08/20 14:30:56 1.5 +++ cluster/dlm/man/Makefile 2007/12/20 22:09:57 1.6 @@ -27,9 +27,11 @@ install: install -d ${mandir}/man3 - install ${TARGET3} ${mandir}/man3 + for i in ${TARGET3}; do \ + install $(S)/$$i ${mandir}/man3; \ + done install -d ${mandir}/man8 - install ${TARGET8} ${mandir}/man8 + install $(S)/${TARGET8} ${mandir}/man8 uninstall: ${UNINSTALL} ${TARGET3} ${mandir}/man3 --- cluster/dlm/tests/usertest/Makefile 2007/08/28 04:35:40 1.13 +++ cluster/dlm/tests/usertest/Makefile 2007/12/20 22:09:57 1.14 @@ -25,7 +25,7 @@ depends: $(MAKE) -C ../../lib all -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< %: %.o --- cluster/dlm/tool/Makefile 2007/08/28 04:35:40 1.4 +++ cluster/dlm/tool/Makefile 2007/12/20 22:09:57 1.5 @@ -16,17 +16,18 @@ OBJS= main.o -CFLAGS += -I. -I../lib/ -I../../group/dlm_controld/ +CFLAGS += -I${dlmincdir} +CFLAGS += -I$(SRCDIR)/group/dlm_controld/ CFLAGS += -I${incdir} -LDFLAGS += -L../lib -ldlm +LDFLAGS += -L${dlmlibdir} -ldlm all: ${TARGET} ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< clean: --- cluster/fence/Makefile 2007/08/29 03:09:54 1.9 +++ cluster/fence/Makefile 2007/12/20 22:09:58 1.10 @@ -14,4 +14,4 @@ include ../make/defines.mk include ../make/passthrough.mk -SUBDIRS=agents fence_node fence_tool fenced man +SUBDIRS=agents fenced fence_node fence_tool man --- cluster/fence/agents/ipmilan/Makefile 2007/08/30 18:33:11 1.8 +++ cluster/fence/agents/ipmilan/Makefile 2007/12/20 22:09:58 1.9 @@ -25,7 +25,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/fence/agents/manual/Makefile 2007/05/03 16:55:52 1.11 +++ cluster/fence/agents/manual/Makefile 2007/12/20 22:09:58 1.12 @@ -20,7 +20,7 @@ # Using manual override instead of the binary version. # (this version does not require any configuration params # in cluster.conf, but fencing must fail first) -fence_ack_manual: fence_ack_manual.sh +fence_ack_manual: $(S)/fence_ack_manual.sh cp $< $@ install: all --- cluster/fence/agents/rackswitch/Makefile 2007/08/22 08:58:39 1.6 +++ cluster/fence/agents/rackswitch/Makefile 2007/12/20 22:09:58 1.7 @@ -24,7 +24,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/fence/agents/rps10/Makefile 2007/08/22 08:58:40 1.6 +++ cluster/fence/agents/rps10/Makefile 2007/12/20 22:09:58 1.7 @@ -24,7 +24,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/fence/agents/scsi/Makefile 2007/09/21 01:07:50 1.14 +++ cluster/fence/agents/scsi/Makefile 2007/12/20 22:09:58 1.15 @@ -17,22 +17,22 @@ all: $(TARGET) $(TARGET)_test -$(TARGET): $(TARGET).pl +$(TARGET): : > $(TARGET) - awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(TARGET).pl >> $(TARGET) + awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(S)/$(TARGET).pl >> $(TARGET) echo "\$$RELEASE_VERSION=\"${RELEASE_VERSION}\";" >> $(TARGET) - ${DEF2VAR} ${BUILDDIR}/config/copyright.cf perl REDHAT_COPYRIGHT >> $(TARGET) + ${DEF2VAR} ${SRCDIR}/config/copyright.cf perl REDHAT_COPYRIGHT >> $(TARGET) echo "\$$BUILD_DATE=\"(built `date`)\";" >> $(TARGET) - awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(TARGET).pl >> $(TARGET) + awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(S)/$(TARGET).pl >> $(TARGET) chmod +x $(TARGET) -$(TARGET)_test: $(TARGET)_test.pl +$(TARGET)_test: : > $(TARGET)_test - awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(TARGET)_test.pl >> $(TARGET)_test + awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(S)/$(TARGET)_test.pl >> $(TARGET)_test echo "\$$RELEASE_VERSION=\"${RELEASE_VERSION}\";" >> $(TARGET)_test - ${DEF2VAR} ${BUILDDIR}/config/copyright.cf perl REDHAT_COPYRIGHT >> $(TARGET)_test + ${DEF2VAR} ${SRCDIR}/config/copyright.cf perl REDHAT_COPYRIGHT >> $(TARGET)_test echo "\$$BUILD_DATE=\"(built `date`)\";" >> $(TARGET)_test - awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(TARGET)_test.pl >> $(TARGET)_test + awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(S)/$(TARGET)_test.pl >> $(TARGET)_test chmod +x $(TARGET)_test install: all @@ -43,7 +43,7 @@ if [ ! -d ${DESTDIR}/etc/init.d ]; then \ install -d ${DESTDIR}/etc/init.d; \ fi - install -m755 ${SCRIPT} ${DESTDIR}/etc/init.d + install -m755 $(S)/${SCRIPT} ${DESTDIR}/etc/init.d uninstall: ${UNINSTALL} ${TARGET} ${TARGET}_test ${sbindir} --- cluster/fence/agents/xvm/Makefile 2007/08/28 04:35:40 1.15 +++ cluster/fence/agents/xvm/Makefile 2007/12/20 22:09:58 1.16 @@ -60,10 +60,10 @@ ${TARGET3}: ${OBJS3} $(CC) -o $@ $^ $(XML_LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< -%-standalone.o: %.c +%-standalone.o: $(S)/%.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< clean: --- cluster/fence/fence_node/Makefile 2007/08/28 04:35:40 1.10 +++ cluster/fence/fence_node/Makefile 2007/12/20 22:09:58 1.11 @@ -31,7 +31,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/fence/fence_tool/Makefile 2007/08/28 04:35:42 1.17 +++ cluster/fence/fence_tool/Makefile 2007/12/20 22:09:58 1.18 @@ -20,7 +20,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -I${ccsincdir} -I${cmanincdir} -CFLAGS += -I../include -I../../group/lib +CFLAGS += -I$(S)/../include -I$(SRCDIR)/group/lib CFLAGS += -I${incdir} LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lccs -lcman @@ -31,7 +31,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/fence/fenced/Makefile 2007/11/12 08:02:11 1.13 +++ cluster/fence/fenced/Makefile 2007/12/20 22:09:59 1.14 @@ -23,7 +23,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -I${ccsincdir} -I${cmanincdir} -CFLAGS += -I. -I../include -I../../group/lib +CFLAGS += -I$(S) -I$(S)/../include -I$(SRCDIR)/group/lib CFLAGS += -I${incdir} LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lccs -lcman @@ -34,7 +34,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/fence/man/Makefile 2007/04/30 11:22:11 1.11 +++ cluster/fence/man/Makefile 2007/12/20 22:09:59 1.12 @@ -43,7 +43,9 @@ install: install -d ${mandir}/man8 - install ${TARGET8} ${mandir}/man8 + for i in ${TARGET8}; do \ + install $(S)/$$i ${mandir}/man8; \ + done uninstall: ${UNINSTALL} ${TARGET8} ${mandir}/man8 --- cluster/gfs/gfs_debug/Makefile 2007/08/28 04:35:42 1.10 +++ cluster/gfs/gfs_debug/Makefile 2007/12/20 22:09:59 1.11 @@ -24,7 +24,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 CFLAGS += -I${gfskincdir} -CFLAGS += -I../include +CFLAGS += -I$(S)/../include CFLAGS += -I${incdir} all: ${TARGET} @@ -32,7 +32,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gfs/gfs_edit/Makefile 2007/08/22 08:58:43 1.10 +++ cluster/gfs/gfs_edit/Makefile 2007/12/20 22:09:59 1.11 @@ -20,7 +20,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 CFLAGS += -I${gfskincdir} -I${ncursesincdir} -CFLAGS += -I../include +CFLAGS += -I$(S)/../include CFLAGS += -I${incdir} LDFLAGS += -L${ncurseslibdir} -lncurses @@ -30,7 +30,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gfs/gfs_fsck/Makefile 2007/08/28 04:35:42 1.13 +++ cluster/gfs/gfs_fsck/Makefile 2007/12/20 22:09:59 1.14 @@ -48,7 +48,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM CFLAGS += -MMD -CFLAGS += -I../include +CFLAGS += -I$(S)/../include CFLAGS += -I${incdir} all: ${TARGET1} ${TARGET2} @@ -59,7 +59,7 @@ ${TARGET2}: ${TARGET1} ln -s ${TARGET1} ${TARGET2} -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< test_block_list: block_list.o bitmap.o log.o test_block_list.o @@ -76,7 +76,7 @@ install -d ${sbindir}; \ fi install -m755 ${TARGET1} ${sbindir} - ln -sf ${sbindir}/${TARGET1} ${sbindir}/${TARGET2} + cd ${sbindir}; ln -sf ${TARGET1} ${TARGET2} uninstall: ${UNINSTALL} ${TARGET1} ${TARGET2} ${sbindir} --- cluster/gfs/gfs_grow/Makefile 2007/08/22 08:58:43 1.11 +++ cluster/gfs/gfs_grow/Makefile 2007/12/20 22:09:59 1.12 @@ -20,7 +20,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 CFLAGS += -I${gfskincdir} -CFLAGS += -I../include -I../libgfs +CFLAGS += -I$(S)/../include -I$(S)/../libgfs CFLAGS += -I${incdir} LDFLAGS += -L../libgfs -lgfs @@ -30,7 +30,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/gfs/gfs_jadd/Makefile 2007/08/22 08:58:43 1.11 +++ cluster/gfs/gfs_jadd/Makefile 2007/12/20 22:09:59 1.12 @@ -20,7 +20,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 CFLAGS += -I${gfskincdir} -CFLAGS += -I../include -I../libgfs +CFLAGS += -I$(S)/../include -I$(S)/../libgfs CFLAGS += -I${incdir} LDFLAGS += -L../libgfs -lgfs @@ -30,7 +30,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/gfs/gfs_mkfs/Makefile 2007/08/28 04:35:42 1.12 +++ cluster/gfs/gfs_mkfs/Makefile 2007/12/20 22:09:59 1.13 @@ -25,7 +25,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 CFLAGS += -I${gfskincdir} -I${volidincdir} -CFLAGS += -I../include -I../libgfs +CFLAGS += -I$(S)/../include -I$(S)/../libgfs CFLAGS += -I${incdir} LDFLAGS += -L${volidlibdir} -lvolume_id @@ -39,7 +39,7 @@ ${TARGET2}: ${TARGET1} ln -sf ${TARGET1} ${TARGET2} -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/gfs/gfs_quota/Makefile 2007/08/28 04:35:42 1.11 +++ cluster/gfs/gfs_quota/Makefile 2007/12/20 22:09:59 1.12 @@ -23,7 +23,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 CFLAGS += -I${gfskincdir} -CFLAGS += -I../include +CFLAGS += -I$(S)/../include CFLAGS += -I${incdir} all: ${TARGET} @@ -31,7 +31,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gfs/gfs_tool/Makefile 2007/08/28 04:35:43 1.15 +++ cluster/gfs/gfs_tool/Makefile 2007/12/20 22:10:00 1.16 @@ -27,7 +27,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -I${gfskincdir} -CFLAGS += -I../include +CFLAGS += -I$(S)/../include CFLAGS += -I${incdir} all: ${TARGET} @@ -35,7 +35,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gfs/init.d/Makefile 2007/04/30 11:22:14 1.4 +++ cluster/gfs/init.d/Makefile 2007/12/20 22:10:00 1.5 @@ -20,7 +20,7 @@ install: install -d ${DESTDIR}/etc/init.d - install ${TARGET} ${DESTDIR}/etc/init.d + install $(S)/${TARGET} ${DESTDIR}/etc/init.d uninstall: ${UNINSTALL} ${TARGET} ${DESTDIR}/etc/init.d --- cluster/gfs/libgfs/Makefile 2007/11/12 08:17:00 1.11 +++ cluster/gfs/libgfs/Makefile 2007/12/20 22:10:00 1.12 @@ -19,7 +19,7 @@ CFLAGS += -D_GNU_SOURCE -DHELPER_PROGRAM CFLAGS += -c CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I${gfskincdir} -I../include +CFLAGS += -I${gfskincdir} -I$(S)/../include CFLAGS += -I${incdir} OBJS= bio.o \ @@ -44,7 +44,7 @@ ${AR} cru $@ $^ ${RANLIB} $@ -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gfs/man/Makefile 2007/04/30 11:22:14 1.4 +++ cluster/gfs/man/Makefile 2007/12/20 22:10:00 1.5 @@ -29,7 +29,9 @@ install: install -d ${mandir}/man8 - install ${TARGET8} ${mandir}/man8 + for i in ${TARGET8}; do \ + install $(S)/$$i ${mandir}/man8; \ + done uninstall: ${UNINSTALL} ${TARGET8} ${mandir}/man8 --- cluster/gfs/tests/filecon2/Makefile 2007/08/29 02:51:38 1.2 +++ cluster/gfs/tests/filecon2/Makefile 2007/12/20 22:10:01 1.3 @@ -21,7 +21,7 @@ all: $(TARGETS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< %: %.o --- cluster/gfs2/convert/Makefile 2007/08/28 04:35:43 1.12 +++ cluster/gfs2/convert/Makefile 2007/12/20 22:10:01 1.13 @@ -18,7 +18,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I../include -I../libgfs2 +CFLAGS += -I$(S)/../include -I$(S)/../libgfs2 CFLAGS += -I${incdir} LDFLAGS += -L../libgfs2 -lgfs2 @@ -28,7 +28,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/gfs2/edit/Makefile 2007/08/28 04:35:43 1.12 +++ cluster/gfs2/edit/Makefile 2007/12/20 22:10:01 1.13 @@ -22,7 +22,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 CFLAGS += -I${ncursesincdir} CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I../include -I../libgfs2 +CFLAGS += -I$(S)/../include -I$(S)/../libgfs2 CFLAGS += -I${incdir} LDFLAGS += -L${ncurseslibdir} -lncurses @@ -33,7 +33,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/gfs2/fsck/Makefile 2007/08/28 04:35:43 1.16 +++ cluster/gfs2/fsck/Makefile 2007/12/20 22:10:01 1.17 @@ -37,7 +37,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -DHELPER_PROGRAM CFLAGS += -MMD CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I../include -I../libgfs2 +CFLAGS += -I$(S)/../include -I$(S)/../libgfs2 CFLAGS += -I${incdir} LDFLAGS += -L../libgfs2 -lgfs2 @@ -50,7 +50,7 @@ ${TARGET2}: ${TARGET1} ln -fs ${TARGET1} ${TARGET2} -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: @@ -70,7 +70,7 @@ install -d ${sbindir}; \ fi install -m755 ${TARGET1} ${sbindir} - ln -sf ${sbindir}/${TARGET1} ${sbindir}/${TARGET2} + cd ${sbindir}; ln -sf ${TARGET1} ${TARGET2} uninstall: ${UNINSTALL} ${TARGET1} ${TARGET2} ${sbindir} --- cluster/gfs2/init.d/Makefile 2007/04/30 11:22:16 1.4 +++ cluster/gfs2/init.d/Makefile 2007/12/20 22:10:01 1.5 @@ -20,7 +20,7 @@ install: install -d ${DESTDIR}/etc/init.d - install ${TARGET} ${DESTDIR}/etc/init.d + install $(S)/${TARGET} ${DESTDIR}/etc/init.d uninstall: ${UNINSTALL} ${TARGET} ${DESTDIR}/etc/init.d --- cluster/gfs2/libgfs2/Makefile 2007/11/12 08:17:00 1.13 +++ cluster/gfs2/libgfs2/Makefile 2007/12/20 22:10:01 1.14 @@ -17,7 +17,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_GNU_SOURCE CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I../include +CFLAGS += -I$(S)/../include CFLAGS += -I${incdir} OBJS= bitmap.o \ @@ -43,7 +43,7 @@ ${AR} cru $@ $^ ${RANLIB} $@ -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gfs2/man/Makefile 2007/10/08 21:40:32 1.4 +++ cluster/gfs2/man/Makefile 2007/12/20 22:10:01 1.5 @@ -31,7 +31,9 @@ install: install -d ${mandir}/man8 - install ${TARGET8} ${mandir}/man8 + for i in ${TARGET8}; do \ + install $(S)/$$i ${mandir}/man8; \ + done uninstall: ${UNINSTALL} ${TARGET8} ${mandir}/man8 --- cluster/gfs2/mkfs/Makefile 2007/08/28 04:35:43 1.21 +++ cluster/gfs2/mkfs/Makefile 2007/12/20 22:10:02 1.22 @@ -17,7 +17,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_GNU_SOURCE CFLAGS += -I${KERNEL_SRC}/include/ -CFLAGS += -I../include/ -I../libgfs2/ +CFLAGS += -I$(S)/../include -I$(S)/../libgfs2 CFLAGS += -I${incdir} LDFLAGS += -L${volidlibdir} -lvolume_id @@ -37,7 +37,7 @@ ${TARGET4}: ${TARGET1} ln -sf ${TARGET1} ${TARGET4} -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: @@ -45,9 +45,10 @@ install: all install -m 0755 ${TARGET1} ${sbindir} - ln -sf ${sbindir}/${TARGET1} ${sbindir}/${TARGET2} - ln -sf ${sbindir}/${TARGET1} ${sbindir}/${TARGET3} - ln -sf ${sbindir}/${TARGET1} ${sbindir}/${TARGET4} + cd ${sbindir}; \ + ln -sf ${TARGET1} ${TARGET2}; \ + ln -sf ${TARGET1} ${TARGET3}; \ + ln -sf ${TARGET1} ${TARGET4} uninstall: ${UNINSTALL} ${TARGET1} ${TARGET2} ${TARGET3} ${TARGET4} ${sbindir} --- cluster/gfs2/mount/Makefile 2007/11/14 12:33:45 1.19 +++ cluster/gfs2/mount/Makefile 2007/12/20 22:10:02 1.20 @@ -26,7 +26,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS += -I${gfskincdir} CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I../include +CFLAGS += -I$(S)/../include CFLAGS += -I${incdir} all: ${TARGET1} ${TARGET2} @@ -37,7 +37,7 @@ ${TARGET2}: ${SHAREDOBJS} ${OBJS2} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gfs2/quota/Makefile 2007/08/28 04:35:44 1.13 +++ cluster/gfs2/quota/Makefile 2007/12/20 22:10:02 1.14 @@ -21,7 +21,7 @@ CFLAGS += -DHELPER_PROGRAM -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I../include -I../libgfs2/ +CFLAGS += -I$(S)/../include -I$(S)/../libgfs2 CFLAGS += -I${incdir} LDFLAGS += -L../libgfs2 -lgfs2 @@ -31,7 +31,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/gfs2/tool/Makefile 2007/11/13 17:03:41 1.15 +++ cluster/gfs2/tool/Makefile 2007/12/20 22:10:02 1.16 @@ -26,7 +26,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -I${KERNEL_SRC}/fs/gfs2/ -I${KERNEL_SRC}/include/ -CFLAGS += -I../include -I../libgfs2/ +CFLAGS += -I$(S)/../include -I$(S)/../libgfs2 CFLAGS += -I${incdir} LDFLAGS += -L../libgfs2 -lgfs2 @@ -36,7 +36,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/gnbd/client/Makefile 2007/08/28 04:35:44 1.15 +++ cluster/gnbd/client/Makefile 2007/12/20 22:10:02 1.16 @@ -26,7 +26,7 @@ ../utils/gnbd_utils.o CFLAGS += -I${gnbdkincdir} -I${cmanincdir} -CFLAGS += -I../include -I../server -I../utils +CFLAGS += -I$(S)/../include -I$(S)/../server -I$(S)/../utils CFLAGS += -I${incdir} LDFLAGS += -L${libdir} -L${cmanlibdir} -lcman -ldl -lpthread @@ -39,7 +39,7 @@ ${TARGET2}: ${SHAREDOBJS} ${OBJS2} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gnbd/man/Makefile 2007/04/30 11:22:18 1.4 +++ cluster/gnbd/man/Makefile 2007/12/20 22:10:02 1.5 @@ -26,7 +26,9 @@ install: install -d ${mandir}/man8 - install ${TARGET8} ${mandir}/man8 + for i in ${TARGET8}; do \ + install $(S)/$$i ${mandir}/man8; \ + done uninstall: ${UNINSTALL} ${TARGET8} ${mandir}/man8 --- cluster/gnbd/server/Makefile 2007/08/28 04:35:44 1.15 +++ cluster/gnbd/server/Makefile 2007/12/20 22:10:02 1.16 @@ -31,7 +31,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CFLAGS += -I${gnbdkincdir} -I${cmanincdir} -CFLAGS += -I../include -I../utils +CFLAGS += -I$(S)/../include -I$(S)/../utils CFLAGS += -I${incdir} LDFLAGS+= -L${libdir} -L${cmanlibdir} -lcman -ldl -lpthread @@ -44,7 +44,7 @@ ${TARGET2}: ${SHAREDOBJS} ${OBJS2} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gnbd/tools/fence_gnbd/Makefile 2007/08/22 08:58:47 1.6 +++ cluster/gnbd/tools/fence_gnbd/Makefile 2007/12/20 22:10:03 1.7 @@ -17,7 +17,7 @@ OBJS= main.o -CFLAGS += -I../../include -I../../tools/gnbd_import +CFLAGS += -I$(S)/../../include -I$(S)/../gnbd_import CFLAGS += -I${incdir} all: ${TARGET} @@ -25,7 +25,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gnbd/tools/gnbd_export/Makefile 2007/08/28 04:35:44 1.16 +++ cluster/gnbd/tools/gnbd_export/Makefile 2007/12/20 22:10:03 1.17 @@ -21,7 +21,7 @@ CFLAGS += -DDEFAULT_GETUID=\"${sbindir}/gnbd_get_uid\" CFLAGS += -I${gnbdkincdir} -I${cmanincdir} -CFLAGS += -I../../include -I../../server -I../../utils +CFLAGS += -I$(S)/../../include -I$(S)/../../server -I$(S)/../../utils CFLAGS += -I${incdir} LDFLAGS += -L${libdir} -L${cmanlibdir} -lcman -ldl -lpthread @@ -31,7 +31,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all @@ -39,7 +39,7 @@ install -d ${sbindir}; \ fi install -m755 ${TARGET} ${sbindir} - install -m755 gnbd_get_uid ${sbindir} + install -m755 $(S)/gnbd_get_uid ${sbindir} uninstall: ${UNINSTALL} ${TARGET} gnbd_get_uid ${sbindir} --- cluster/gnbd/tools/gnbd_import/Makefile 2007/08/28 04:35:44 1.13 +++ cluster/gnbd/tools/gnbd_import/Makefile 2007/12/20 22:10:03 1.14 @@ -21,7 +21,8 @@ ../../utils/trans.o CFLAGS += -I${gnbdkincdir} -I${cmanincdir} -CFLAGS += -I../../include -I../../client -I../../server -I../../utils +CFLAGS += -I$(S)/../../include -I$(S)/../../server +CFLAGS += -I$(S)/../../utils -I$(S)/../../client CFLAGS += -I${incdir} LDFLAGS += -L${libdir} -L${cmanlibdir} -lcman -ldl -lpthread @@ -31,7 +32,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/gnbd/utils/Makefile 2007/04/30 11:22:19 1.1 +++ cluster/gnbd/utils/Makefile 2007/12/20 22:10:03 1.2 @@ -13,7 +13,17 @@ include ../../make/defines.mk -all: +SHAREDOBJS= member_cman.o \ + trans.o \ + gnbd_utils.o + +CFLAGS += -I${cmanincdir} +CFLAGS += -I$(S)/../include + +all: ${SHAREDOBJS} + +%.o: $(S)/%.c + $(CC) $(CFLAGS) -c -o $@ $< install: --- cluster/group/daemon/Makefile 2007/08/28 04:35:44 1.21 +++ cluster/group/daemon/Makefile 2007/12/20 22:10:03 1.22 @@ -21,7 +21,7 @@ main.o CFLAGS += -I${cmanincdir} -I${openaisincdir} -CFLAGS += -I. -I../include/ -I../lib/ +CFLAGS += -I$(S) -I$(S)/../include/ -I$(S)/../lib/ CFLAGS += -I${incdir} LDFLAGS += -L${cmanlibdir} -L${openaislibdir} -L${libdir} -lcman -lcpg @@ -31,7 +31,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< clean: --- cluster/group/dlm_controld/Makefile 2007/08/28 04:35:45 1.12 +++ cluster/group/dlm_controld/Makefile 2007/12/20 22:10:03 1.13 @@ -22,7 +22,7 @@ CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${dlmincdir} -I${openaisincdir} CFLAGS += -I${KERNEL_SRC}/include/ -CFLAGS += -I../../group/lib/ -I../include/ +CFLAGS += -I$(S)/../lib/ -I$(S)/../include/ CFLAGS += -I${incdir} LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -L${dlmlibdir} -lccs -lcman -ldlm @@ -34,7 +34,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/group/gfs_controld/Makefile 2007/08/28 04:35:45 1.14 +++ cluster/group/gfs_controld/Makefile 2007/12/20 22:10:03 1.15 @@ -23,7 +23,7 @@ CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${openaisincdir} CFLAGS += -I${KERNEL_SRC}/include/ -CFLAGS += -I../include/ -I../lib/ +CFLAGS += -I$(S)/../lib/ -I$(S)/../include/ CFLAGS += -I${incdir} LDFLAGS += -L${ccslibdir} -L${cmanlibdir} -lcman -lccs @@ -37,7 +37,7 @@ $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/group/lib/Makefile 2007/11/12 08:17:00 1.8 +++ cluster/group/lib/Makefile 2007/12/20 22:10:03 1.9 @@ -16,7 +16,7 @@ STATICLIB=$(TARGET).a CFLAGS += -fPIC -CFLAGS += -I. -I../daemon +CFLAGS += -I$(S) -I$(S)/../daemon CFLAGS += -I${incdir} all: $(STATICLIB) @@ -25,7 +25,7 @@ ${AR} r $@ $^ ${RANLIB} $@ -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< install: all --- cluster/group/man/Makefile 2007/08/17 18:52:27 1.1 +++ cluster/group/man/Makefile 2007/12/20 22:10:04 1.2 @@ -24,7 +24,9 @@ install: install -d ${mandir}/man8 - install ${TARGET8} ${mandir}/man8 + for i in ${TARGET8}; do \ + install $(S)/$$i ${mandir}/man8; \ + done uninstall: ${UNINSTALL} ${TARGET8} ${mandir}/man8 --- cluster/group/test/Makefile 2007/08/29 02:52:45 1.3 +++ cluster/group/test/Makefile 2007/12/20 22:10:04 1.4 @@ -16,7 +16,7 @@ all: $(TARGETS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< %: %.o --- cluster/group/tool/Makefile 2007/08/28 04:35:45 1.11 +++ cluster/group/tool/Makefile 2007/12/20 22:10:04 1.12 @@ -16,7 +16,7 @@ OBJS= main.o -CFLAGS += -I. -I../lib/ -I../daemon/ +CFLAGS += -I$(S) -I$(S)/../daemon/ -I$(S)/../lib/ CFLAGS += -I${incdir} LDFLAGS += -L../lib -lgroup @@ -26,7 +26,7 @@ ${TARGET}: ${OBJS} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: --- cluster/make/defines.mk.input 2007/12/07 00:53:44 1.8 +++ cluster/make/defines.mk.input 2007/12/20 22:10:04 1.9 @@ -27,10 +27,11 @@ AR = ar RANLIB = ranlib -CFLAGS += @CFLAGS@ -I at BUILDDIR@/config +CFLAGS += @CFLAGS@ -I@SRCDIR@/config LDFLAGS += @LDFLAGS@ -BUILDDIR = @BUILDDIR@ +SRCDIR = @SRCDIR@ +OBJDIR = @OBJDIR@ KERNEL_BUILD = @KERNEL_BUILD@ KERNEL_SRC = @KERNEL_SRC@ @@ -76,6 +77,9 @@ without_gnbd ?= @DISABLE_GNBD@ without_rgmanager ?= @DISABLE_RGMANAGER@ -UNINSTALL = @BUILDDIR@/scripts/uninstall.pl -DEF2VAR = @BUILDDIR@/scripts/define2var +THISDIR = $(shell echo $(CURDIR) | sed -e 's|$(OBJDIR)/||g') +S=$(SRCDIR)/$(THISDIR) + +UNINSTALL = @SRCDIR@/scripts/uninstall.pl +DEF2VAR = @SRCDIR@/scripts/define2var --- cluster/make/fenceperl.mk 2007/08/30 18:40:37 1.1 +++ cluster/make/fenceperl.mk 2007/12/20 22:10:04 1.2 @@ -13,13 +13,13 @@ all: $(TARGET) -$(TARGET): $(TARGET).pl +$(TARGET): : > $(TARGET) - awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(TARGET).pl >> $(TARGET) + awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(S)/$(TARGET).pl >> $(TARGET) echo "\$$RELEASE_VERSION=\"${RELEASE_VERSION}\";" >> $(TARGET) - ${DEF2VAR} ${BUILDDIR}/config/copyright.cf perl REDHAT_COPYRIGHT >> $(TARGET) + ${DEF2VAR} ${SRCDIR}/config/copyright.cf perl REDHAT_COPYRIGHT >> $(TARGET) echo "\$$BUILD_DATE=\"(built `date`)\";" >> $(TARGET) - awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(TARGET).pl >> $(TARGET) + awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(S)/$(TARGET).pl >> $(TARGET) chmod +x $(TARGET) install: all --- cluster/make/fencepy.mk 2007/08/30 18:41:31 1.1 +++ cluster/make/fencepy.mk 2007/12/20 22:10:04 1.2 @@ -2,11 +2,11 @@ $(TARGET): : > $(TARGET) - awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(TARGET).py >> $(TARGET) + awk "{print}(\$$1 ~ /#BEGIN_VERSION_GENERATION/){exit 0}" $(S)/$(TARGET).py >> $(TARGET) echo "RELEASE_VERSION=\"${RELEASE_VERSION}\";" >> $(TARGET) - ${DEF2VAR} ${BUILDDIR}/config/copyright.cf sh REDHAT_COPYRIGHT >> $(TARGET) + ${DEF2VAR} ${SRCDIR}/config/copyright.cf sh REDHAT_COPYRIGHT >> $(TARGET) echo "BUILD_DATE=\"(built `date`)\";" >> $(TARGET) - awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(TARGET).py >> $(TARGET) + awk -v p=0 "(\$$1 ~ /#END_VERSION_GENERATION/){p = 1} {if(p==1)print}" $(S)/$(TARGET).py >> $(TARGET) chmod +x $(TARGET) install: all --- cluster/rgmanager/init.d/Makefile 2007/04/30 11:22:22 1.3 +++ cluster/rgmanager/init.d/Makefile 2007/12/20 22:10:04 1.4 @@ -22,7 +22,7 @@ install: install -d ${DESTDIR}/etc/init.d - install ${TARGET} ${DESTDIR}/etc/init.d + install $(S)/${TARGET} ${DESTDIR}/etc/init.d uninstall: ${UNINSTALL} ${TARGET} ${DESTDIR}/etc/init.d --- cluster/rgmanager/man/Makefile 2007/04/30 11:22:22 1.6 +++ cluster/rgmanager/man/Makefile 2007/12/20 22:10:04 1.7 @@ -24,7 +24,9 @@ install: install -d ${mandir}/man8 - install ${TARGETS} ${mandir}/man8 + for i in ${TARGET8}; do \ + install $(S)/$$i ${mandir}/man8; \ + done uninstall: ${UNINSTALL} ${TARGETS} ${mandir}/man8 --- cluster/rgmanager/src/clulib/Makefile 2007/11/30 21:36:28 1.19 +++ cluster/rgmanager/src/clulib/Makefile 2007/12/20 22:10:05 1.20 @@ -27,7 +27,7 @@ CFLAGS += -Werror -Wstrict-prototypes -Wshadow -fPIC -D_GNU_SOURCE CFLAGS += -I${cmanincdir} -I${dlmincdir} -CFLAGS += -I../../include +CFLAGS += -I$(S)/../../include CFLAGS += -I${incdir} LDFLAGS += -L${cmanlibdir} -lcman @@ -51,7 +51,7 @@ ${TARGET3}: ${OBJS3} ${TARGET1} $(CC) -o $@ $^ $(LDFLAGS) -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< clean: --- cluster/rgmanager/src/daemons/Makefile 2007/12/07 00:53:44 1.26 +++ cluster/rgmanager/src/daemons/Makefile 2007/12/20 22:10:05 1.27 @@ -56,7 +56,7 @@ CFLAGS += -Werror -Wstrict-prototypes -Wshadow -fPIC CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${dlmincdir} CFLAGS += `xml2-config --cflags` -I${readlineincdir} -I${slangincdir} -CFLAGS += -I../../include +CFLAGS += -I$(S)/../../include CFLAGS += -I${incdir} EXTRA_CFLAGS += -DNO_CCS @@ -110,10 +110,10 @@ check: rg_test cd tests && ./runtests.sh -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< -%-noccs.o: %.c +%-noccs.o: $(S)/%.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< depends: --- cluster/rgmanager/src/resources/Makefile 2007/11/30 21:36:29 1.21 +++ cluster/rgmanager/src/resources/Makefile 2007/12/20 22:10:05 1.22 @@ -36,10 +36,15 @@ echo ${sbindir} install -d ${sharedir} install -d ${sharedir}/utils - install $(RESOURCES) ${sharedir} - install -m 644 $(TARGETS) ${sharedir} - install $(UTIL_TARGETS) ${sharedir}/utils - install -m 644 $(METADATA) ${sharedir} + for i in $(RESOURCES); do \ + install $(S)/$$i ${sharedir}; \ + done + for i in $(TARGETS) $(METADATA); do \ + install -m 644 $(S)/$$i ${sharedir}; \ + done + for i in $(UTIL_TARGETS); do \ + install $(S)/$$i ${sharedir}/utils; \ + done uninstall: ${UNINSTALL} ${TARGETS} ${METADATA} ${UTIL_TARGETS} ${sharedir} --- cluster/rgmanager/src/utils/Makefile 2007/08/28 04:35:47 1.19 +++ cluster/rgmanager/src/utils/Makefile 2007/12/20 22:10:05 1.20 @@ -23,7 +23,7 @@ CFLAGS += -Werror -Wstrict-prototypes -Wshadow -fPIC -D_GNU_SOURCE CFLAGS += -I${ccsincdir} -I${cmanincdir} -I${dlmincdir} -I${ncursesincdir} -CFLAGS += -I../../include +CFLAGS += -I$(S)/../../include CFLAGS += -I${incdir} LDFLAGS += -L${libdir} -L${ccslibdir} -L${cmanlibdir} -L${ncurseslibdir} @@ -47,11 +47,11 @@ ${TARGET5}: ${TARGET5:=.o} $(CC) -o $@ $^ $(LDFLAGS) -${TARGET6}: ${TARGET6}.sh - cp ${TARGET6}.sh ${TARGET6} +${TARGET6}: + cp $(S)/${TARGET6}.sh ${TARGET6} chmod 755 ${TARGET6} -%.o: %.c +%.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< depends: