Kaydet (Commit) 1d10737e authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS dmake47 (1.8.2); FILE MERGED

2006/12/06 22:09:19 vq 1.8.2.4: #i72337# Make dmake -V tell whether fork/exec or spawn is used.
2006/11/19 05:27:24 vq 1.8.2.3: #i71704# Let the global .SEQUENTIAL attribute implicitely set MAXPROCESS=1
and disallow MAXPROCESS to be changed if the global .SEQUENTIAL is set.
2006/11/12 05:06:38 vq 1.8.2.2: #i71422# Add a new feature: Using @@ as a recipe prefix redirects the
output (stdout and stderr) of a recipe to /dev/null (or NUL on W32)
completely suppressing the output of that recipe to the terminal.
As for the @ prefix this can be disabled using the -v[r] switch.
2006/10/01 19:18:26 vq 1.8.2.1: #i69742# Create Clean_path() function.
üst ccbea50c
/* $RCSfile: dmake.c,v $
-- $Revision: 1.8 $
-- last change: $Author: vg $ $Date: 2006-09-25 09:39:05 $
-- $Revision: 1.9 $
-- last change: $Author: vg $ $Date: 2007-01-18 09:29:05 $
--
-- SYNOPSIS
-- The main program.
......@@ -135,6 +135,11 @@ char **argv;
int ex_val;
int m_export;
/* Uncomment the following line to pass commands to the DBUG engine
* before the command line switches (-#..) are evaluated. */
/*
DB_PUSH("d,path");
*/
DB_ENTER("main");
/* Initialize Global variables to their default values */
......@@ -174,6 +179,10 @@ char **argv;
Shell_exec_target = NIL(CELL);
stdout_redir = NIL(FILE);
/* Get fd for for @@-recipe silencing. */
if( (zerofd = open(NULLDEV, O_WRONLY)) == -1 )
Fatal( "Error opening %s !", NULLDEV );
Verbose = V_NOFLAG;
Measure = M_NOFLAG;
Transitive = TRUE;
......@@ -302,7 +311,9 @@ char **argv;
case 'P':
if( p[1] ) {
Def_macro( "MAXPROCESS", p+1, M_MULTI|M_EXPANDED );
/* Only set MAXPROCESS if -S flag is *not* used. */
if( !(Glob_attr & A_SEQ) )
Def_macro( "MAXPROCESS", p+1, M_MULTI|M_EXPANDED );
p += strlen(p)-1;
}
else
......@@ -352,6 +363,7 @@ char **argv;
Make_rules(); /* potential targets */
_warn = TRUE;
/* If -r was not given find and parse startup-makefile. */
if( Rules ) {
char *fname;
......@@ -368,6 +380,7 @@ char **argv;
if( Get_env == 'E' ) _do_ReadEnvironment();
/* Search for and parse user makefile. */
if( fil_name != NIL(char) )
mkfil = Openfile( fil_name, FALSE, TRUE );
else {
......@@ -423,11 +436,14 @@ char **argv;
if( Buffer != NIL(char) ) {FREE( Buffer ); Buffer = NIL(char);}
if( Trace ) Def_macro(".SEQUENTIAL", "y", M_EXPANDED);
if( Glob_attr & A_SEQ ) Def_macro( "MAXPROCESS", "1", M_EXPANDED|M_FORCE );
ex_val = Make_targets();
Clear_signals();
/* Close fd for for @@-recipe silencing. */
if( close(zerofd) )
Fatal( "Error closing %s !", NULLDEV );
Epilog(ex_val); /* Does not return -- EVER */
return 0;
}
......@@ -889,5 +905,16 @@ Version()
printf("\t%s\n", *p);
printf("\n");
printf("Please read the file readme/read1st.txt for the latest release notes.\n");
#if defined(HAVE_SPAWN_H) || defined(__CYGWIN__)
/* Only systems that have spawn ar concerned whether spawn or fork/exec
* are used. */
#if ENABLE_SPAWN
printf("Subprocesses are executed using: spawn.\n\n");
#else
printf("Subprocesses are executed using: fork/exec.\n\n");
#endif
#endif
printf("Please read the NEWS file for the latest release notes.\n");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment