Subject: more changes to config
To: None <tech-kern@netbsd.org>
From: Johan Danielsson <joda@pdc.kth.se>
List: tech-kern
Date: 07/13/1999 20:33:42
Don't know where this fits in, but doesn't the following changes make
sense. With this chage I can actually build a kernel without having to
move stuff into the kernel source tree.

/Johan

--- mkmakefile.c	1999/07/11 02:54:10	1.1.1.5
+++ mkmakefile.c	1999/07/13 18:31:11
@@ -337,9 +337,15 @@
 				return (1);
 		} else {
 			if (fi->fi_prefix != NULL) {
+			    if (*fi->fi_prefix == '/') {
+				if (fprintf(fp, "%c%s/%s", sp, fi->fi_prefix,
+					    fi->fi_path) < 0)
+				    return (1);
+			    } else {
 				if (fprintf(fp, "%c$S/%s/%s", sp, fi->fi_prefix,
 				    fi->fi_path) < 0)
 					return (1);
+			    }
 			} else {
 				if (fprintf(fp, "%c$S/%s", sp, fi->fi_path) < 0)
 					return (1);
@@ -396,9 +402,15 @@
 				return (1);
 		} else {
 			if (fi->fi_prefix != NULL) {
+			    if (*fi->fi_prefix == '/') {
+				if (fprintf(fp, "%s.o: %s/%s\n", fi->fi_base,
+				    fi->fi_prefix, fpath) < 0)
+					return (1);
+			    } else {
 				if (fprintf(fp, "%s.o: $S/%s/%s\n", fi->fi_base,
 				    fi->fi_prefix, fpath) < 0)
 					return (1);
+			    }
 			} else {
 				if (fprintf(fp, "%s.o: $S/%s\n", fi->fi_base,
 				    fpath) < 0)
@@ -477,8 +489,13 @@
 	struct prefix *pf;
 
 	for (pf = allprefixes; pf != NULL; pf = pf->pf_next) {
+	    if (*pf->pf_prefix == '/') {
+		if (fprintf(fp, "INCLUDES+=\t-I%s\n", pf->pf_prefix) < 0)
+		    return (1);
+	    } else { 
 		if (fprintf(fp, "INCLUDES+=\t-I$S/%s\n", pf->pf_prefix) < 0)
 			return (1);
+	    }
 	}
 
 	return (0);