Annotation of src/usr.bin/make/config.h, Revision 1.18
1.11 espie 1: #ifndef CONFIG_H
2: #define CONFIG_H
3:
1.18 ! espie 4: /* $OpenBSD: config.h,v 1.17 2010/07/19 19:30:37 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
47: * DEFMAXLOCAL
48: * These control the default concurrency. On no occasion will more
49: * than DEFMAXJOBS targets be created at once (locally or remotely)
50: * DEFMAXLOCAL is the highest number of targets which will be
51: * created on the local machine at once. Note that if you set this
52: * to 0, nothing will ever happen...
53: */
54: #define DEFMAXJOBS 4
55: #define DEFMAXLOCAL 1
56:
57: /*
58: * LIBSUFF
59: * Is the suffix used to denote libraries and is used by the Suff module
60: * to find the search path on which to seek any -l<xx> targets.
61: */
1.10 espie 62: #define LIBSUFF ".a"
1.5 briggs 63:
64: /*
1.7 millert 65: * SYSVINCLUDE
1.5 briggs 66: * Recognize system V like include directives [include "filename"]
67: * SYSVVARSUB
68: * Recognize system V like ${VAR:x=y} variable substitutions
69: */
1.7 millert 70: #define SYSVINCLUDE
1.5 briggs 71: #define SYSVVARSUB
72:
73: /*
74: * SUNSHCMD
75: * Recognize SunOS and Solaris:
76: * VAR :sh= CMD # Assign VAR to the command substitution of CMD
77: * ${VAR:sh} # Return the command substitution of the value
78: * # of ${VAR}
79: */
80: #define SUNSHCMD
1.1 deraadt 81:
1.13 matthieu 82: #if !defined(__svr4__) && !defined(__SVR4) && !defined(__ELF__)
1.2 niklas 83: # ifndef RANLIBMAG
84: # define RANLIBMAG "__.SYMDEF"
85: # endif
1.12 espie 86: #endif
87:
88: #ifdef HAS_EXTENDED_GETCWD
89: #define dogetcwd() getcwd(NULL, 0)
90: #else
91: #define dogetcwd() getcwd(emalloc(PATH_MAX), PATH_MAX)
1.1 deraadt 92: #endif
1.10 espie 93:
94: #ifdef SYSVINCLUDE
95: #define DOFEATURE_SYSVINCLUDE FEATURE_SYSVINCLUDE
96: #else
97: #define DOFEATURE_SYSVINCLUDE 0
98: #endif
99: #ifdef SYSVVARSUB
100: #define DOFEATURE_SYSVVARSUB FEATURE_SYSVVARSUB
101: #else
102: #define DOFEATURE_SYSVVARSUB 0
103: #endif
104: #ifdef SUNSHCMD
105: #define DOFEATURE_SUNSHCMD FEATURE_SUNSHCMD
106: #else
107: #define DOFEATURE_SUNSHCMD 0
108: #endif
109:
110: #ifndef DEFAULT_FEATURES
111: #define DEFAULT_FEATURES (FEATURE_UPPERLOWER | DOFEATURE_SYSVVARSUB | DOFEATURE_SYSVINCLUDE | DOFEATURE_SUNSHCMD | FEATURE_RECVARS)
112: #endif
113:
114: #define FEATURES(x) ((DEFAULT_FEATURES & (x)) != 0)
115: #define FEATURE_ODE 1
116: #define FEATURE_UNIQ 2
117: #define FEATURE_SORT 4
118: #define FEATURE_UPPERLOWER 8
119: #define FEATURE_SYSVVARSUB 16
120: #define FEATURE_SYSVINCLUDE 32
121: #define FEATURE_SUNSHCMD 64
122: #define FEATURE_RECVARS 128
123: #define FEATURE_CONDINCLUDE 256
124: #define FEATURE_ASSIGN 512
125: #define FEATURE_EXECMOD 1024
1.11 espie 126:
127: /*
128: * There are several places where expandable buffers are used (parse.c and
129: * var.c). This constant is merely the starting point for those buffers. If
130: * lines tend to be much shorter than this, it would be best to reduce BSIZE.
131: * If longer, it should be increased. Reducing it will cause more copying to
132: * be done for longer lines, but will save space for shorter ones. In any
133: * case, it ought to be a power of two simply because most storage allocation
134: * schemes allocate in powers of two.
135: */
136: #define MAKE_BSIZE 256 /* starting size for expandable buffers */
137:
138: #endif