Index: head/usr.sbin/config/config.h =================================================================== --- head/usr.sbin/config/config.h +++ head/usr.sbin/config/config.h @@ -54,6 +54,7 @@ char *f_clean; /* File list to add to clean rule */ char *f_warn; /* warning message */ const char *f_objprefix; /* prefix string for object name */ + const char *f_srcprefix; /* source prefix such as $S/ */ }; struct files_name { Index: head/usr.sbin/config/configvers.h =================================================================== --- head/usr.sbin/config/configvers.h +++ head/usr.sbin/config/configvers.h @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600014 +#define CONFIGVERS 600015 #define MAJOR_VERS(x) ((x) / 100000) Index: head/usr.sbin/config/mkmakefile.c =================================================================== --- head/usr.sbin/config/mkmakefile.c +++ head/usr.sbin/config/mkmakefile.c @@ -496,6 +496,10 @@ tp = new_fent(); tp->f_fn = this; tp->f_type = filetype; + if (filetype == LOCAL) + tp->f_srcprefix = ""; + else + tp->f_srcprefix = "$S/"; if (imp_rule) tp->f_flags |= NO_IMPLCT_RULE; if (no_obj) @@ -571,7 +575,8 @@ if (tp->f_flags & NO_IMPLCT_RULE) fprintf(fp, "%s ", tp->f_fn); else - fprintf(fp, "$S/%s ", tp->f_fn); + fprintf(fp, "%s%s ", tp->f_srcprefix, + tp->f_fn); lpos += len + 1; } if (lpos != 8) @@ -636,10 +641,7 @@ lpos = 8; fputs("\\\n\t", fp); } - if (tp->f_type != LOCAL) - fprintf(fp, "$S/%s ", tp->f_fn); - else - fprintf(fp, "%s ", tp->f_fn); + fprintf(fp, "%s%s ", tp->f_srcprefix, tp->f_fn); lpos += len + 1; } free(suff); @@ -685,18 +687,21 @@ else { *cp = '\0'; if (och == 'o') { - fprintf(f, "%s%so:\n\t-cp $S/%so .\n\n", - ftp->f_objprefix, tail(np), np); + fprintf(f, "%s%so:\n\t-cp %s%so .\n\n", + ftp->f_objprefix, tail(np), + ftp->f_srcprefix, np); continue; } if (ftp->f_depends) { - fprintf(f, "%s%so: $S/%s%c %s\n", - ftp->f_objprefix, tail(np), np, och, + fprintf(f, "%s%so: %s%s%c %s\n", + ftp->f_objprefix, tail(np), + ftp->f_srcprefix, np, och, ftp->f_depends); } else { - fprintf(f, "%s%so: $S/%s%c\n", - ftp->f_objprefix, tail(np), np, och); + fprintf(f, "%s%so: %s%s%c\n", + ftp->f_objprefix, tail(np), + ftp->f_srcprefix, np, och); } } compilewith = ftp->f_compilewith; @@ -725,7 +730,8 @@ } *cp = och; if (strlen(ftp->f_objprefix)) - fprintf(f, "\t%s $S/%s\n", compilewith, np); + fprintf(f, "\t%s %s%s\n", compilewith, + ftp->f_srcprefix, np); else fprintf(f, "\t%s\n", compilewith);