Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config Fix build.
details: https://anonhg.NetBSD.org/src/rev/d939d36f715b
branches: trunk
changeset: 340370:d939d36f715b
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Tue Sep 01 20:18:41 2015 +0000
description:
Fix build.
diffstat:
usr.bin/config/mkmakefile.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (58 lines):
diff -r bc38b8dc2284 -r d939d36f715b usr.bin/config/mkmakefile.c
--- a/usr.bin/config/mkmakefile.c Tue Sep 01 19:58:57 2015 +0000
+++ b/usr.bin/config/mkmakefile.c Tue Sep 01 20:18:41 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkmakefile.c,v 1.55 2015/09/01 16:01:23 uebayasi Exp $ */
+/* $NetBSD: mkmakefile.c,v 1.56 2015/09/01 20:18:41 uebayasi Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: mkmakefile.c,v 1.55 2015/09/01 16:01:23 uebayasi Exp $");
+__RCSID("$NetBSD: mkmakefile.c,v 1.56 2015/09/01 20:18:41 uebayasi Exp $");
#include <sys/param.h>
#include <ctype.h>
@@ -298,14 +298,14 @@
static void
emitfile(FILE *fp, struct files *fi)
{
- const char *srcdir = "$S/";
+ const char *defprologue = "$S/";
const char *prologue, *prefix, *sep;
if (Sflag)
- srcdir = "";
+ defprologue = "";
prologue = prefix = sep = "";
if (*fi->fi_path != '/') {
- prologue = srcdir;
+ prologue = defprologue;
if (fi->fi_prefix != NULL) {
if (*fi->fi_prefix == '/')
prologue = "";
@@ -319,13 +319,20 @@
static void
emitobjs(FILE *fp)
{
+ const char *prologue, *prefix, *sep;
struct files *fi;
fputs("OBJS= \\\n", fp);
TAILQ_FOREACH(fi, &allfiles, fi_next) {
+ prologue = prefix = sep = "";
if ((fi->fi_flags & FI_SEL) == 0)
continue;
- fprintf(fp, "\t%s.o \\\n", fi->fi_base);
+ if (fi->fi_buildprefix != NULL) {
+ prefix = fi->fi_buildprefix;
+ sep = "/";
+ }
+ fprintf(fp, "\t%s%s%s%s.o \\\n", prologue, prefix, sep,
+ fi->fi_base);
}
TAILQ_FOREACH(fi, &allofiles, fi_snext) {
if ((fi->fi_flags & FI_SEL) == 0)
Home |
Main Index |
Thread Index |
Old Index