diff options
Diffstat (limited to 'usr.sbin/config/mkmakefile.c')
-rw-r--r-- | usr.sbin/config/mkmakefile.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 7313f46..1a347e8 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -205,6 +205,8 @@ makefile() do_objs(ofp); else if (eq(line, "%CFILES\n")) do_cfiles(ofp); + else if (eq(line, "%SFILES\n")) + do_sfiles(ofp); else if (eq(line, "%RULES\n")) do_rules(ofp); else if (eq(line, "%LOAD\n")) @@ -583,6 +585,31 @@ do_cfiles(fp) putc('\n', fp); } +do_sfiles(fp) + FILE *fp; +{ + register struct file_list *tp; + register int lpos, len; + + fputs("SFILES=", fp); + lpos = 8; + for (tp = ftab; tp; tp = tp->f_next) + if (tp->f_type != INVISIBLE) { + len = strlen(tp->f_fn); + if (tp->f_fn[len - 1] != 'S' && tp->f_fn[len - 1] != 's') + continue; + if ((len = 3 + len) + lpos > 72) { + lpos = 8; + fputs("\\\n\t", fp); + } + fprintf(fp, "$S/%s ", tp->f_fn); + lpos += len + 1; + } + if (lpos != 8) + putc('\n', fp); +} + + char * tail(fn) char *fn; |