add symlink for "machine"
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Wed, 14 Jan 1987 03:07:31 +0000 (19:07 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Wed, 14 Jan 1987 03:07:31 +0000 (19:07 -0800)
SCCS-vsn: usr.sbin/config/main.c 5.4

usr/src/usr.sbin/config/main.c

index cfcb473..d72ac93 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     5.4 (Berkeley) %G%";
 #endif not lint
 
 #include <stdio.h>
 #endif not lint
 
 #include <stdio.h>
@@ -61,7 +61,18 @@ main(argc, argv)
                printf("Specify machine type, e.g. ``machine vax''\n");
                exit(1);
        }
                printf("Specify machine type, e.g. ``machine vax''\n");
                exit(1);
        }
-       symlink("../h", path("sys"));   /* make genassym.c work */
+       /*
+        * make symbolic links in compilation directory
+        * for "sys" (to make genassym.c work along with #include <sys/xxx>)
+        * and similarly for "machine".
+        */
+       {
+       char xxx[80];
+
+       (void) symlink("../h", path("sys"));    
+       sprintf(xxx, "../%s", machinename);
+       (void) symlink(xxx, path("machine"));
+       }
        makefile();                     /* build Makefile */
        headers();                      /* make a lot of .h files */
        swapconf();                     /* swap config files */
        makefile();                     /* build Makefile */
        headers();                      /* make a lot of .h files */
        swapconf();                     /* swap config files */