2 * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
4 * This file is part of Jam - see jam.c for Copyright information.
8 * jam.h - includes and globals for jam
10 * 04/08/94 (seiwald) - Coherent/386 support added.
11 * 04/21/94 (seiwald) - DGUX is __DGUX__, not just __DGUX.
12 * 05/04/94 (seiwald) - new globs.jobs (-j jobs)
13 * 11/01/94 (wingerd) - let us define path of Jambase at compile time.
14 * 12/30/94 (wingerd) - changed command buffer size for NT (MS-DOS shell).
15 * 02/22/95 (seiwald) - Jambase now in /usr/local/lib.
16 * 04/30/95 (seiwald) - FreeBSD added. Live Free or Die.
17 * 05/10/95 (seiwald) - SPLITPATH character set up here.
18 * 08/20/95 (seiwald) - added LINUX.
19 * 08/21/95 (seiwald) - added NCR.
20 * 10/23/95 (seiwald) - added SCO.
21 * 01/03/96 (seiwald) - SINIX (nixdorf) added.
22 * 03/13/96 (seiwald) - Jambase now compiled in; remove JAMBASE variable.
23 * 04/29/96 (seiwald) - AIX now has 31 and 42 OSVERs.
24 * 11/21/96 (peterk) - added BeOS with MW CW mwcc
25 * 12/21/96 (seiwald) - OSPLAT now defined for NT.
26 * 07/19/99 (sickel) - Mac OS X Server and Client support added
27 * 02/22/01 (seiwald) - downshift paths on case-insensitive macintosh
28 * 03/23/01 (seiwald) - VMS C++ changes.
29 * 10/29/01 (brett) - More IA64 ifdefs for MS.
30 * 02/18/00 (belmonte)- Support for Cygwin.
31 * 09/12/00 (seiwald) - OSSYMS split to OSMAJOR/OSMINOR/OSPLAT
32 * 12/29/00 (seiwald) - OSVER dropped.
33 * 01/21/02 (seiwald) - new -q to quit quickly on build failure
34 * 03/16/02 (seiwald) - support for -g (reorder builds by source time)
35 * 03/20/02 (seiwald) - MINGW porting from Max Blagai
36 * 08/16/02 (seiwald) - BEOS porting from Ingo Weinhold
37 * 09/19/02 (seiwald) - new -d displays
38 * 11/05/02 (seiwald) - OSPLAT now set to sparc on solaris.
57 # define OSMAJOR "NT=true"
58 # define OSMINOR "OS=NT"
60 # define SPLITPATH ';'
61 # define MAXLINE 2046 /* longest 'together' actions */
64 /*# define USE_EXECNT*/
65 # define PATH_DELIM '\\'
66 # define DOWNSHIFT_PATHS
68 /* AS400 cross-compile from NT */
73 # define OSMAJOR "AS400=true"
74 # define OSMINOR "OS=AS400"
96 # define OSMAJOR "MINGW=true"
97 # define OSMINOR "OS=MINGW"
99 # define SPLITPATH ';'
100 # define MAXLINE 996 /* longest 'together' actions */
101 # define USE_EXECUNIX
102 # define USE_PATHUNIX
103 # define PATH_DELIM '\\'
104 # define DOWNSHIFT_PATHS
115 # define OSMAJOR "UNIX=true"
116 # define USE_EXECUNIX
117 # define USE_FILEUNIX
118 # define USE_PATHUNIX
119 # define PATH_DELIM '/'
122 # define OSMINOR "OS=FREEBSD"
126 # define OSMINOR "OS=LINUX"
131 # define OSMINOR "OS=NETBSD"
137 # define OSMINOR "OS=QNXNTO"
141 # define OSMINOR "OS=QNX"
149 # define OSMINOR "OS=MACOSX"
153 # define OSMINOR "OS=UNKNOWN"
156 /* All the UNIX includes */
158 # include <sys/types.h>
159 # include <sys/stat.h>
162 # include <sys/file.h>
180 # if !defined(OS_BSDI) && \
181 !defined(OS_FREEBSD) && \
182 !defined(OS_NEXT) && \
183 !defined(OS_MACHTEN) && \
184 !defined(OS_MACOSX) && \
185 !defined(OS_RHAPSODY) && \
190 #include <sys/types.h>
191 #include <sys/wait.h>
197 * OSPLAT definitions - suppressed when it's a one-of-a-kind
200 # if defined( _M_PPC ) || \
203 defined( __powerpc__ ) || \
204 defined( __POWERPC__ ) || \
206 # define OSPLAT "OSPLAT=PPC"
209 # if defined( _ALPHA_ ) || \
211 # define OSPLAT "OSPLAT=AXP"
214 # if defined( _i386_ ) || \
215 defined( __i386__ ) || \
217 # if !defined( OS_FREEBSD ) && \
218 !defined( OS_OS2 ) && \
220 # define OSPLAT "OSPLAT=X86"
225 # if !defined( OS_SUNOS )
226 # define OSPLAT "OSPLAT=SPARC"
231 # if !defined( OS_SGI )
232 # define OSPLAT "OSPLAT=MIPS"
237 # define OSPLAT "OSPLAT=ARM"
240 # if defined( __ia64__ ) || \
241 defined( __IA64__ ) || \
243 # define OSPLAT "OSPLAT=IA64"
247 # define OSPLAT "OSPLAT=390"
255 * Jam implementation misc.
259 # define MAXLINE 10240 /* longest 'together' actions' */
268 # define SPLITPATH ':'
271 /* You probably don't need to muck with these. */
273 # define MAXSYM 1024 /* longest symbol in the environment */
274 # define MAXJPATH 1024 /* longest filename */
276 # define MAXJOBS 64 /* silently enforce -j limit */
277 # define MAXARGC 32 /* words in $(JAMSHELL) */
279 /* Jam private definitions below. */
281 # define DEBUG_MAX 15
287 int newestfirst
; /* build newest sources first */
288 char debug
[DEBUG_MAX
];
289 FILE *cmdout
; /* print cmds, not run them */
292 extern struct globs globs
;
294 # define DEBUG_MAKE ( globs.debug[1] ) /* -da show actions when executed */
295 # define DEBUG_MAKEPROG ( globs.debug[3] ) /* -dm show progress of make0 */
297 # define DEBUG_EXECCMD ( globs.debug[4] ) /* show execcmds()'s work */
299 # define DEBUG_COMPILE ( globs.debug[5] ) /* show rule invocations */
301 # define DEBUG_HEADER ( globs.debug[6] ) /* show result of header scan */
302 # define DEBUG_BINDSCAN ( globs.debug[6] ) /* show result of dir scan */
303 # define DEBUG_SEARCH ( globs.debug[6] ) /* show attempts at binding */
305 # define DEBUG_VARSET ( globs.debug[7] ) /* show variable settings */
306 # define DEBUG_VARGET ( globs.debug[8] ) /* show variable fetches */
307 # define DEBUG_VAREXP ( globs.debug[8] ) /* show variable expansions */
308 # define DEBUG_IF ( globs.debug[8] ) /* show 'if' calculations */
309 # define DEBUG_LISTS ( globs.debug[9] ) /* show list manipulation */
310 # define DEBUG_SCAN ( globs.debug[9] ) /* show scanner tokens */
311 # define DEBUG_MEM ( globs.debug[9] ) /* show memory use */
313 # define DEBUG_MAKEQ ( globs.debug[11] ) /* -da show even quiet actions */
314 # define DEBUG_EXEC ( globs.debug[12] ) /* -dx show text of actions */
315 # define DEBUG_DEPENDS ( globs.debug[13] ) /* -dd show dependency graph */
316 # define DEBUG_CAUSES ( globs.debug[14] ) /* -dc show dependency graph */