Wed Aug 26 23:00:47 2020 UTC ()
make(1): remove header sprite.h

Make is independent of the Sprite operating system.


(rillig)
diff -r1.93 -r1.94 src/usr.bin/make/Makefile
diff -r1.26 -r1.27 src/usr.bin/make/hash.c
diff -r1.44 -r1.45 src/usr.bin/make/lst.h
diff -r1.126 -r1.127 src/usr.bin/make/make.h
diff -r1.14 -r0 src/usr.bin/make/sprite.h

cvs diff -r1.93 -r1.94 src/usr.bin/make/Makefile (expand / switch to unified diff)

--- src/usr.bin/make/Makefile 2020/08/25 16:39:19 1.93
+++ src/usr.bin/make/Makefile 2020/08/26 23:00:47 1.94
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.93 2020/08/25 16:39:19 rillig Exp $ 1# $NetBSD: Makefile,v 1.94 2020/08/26 23:00:47 rillig Exp $
2# @(#)Makefile 5.2 (Berkeley) 12/28/90 2# @(#)Makefile 5.2 (Berkeley) 12/28/90
3 3
4PROG= make 4PROG= make
5SRCS= arch.c 5SRCS= arch.c
6SRCS+= buf.c 6SRCS+= buf.c
7SRCS+= compat.c 7SRCS+= compat.c
8SRCS+= cond.c 8SRCS+= cond.c
9SRCS+= dir.c 9SRCS+= dir.c
10SRCS+= enum.c 10SRCS+= enum.c
11SRCS+= for.c 11SRCS+= for.c
12SRCS+= hash.c 12SRCS+= hash.c
13SRCS+= job.c 13SRCS+= job.c
14SRCS+= lst.c 14SRCS+= lst.c
@@ -27,27 +27,26 @@ SRCS+= util.c @@ -27,27 +27,26 @@ SRCS+= util.c
27HDRS= buf.h 27HDRS= buf.h
28HDRS+= config.h 28HDRS+= config.h
29HDRS+= dir.h 29HDRS+= dir.h
30HDRS+= enum.h 30HDRS+= enum.h
31HDRS+= hash.h 31HDRS+= hash.h
32HDRS+= job.h 32HDRS+= job.h
33HDRS+= lst.h 33HDRS+= lst.h
34HDRS+= make.h 34HDRS+= make.h
35HDRS+= make_malloc.h 35HDRS+= make_malloc.h
36HDRS+= meta.h 36HDRS+= meta.h
37HDRS+= metachar.h 37HDRS+= metachar.h
38HDRS+= nonints.h 38HDRS+= nonints.h
39HDRS+= pathnames.h 39HDRS+= pathnames.h
40HDRS+= sprite.h 
41HDRS+= strlist.h 40HDRS+= strlist.h
42HDRS+= trace.h 41HDRS+= trace.h
43 42
44# Whether to generate a coverage report after running the tests. 43# Whether to generate a coverage report after running the tests.
45USE_COVERAGE?= no # works only with gcc; clang9 fails to link 44USE_COVERAGE?= no # works only with gcc; clang9 fails to link
46.if ${USE_COVERAGE} == "yes" 45.if ${USE_COVERAGE} == "yes"
47GCOV?= gcov 46GCOV?= gcov
48COPTS+= --coverage -O0 -ggdb 47COPTS+= --coverage -O0 -ggdb
49LDADD+= --coverage 48LDADD+= --coverage
50.endif 49.endif
51CLEANFILES+= *.gcda *.gcno *.gcov 50CLEANFILES+= *.gcda *.gcno *.gcov
52 51
53# Whether to compile using the Undefined Behavior Sanitizer (GCC, Clang). 52# Whether to compile using the Undefined Behavior Sanitizer (GCC, Clang).

cvs diff -r1.26 -r1.27 src/usr.bin/make/hash.c (expand / switch to unified diff)

--- src/usr.bin/make/hash.c 2020/08/01 14:47:49 1.26
+++ src/usr.bin/make/hash.c 2020/08/26 23:00:47 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: hash.c,v 1.26 2020/08/01 14:47:49 rillig Exp $ */ 1/* $NetBSD: hash.c,v 1.27 2020/08/26 23:00:47 rillig Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -60,48 +60,46 @@ @@ -60,48 +60,46 @@
60 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 60 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
61 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 61 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
62 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 62 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
63 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 63 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
64 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 64 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 65 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 66 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 67 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 68 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
69 * SUCH DAMAGE. 69 * SUCH DAMAGE.
70 */ 70 */
71 71
72#ifndef MAKE_NATIVE 72#ifndef MAKE_NATIVE
73static char rcsid[] = "$NetBSD: hash.c,v 1.26 2020/08/01 14:47:49 rillig Exp $"; 73static char rcsid[] = "$NetBSD: hash.c,v 1.27 2020/08/26 23:00:47 rillig Exp $";
74#else 74#else
75#include <sys/cdefs.h> 75#include <sys/cdefs.h>
76#ifndef lint 76#ifndef lint
77#if 0 77#if 0
78static char sccsid[] = "@(#)hash.c 8.1 (Berkeley) 6/6/93"; 78static char sccsid[] = "@(#)hash.c 8.1 (Berkeley) 6/6/93";
79#else 79#else
80__RCSID("$NetBSD: hash.c,v 1.26 2020/08/01 14:47:49 rillig Exp $"); 80__RCSID("$NetBSD: hash.c,v 1.27 2020/08/26 23:00:47 rillig Exp $");
81#endif 81#endif
82#endif /* not lint */ 82#endif /* not lint */
83#endif 83#endif
84 84
85/* hash.c -- 85/* hash.c --
86 * 86 *
87 * This module contains routines to manipulate a hash table. 87 * This module contains routines to manipulate a hash table.
88 * See hash.h for a definition of the structure of the hash 88 * See hash.h for a definition of the structure of the hash
89 * table. Hash tables grow automatically as the amount of 89 * table. Hash tables grow automatically as the amount of
90 * information increases. 90 * information increases.
91 */ 91 */
92#include "sprite.h" 
93#include "make.h" 92#include "make.h"
94#include "hash.h" 
95 93
96/* 94/*
97 * Forward references to local procedures that are used before they're 95 * Forward references to local procedures that are used before they're
98 * defined: 96 * defined:
99 */ 97 */
100 98
101static void RebuildTable(Hash_Table *); 99static void RebuildTable(Hash_Table *);
102 100
103/* 101/*
104 * The following defines the ratio of # entries to # buckets 102 * The following defines the ratio of # entries to # buckets
105 * at which we rebuild the table to make it larger. 103 * at which we rebuild the table to make it larger.
106 */ 104 */
107 105

cvs diff -r1.44 -r1.45 src/usr.bin/make/lst.h (expand / switch to unified diff)

--- src/usr.bin/make/lst.h 2020/08/26 22:55:46 1.44
+++ src/usr.bin/make/lst.h 2020/08/26 23:00:47 1.45
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: lst.h,v 1.44 2020/08/26 22:55:46 rillig Exp $ */ 1/* $NetBSD: lst.h,v 1.45 2020/08/26 23:00:47 rillig Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -73,28 +73,26 @@ @@ -73,28 +73,26 @@
73 * from: @(#)lst.h 8.1 (Berkeley) 6/6/93 73 * from: @(#)lst.h 8.1 (Berkeley) 6/6/93
74 */ 74 */
75 75
76/*- 76/*-
77 * lst.h -- 77 * lst.h --
78 * Header for using the list library 78 * Header for using the list library
79 */ 79 */
80#ifndef MAKE_LST_H 80#ifndef MAKE_LST_H
81#define MAKE_LST_H 81#define MAKE_LST_H
82 82
83#include <sys/param.h> 83#include <sys/param.h>
84#include <stdlib.h> 84#include <stdlib.h>
85 85
86#include "sprite.h" 
87 
88/* 86/*
89 * basic typedef. This is what the Lst_ functions handle 87 * basic typedef. This is what the Lst_ functions handle
90 */ 88 */
91 89
92typedef struct List *Lst; 90typedef struct List *Lst;
93typedef struct ListNode *LstNode; 91typedef struct ListNode *LstNode;
94 92
95typedef void *LstCopyProc(void *); 93typedef void *LstCopyProc(void *);
96typedef void LstFreeProc(void *); 94typedef void LstFreeProc(void *);
97typedef int LstFindProc(const void *, const void *); 95typedef int LstFindProc(const void *, const void *);
98typedef int LstActionProc(void *, void *); 96typedef int LstActionProc(void *, void *);
99 97
100/* 98/*

cvs diff -r1.126 -r1.127 src/usr.bin/make/make.h (expand / switch to unified diff)

--- src/usr.bin/make/make.h 2020/08/24 20:15:51 1.126
+++ src/usr.bin/make/make.h 2020/08/26 23:00:47 1.127
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: make.h,v 1.126 2020/08/24 20:15:51 rillig Exp $ */ 1/* $NetBSD: make.h,v 1.127 2020/08/26 23:00:47 rillig Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990, 1993 4 * Copyright (c) 1988, 1989, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -118,27 +118,57 @@ @@ -118,27 +118,57 @@
118#elif defined(__GNUC__) 118#elif defined(__GNUC__)
119#define MAKE_ATTR_DEAD __volatile 119#define MAKE_ATTR_DEAD __volatile
120#else 120#else
121#define MAKE_ATTR_DEAD /* delete */ 121#define MAKE_ATTR_DEAD /* delete */
122#endif 122#endif
123 123
124#if MAKE_GNUC_PREREQ(2, 7) 124#if MAKE_GNUC_PREREQ(2, 7)
125#define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg) \ 125#define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg) \
126 __attribute__((__format__ (__printf__, fmtarg, firstvararg))) 126 __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
127#else 127#else
128#define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg) /* delete */ 128#define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg) /* delete */
129#endif 129#endif
130 130
131#include "sprite.h" 131/*
 132 * A boolean type is defined as an integer, not an enum. This allows a
 133 * boolean argument to be an expression that isn't strictly 0 or 1 valued.
 134 */
 135
 136typedef int Boolean;
 137#ifndef TRUE
 138#define TRUE 1
 139#endif /* TRUE */
 140#ifndef FALSE
 141#define FALSE 0
 142#endif /* FALSE */
 143
 144/*
 145 * Functions that must return a status can return a ReturnStatus to
 146 * indicate success or type of failure.
 147 */
 148
 149typedef int ReturnStatus;
 150
 151/*
 152 * The following statuses overlap with the first 2 generic statuses
 153 * defined in status.h:
 154 *
 155 * SUCCESS There was no error.
 156 * FAILURE There was a general error.
 157 */
 158
 159#define SUCCESS 0x00000000
 160#define FAILURE 0x00000001
 161
132#include "lst.h" 162#include "lst.h"
133#include "hash.h" 163#include "hash.h"
134#include "config.h" 164#include "config.h"
135#include "buf.h" 165#include "buf.h"
136#include "make_malloc.h" 166#include "make_malloc.h"
137 167
138typedef enum { 168typedef enum {
139 UNMADE, /* Not examined yet */ 169 UNMADE, /* Not examined yet */
140 DEFERRED, /* Examined once (building child) */ 170 DEFERRED, /* Examined once (building child) */
141 REQUESTED, /* on toBeMade list */ 171 REQUESTED, /* on toBeMade list */
142 BEINGMADE, /* Target is already being made. 172 BEINGMADE, /* Target is already being made.
143 * Indicates a cycle in the graph. */ 173 * Indicates a cycle in the graph. */
144 MADE, /* Was out-of-date and has been made */ 174 MADE, /* Was out-of-date and has been made */

File Deleted: src/usr.bin/make/Attic/sprite.h