Pwd built-in added
[k8jam.git] / execmac.c
blobae32039bb8247e523301893564cc44aa30219967
1 /*
2 * Copyright 1993, 1995 Christopher Seiwald.
4 * This file is part of Jam - see jam.c for Copyright information.
5 */
7 /*
8 * execunix.c - execute a shell script on UNIX
10 * If $(JAMSHELL) is defined, uses that to formulate execvp().
11 * The default is:
13 * /bin/sh -c %
15 * Each word must be an individual element in a jam variable value.
17 * In $(JAMSHELL), % expands to the command string and ! expands to
18 * the slot number (starting at 1) for multiprocess (-j) invocations.
19 * If $(JAMSHELL) doesn't include a %, it is tacked on as the last
20 * argument.
22 * Don't just set JAMSHELL to /bin/sh - it won't work!
24 * External routines:
25 * execcmd() - launch an async command execution
26 * execwait() - wait and drive at most one execution completion
28 * Internal routines:
29 * onintr() - bump intr to note command interruption
31 * 04/08/94 (seiwald) - Coherent/386 support added.
32 * 05/04/94 (seiwald) - async multiprocess interface
33 * 01/22/95 (seiwald) - $(JAMSHELL) support
34 * 01/20/00 (seiwald) - Upgraded from K&R to ANSI C
37 # include "jam.h"
38 # include "lists.h"
39 # include "execcmd.h"
40 # include <errno.h>
42 # ifdef OS_MAC
45 * execcmd() - launch an async command execution
48 void
49 execcmd(
50 char *string,
51 void (*func)( void *closure, int status ),
52 void *closure,
53 LIST *shell )
56 printf( "%s", string );
57 (*func)( closure, EXEC_CMD_OK );
61 * execwait() - wait and drive at most one execution completion
64 int
65 execwait()
67 return 0;
70 # endif /* OS_MAC */