From 245a07a0538c56a5962892185f6047675ee37b78 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 1 Apr 2005 22:54:22 +0000 Subject: Allow one to specify a second parameter to the machine line. This allows us to specify the machine_arch as well as machine. If specified then a second link will be made, similar to machine, from $MACHINE_ARCH to $S/$MACHINE_ARCH/include. This is for ports where MACHINE != MACHINE_ARCH (pc98 today, others in the future?). Reviewed by: arch@, nyan@ --- usr.sbin/config/main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'usr.sbin/config/main.c') diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index a2002fb..675d3bb 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -163,6 +163,20 @@ main(int argc, char **argv) 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 */ -- cgit v1.1