Annotation of src/usr.bin/make/config.h, Revision 1.21
1.11 espie 1: #ifndef CONFIG_H
2: #define CONFIG_H
3:
1.21 ! jsg 4: /* $OpenBSD: config.h,v 1.20 2014/10/18 07:50:06 espie Exp $ */
1.7 millert 5: /* $NetBSD: config.h,v 1.7 1996/11/06 17:59:03 christos Exp $ */
1.1 deraadt 6:
7: /*
8: * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
9: * Copyright (c) 1988, 1989 by Adam de Boor
10: * Copyright (c) 1989 by Berkeley Softworks
11: * All rights reserved.
12: *
13: * This code is derived from software contributed to Berkeley by
14: * Adam de Boor.
15: *
16: * Redistribution and use in source and binary forms, with or without
17: * modification, are permitted provided that the following conditions
18: * are met:
19: * 1. Redistributions of source code must retain the above copyright
20: * notice, this list of conditions and the following disclaimer.
21: * 2. Redistributions in binary form must reproduce the above copyright
22: * notice, this list of conditions and the following disclaimer in the
23: * documentation and/or other materials provided with the distribution.
1.14 millert 24: * 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 25: * may be used to endorse or promote products derived from this software
26: * without specific prior written permission.
27: *
28: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38: * SUCH DAMAGE.
39: *
1.7 millert 40: * from: @(#)config.h 8.1 (Berkeley) 6/6/93
1.1 deraadt 41: */
42:
1.10 espie 43: #define DEFSHELL 1 /* Bourne shell */
1.1 deraadt 44:
45: /*
46: * DEFMAXJOBS
1.21 ! jsg 47: * This controls the default concurrency. On no occasion will more
! 48: * than DEFMAXJOBS targets be created at once.
1.1 deraadt 49: */
50: #define DEFMAXJOBS 4
1.5 briggs 51:
52: /*
1.7 millert 53: * SYSVINCLUDE
1.5 briggs 54: * Recognize system V like include directives [include "filename"]
55: * SYSVVARSUB
56: * Recognize system V like ${VAR:x=y} variable substitutions
57: */
1.7 millert 58: #define SYSVINCLUDE
1.5 briggs 59: #define SYSVVARSUB
60:
61: /*
62: * SUNSHCMD
63: * Recognize SunOS and Solaris:
64: * VAR :sh= CMD # Assign VAR to the command substitution of CMD
65: * ${VAR:sh} # Return the command substitution of the value
66: * # of ${VAR}
67: */
68: #define SUNSHCMD
1.12 espie 69:
70: #ifdef HAS_EXTENDED_GETCWD
71: #define dogetcwd() getcwd(NULL, 0)
72: #else
73: #define dogetcwd() getcwd(emalloc(PATH_MAX), PATH_MAX)
1.1 deraadt 74: #endif
1.10 espie 75:
76: #ifdef SYSVINCLUDE
77: #define DOFEATURE_SYSVINCLUDE FEATURE_SYSVINCLUDE
78: #else
79: #define DOFEATURE_SYSVINCLUDE 0
80: #endif
81: #ifdef SYSVVARSUB
82: #define DOFEATURE_SYSVVARSUB FEATURE_SYSVVARSUB
83: #else
84: #define DOFEATURE_SYSVVARSUB 0
85: #endif
86: #ifdef SUNSHCMD
87: #define DOFEATURE_SUNSHCMD FEATURE_SUNSHCMD
88: #else
89: #define DOFEATURE_SUNSHCMD 0
90: #endif
91:
92: #ifndef DEFAULT_FEATURES
1.20 espie 93: #define DEFAULT_FEATURES (FEATURE_UPPERLOWER | DOFEATURE_SYSVVARSUB | DOFEATURE_SYSVINCLUDE | DOFEATURE_SUNSHCMD | FEATURE_RECVARS | FEATURE_CONDINCLUDE)
1.10 espie 94: #endif
95:
96: #define FEATURES(x) ((DEFAULT_FEATURES & (x)) != 0)
97: #define FEATURE_ODE 1
98: #define FEATURE_UNIQ 2
99: #define FEATURE_SORT 4
100: #define FEATURE_UPPERLOWER 8
101: #define FEATURE_SYSVVARSUB 16
102: #define FEATURE_SYSVINCLUDE 32
103: #define FEATURE_SUNSHCMD 64
104: #define FEATURE_RECVARS 128
105: #define FEATURE_CONDINCLUDE 256
106: #define FEATURE_ASSIGN 512
107: #define FEATURE_EXECMOD 1024
1.11 espie 108:
109: /*
110: * There are several places where expandable buffers are used (parse.c and
111: * var.c). This constant is merely the starting point for those buffers. If
112: * lines tend to be much shorter than this, it would be best to reduce BSIZE.
113: * If longer, it should be increased. Reducing it will cause more copying to
114: * be done for longer lines, but will save space for shorter ones. In any
115: * case, it ought to be a power of two simply because most storage allocation
116: * schemes allocate in powers of two.
117: */
118: #define MAKE_BSIZE 256 /* starting size for expandable buffers */
119:
120: #endif