Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: remove dead code for handling traditional...



details:   https://anonhg.NetBSD.org/src/rev/445c80fc2b35
branches:  trunk
changeset: 1027632:445c80fc2b35
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Dec 14 00:45:11 2021 +0000

description:
make: remove dead code for handling traditional include directives

This code is not reached, a line containing only the word "include" is
categorized as error before.

No functional change.

diffstat:

 usr.bin/make/parse.c |  15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diffs (46 lines):

diff -r db9440f5263a -r 445c80fc2b35 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Tue Dec 14 00:38:32 2021 +0000
+++ b/usr.bin/make/parse.c      Tue Dec 14 00:45:11 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.579 2021/12/14 00:17:53 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.580 2021/12/14 00:45:11 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.579 2021/12/14 00:17:53 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.580 2021/12/14 00:45:11 rillig Exp $");
 
 /* types and constants */
 
@@ -2477,18 +2477,9 @@
 
        pp_skip_whitespace(&file);
 
-       /*
-        * Substitute for any variables in the file name before trying to
-        * find the thing.
-        */
        (void)Var_Subst(file, SCOPE_CMDLINE, VARE_WANTRES, &all_files);
        /* TODO: handle errors */
 
-       if (*file == '\0') {
-               Parse_Error(PARSE_FATAL, "Filename missing from \"include\"");
-               goto out;
-       }
-
        for (file = all_files; !done; file = cp + 1) {
                /* Skip to end of line or next whitespace */
                for (cp = file; *cp != '\0' && !ch_isspace(*cp); cp++)
@@ -2501,7 +2492,7 @@
 
                IncludeFile(file, false, false, silent);
        }
-out:
+
        free(all_files);
 }
 #endif



Home | Main Index | Thread Index | Old Index