[822] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

util/ss building with srcdir not builddir

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Sat Oct 1 08:37:29 1994

From: epeisach@MIT.EDU
Date: Sat, 1 Oct 1994 08:37:25 -0400
To: krb5-bugs@MIT.EDU


When building is a directory other than the source tree
(srcdir=/absolute path), I had mk_cmds blow out in the building of ss...


+ ../../util/ss/mk_cmds /u2/export/krb5/src/util/ss/std_rqs.ct 
cc  -DHAS_STRDUP=1 -DUSE_DIRENT_H=1 -DWAIT_USES_INT=1 -DSTDARG_PROTOTYPES=1 -I. -I/u2/export/krb5/src/util/ss/ -I/u2/export/krb5/src/util/ss/.. -I/u2/export/krb5/src/util/ss/../et -I.. -c std_rqs.c

The problem was that std_rqs.c was put into the source tree - not the
build tree!!

This is a problem with mk_cmds. 
mk_cmds /tmp/foo.ct 

will create /tmp/foo.c not `pwd`/foo.c which is what is required for the
build process. 

I suspect that previous makes by people were using a version of make
where VPATH actually worked (like gmake which I usually used). 

Anyway, the following patch fixes that problem....

It looks like the mk_cmds.sh shell script which exists in the ss sources
but is not used, was going to try and do something similar....

	Ezra

===================================================================
RCS file: /mit/krb5/.cvsroot/src/util/ss/mk_cmds.c,v
retrieving revision 1.3
diff -c -r1.3 mk_cmds.c
*** 1.3	1994/08/18 20:48:38
--- mk_cmds.c	1994/10/01 12:30:53
***************
*** 61,67 ****
  
      p = strrchr(path, '.');
      *p = '\0';
!     strcpy(c_file, path);
      strcat(c_file, ".c");
      *p = '.';
  
--- 61,73 ----
  
      p = strrchr(path, '.');
      *p = '\0';
!     /* Truncate off the path to the input file... */
!     p = strrchr(path, '/');
!     if (p == (char *)NULL)
! 	p = path;
!     else
! 	p++;
!     strcpy(c_file, p);
      strcat(c_file, ".c");
      *p = '.';
  

home help back first fref pref prev next nref lref last post