From c388f51ab412a577c0e007c952249b8b2a647e56 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 10 Oct 2012 14:47:46 +0000 Subject: [PATCH] - Fix the error message when a dependency string is not provided to reference a missing dependency rather than a missing compile command. - Don't append a newline to the auto-generated compile command. The compile command has a newline appended when it is later output to the Makefile. MFC after: 2 weeks --- usr.sbin/config/mkmakefile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 8a7f55af6efb..324ad3b7bfbe 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -431,7 +431,7 @@ read_file(char *fname) next_quoted_word(fp, wd); if (wd == 0) { fprintf(stderr, - "%s: %s missing compile command string.\n", + "%s: %s missing dependency string.\n", fname, this); exit(1); } @@ -762,7 +762,7 @@ do_rules(FILE *f) break; } snprintf(cmd, sizeof(cmd), - "${%s_%c%s}\n", ftype, + "${%s_%c%s}", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd;