cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: fabbione@sourceware.org <fabbione@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster configure
Date: 21 Dec 2007 07:28:38 -0000	[thread overview]
Message-ID: <20071221072838.21730.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	fabbione at sourceware.org	2007-12-21 07:28:37

Modified files:
	.              : configure 

Log message:
	Minor objdir rework to extend flexibility.
	
	the first shot of objdir implementation implied that you did:
	
	cd cluster
	./configure --objdir... etc.
	cd /path/to/objdir
	make
	
	now you can:
	
	mkdir objdir
	cd objdir
	/path/to/configure
	make
	
	NOTE: in this case you don't need to specify objdir. it will be automatically
	set up for you.
	
	As a nice side effect you can also be anywhere on the fs and do:
	
	/path/to/configure --objdir=/path/to/obj
	cd /path/to/obj
	make
	
	and it will work.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/configure.diff?cvsroot=cluster&r1=1.44&r2=1.45

--- cluster/configure	2007/12/21 05:58:34	1.44
+++ cluster/configure	2007/12/21 07:28:37	1.45
@@ -296,7 +296,7 @@
     $dirname = dirname($_);
     $filename = basename($_);
     system("mkdir -p $objdir/$dirname");
-    symlink("${pwd}/$_","$objdir/$dirname/$filename");
+    symlink("${cdir}/$_","$objdir/$dirname/$filename");
   }
   close IFILE;
   return 0;
@@ -330,22 +330,27 @@
   $prefix="/usr";
 }
 
+print "\nChecking tree: ";
 if (!$objdir) {
   $objdir="${pwd}";
+}
+$objdir = abs_path( $objdir );
+$cdir = dirname ( abs_path( $0 ) );
+unless ("$cdir" eq "$objdir") {
+  chdir "$cdir";
+}
+
+if (! -d "$objdir/make") {
+  print "setting up $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 {
-  $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";
-  }
+  print "nothing to do\n";
 }
 
 my @un = POSIX::uname();
@@ -370,10 +375,10 @@
   $module_dir="/lib/modules/$un[2]/kernel";
 }
 if (!$gfskincdir) {
-  $gfskincdir="${pwd}/gfs-kernel/src/gfs";
+  $gfskincdir="${cdir}/gfs-kernel/src/gfs";
 }
 if (!$gnbdkincdir) {
-  $gnbdkincdir="${pwd}/gnbd-kernel/src";
+  $gnbdkincdir="${cdir}/gnbd-kernel/src";
 }
 if (!$incdir) {
   $incdir="${prefix}/include";
@@ -382,19 +387,19 @@
   $libdir="${prefix}/lib";
 }
 if (!$ccsincdir) {
-  $ccsincdir="${pwd}/ccs/lib";
+  $ccsincdir="${cdir}/ccs/lib";
 }
 if (!$ccslibdir) {
   $ccslibdir="${objdir}/ccs/lib";
 }
 if (!$cmanincdir) {
-  $cmanincdir="${pwd}/cman/lib";
+  $cmanincdir="${cdir}/cman/lib";
 }
 if (!$cmanlibdir) {
   $cmanlibdir="${objdir}/cman/lib";
 }
 if (!$dlmincdir) {
-  $dlmincdir="${pwd}/dlm/lib";
+  $dlmincdir="${cdir}/dlm/lib";
 }
 if (!$dlmlibdir) {
   $dlmlibdir="${objdir}/dlm/lib";
@@ -538,7 +543,7 @@
 
 while (<IFILE>) {
   chomp;
-  $_ =~ s/\@SRCDIR\@/$pwd/;
+  $_ =~ s/\@SRCDIR\@/$cdir/;
   $_ =~ s/\@CC\@/$cc/;
   $_ =~ s/\@CFLAGS\@/$cflags/;
   $_ =~ s/\@LDFLAGS\@/$ldflags/;



             reply	other threads:[~2007-12-21  7:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21  7:28 fabbione [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-01-28  6:43 [Cluster-devel] cluster configure fabbione
2008-01-07 18:58 lhh
2007-12-21  5:58 fabbione
2007-12-19  5:48 fabbione
2007-12-06 10:38 pcaulfield
2007-11-24  4:57 fabbione
2007-10-26 19:18 rmccabe
2007-10-01  3:28 fabbione
2007-09-28  6:19 fabbione
2007-09-24 14:43 fabbione
2007-09-14 14:32 teigland
2007-09-06 16:26 teigland
2007-09-06 16:24 teigland
2007-06-06  8:42 fabbione
2007-05-21 10:16 pcaulfield
2006-10-05 16:50 teigland
2006-08-02 22:47 rpeterso
2006-07-19 17:13 teigland
2006-07-19 14:51 teigland
2006-07-19 14:04 rpeterso
2006-06-28 19:54 jbrassow
2006-06-14 20:44 cfeist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071221072838.21730.qmail@sourceware.org \
    --to=fabbione@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).