cvs commit: src/sys/conf kern.post.mk

Ruslan Ermilov ru at FreeBSD.org
Wed Nov 30 18:35:09 GMT 2005


On Wed, Nov 30, 2005 at 06:15:07PM +0000, Ruslan Ermilov wrote:
> ru          2005-11-30 18:15:07 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/conf             kern.post.mk 
>   Log:
>   Teach this to create the "machine" and ${MACHINE_ARCH} (for pc98
>   only now) symbolic links in the kernel compile directory, rather
>   than relying on config(8) to do this.  (The changes to config(8)
>   will be committed separately.)  This is aimed towards making the
>   config(8) as lightweight as possible.
>   
>   Idea by:        bde (all bugs are mine)
>   
>   Revision  Changes    Path
>   1.90      +27 -4     src/sys/conf/kern.post.mk
> 
If you'd like to give it more exposure, please test it along
with the following patch to config(8):

%%%
Index: main.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/config/main.c,v
retrieving revision 1.69
diff -u -p -r1.69 main.c
--- main.c	30 Nov 2005 17:55:49 -0000	1.69
+++ main.c	30 Nov 2005 17:56:08 -0000
@@ -95,7 +95,6 @@ main(int argc, char **argv)
 	struct stat buf;
 	int ch, len;
 	char *p;
-	char xxx[MAXPATHLEN];
 	FILE *fp;
 
 	while ((ch = getopt(argc, argv, "d:gpV")) != -1)
@@ -166,32 +165,6 @@ main(int argc, char **argv)
 		printf("Specify machine type, e.g. ``machine i386''\n");
 		exit(1);
 	}
-	/*
-	 * make symbolic links in compilation directory
-	 * for "sys" (to make genassym.c work along with #include <sys/xxx>)
-	 * and similarly for "machine".
-	 */
-	if (*srcdir == '\0')
-		(void)snprintf(xxx, sizeof(xxx), "../../include");
-	else
-		(void)snprintf(xxx, sizeof(xxx), "%s/%s/include",
-		    srcdir, machinename);
-	(void) unlink(path("machine"));
-	(void) symlink(xxx, path("machine"));
-	if (strcmp(machinename, machinearch) != 0) {
-		/*
-		 * make symbolic links in compilation directory for
-		 * machinearch, if it is different than machinename.
-		 */
-		if (*srcdir == '\0')
-			(void)snprintf(xxx, sizeof(xxx), "../../../%s/include",
-			    machinearch);
-		else
-			(void)snprintf(xxx, sizeof(xxx), "%s/%s/include",
-			    srcdir, machinearch);
-		(void) unlink(path(machinearch));
-		(void) symlink(xxx, path(machinearch));
-	}
 	options();			/* make options .h files */
 	makefile();			/* build Makefile */
 	headers();			/* make a lot of .h files */
%%%


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20051130/49c492b5/attachment.bin


More information about the cvs-src mailing list