8 -- dmake [-#dbug_string] [ options ]
9 -- [ macro definitions ] [ target ... ]
11 -- This file contains the main command line parser for the
12 -- make utility. The valid flags recognized are as follows:
14 -- -f file - use file as the makefile
15 -- -C file - duplicate console output to file (MSDOS only)
16 -- -K file - .KEEP_STATE file
17 -- -#dbug_string - dump out debugging info, see below
18 -- -v[cdfimrtw] - verbose, print what we are doing, as we do it
19 -- -m[trae] - measure timing information
21 -- options: (can be catenated, ie -irn == -i -r -n)
23 -- -A - enable AUGMAKE special target mapping
24 -- -B - enable non-use of TABS to start recipe lines
25 -- -c - use non-standard comment scanning
26 -- -d - do not use directory cache
28 -- -n - trace and print, do not execute commands
29 -- -t - touch, update dates without executing commands
30 -- -T - do not apply transitive closure on inference rules
31 -- -r - don't use internal rules
32 -- -s - do your work silently
33 -- -S - force Sequential make, overrides -P
34 -- -q - check if target is up to date. Does not
35 -- do anything. Returns 0 if up to date, -1
37 -- -p - print out a version of the makefile
38 -- -P# - set value of MAXPROCESS
39 -- -E - define environment strings as macros
40 -- -e - as -E but done after parsing makefile
41 -- -u - force unconditional update of target
42 -- -k - make all independent targets even if errors
43 -- -V - print out this make version number
44 -- -M - Microsoft make compatibility, (* disabled *)
45 -- -h - print out usage info
46 -- -x - export macro defs to environment
47 -- -X - ignore #! lines found in makefile
49 -- NOTE: - #ddbug_string is only availabe for versions of dmake that
50 -- have been compiled with -DDBUG switch on. Not the case for
51 -- distributed versions. Any such versions must be linked
52 -- together with a version of Fred Fish's debug code.
54 -- NOTE: - in order to compile the code the include file stddef.h
55 -- must be shipped with the bundled code.
58 -- Dennis Vadura, dvadura@dmake.wticorp.com
61 -- http://dmake.wticorp.com/
64 -- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
66 -- This program is NOT free software; you can redistribute it and/or
67 -- modify it under the terms of the Software License Agreement Provided
68 -- in the file <distribution-root>/readme/license.txt.
71 -- Use cvs log to obtain detailed change logs.
74 /* Set this flag to one, and the global variables in vextern.h will not
75 * be defined as 'extern', instead they will be defined as global vars
76 * when this module is compiled. */
77 #define _DEFINE_GLOBALS_ 1
79 #include "extern.h" /* this includes config.h */
84 "Usage:\n%s [-P#] [-{f|K} file] [-{w|W} target ...] [macro[!][[*][+][:]]=value ...]\n"
86 "%s [-v[cdfimrtw]] [-m[trae]] [-ABcdeEghiknpqrsStTuVxX] [target ...]\n"
89 "Usage:\n%s [-P#] [-{f|C|K} file] [-{w|W} target ...] [macro[!][[*][+][:]]=value ...]\n"
91 "%s [-v[cdfimrtw]] [-m[trae]] [-ABcdeEghiknpqrsStTuVxX] [target ...]\n"
94 /* We don't use va_end at all, so define it out so that it doesn't produce
95 * lots of "Value not used" warnings. */
99 #define va_end(expand_to_null)
101 /* Make certain that ARG macro is correctly defined. */
107 static char *sccid
= "Copyright (c) 1990,...,1997 by WTI Corp.";
108 static char _warn
= TRUE
; /* warnings on by default */
110 static void _do_VPATH();
111 static void _do_ReadEnvironment();
112 #if !defined(__GNUC__) && !defined(__IBMC__)
113 static void _do_f_flag
ANSI((char, char *, char **));
115 static void _do_f_flag
ANSI((int, char *, char **));
124 char* std_fil_name
= NIL(char);
127 char* fil_name
= NIL(char);
128 char* state_name
= NIL(char);
129 char* whatif
= NIL(char);
132 STRINGPTR cltarget
= NIL(STRING
); /* list of targets from command line. */
133 STRINGPTR cltarget_first
= NIL(STRING
); /* Pointer to first element. */
138 /* Uncomment the following line to pass commands to the DBUG engine
139 * before the command line switches (-#..) are evaluated. */
145 /* Initialize Global variables to their default values */
147 /* Set internal macros to their initial values, some are changed
148 * later again by Make_rules() that parses the values from ruletab.c. */
152 /* This macro is only defined for some OSs, see sysintf.c for details *
153 * and NULL if undefined. */
154 Def_macro("ABSMAKECMD", AbsPname
, M_PRECIOUS
|M_NOEXPORT
|M_EXPANDED
);
156 Def_macro( "MAKECMD", Pname
, M_PRECIOUS
|M_NOEXPORT
|M_EXPANDED
);
157 Pname
= Basename(Pname
);
160 (void) setvbuf(stdout
, NULL
, _IOLBF
, BUFSIZ
); /* stdout line buffered */
181 Is_exec_shell
= FALSE
;
182 Shell_exec_target
= NIL(CELL
);
183 stdout_redir
= NIL(FILE);
185 /* Get fd for for @@-recipe silencing. */
186 if( (zerofd
= open(NULLDEV
, O_WRONLY
)) == -1 )
187 Fatal( "Error opening %s !", NULLDEV
);
194 Suppress_temp_file
= FALSE
;
197 while( --argc
> 0 ) {
201 if( *(p
= *++argv
) == '-' ) {
202 if( p
[1] == '\0' ) Fatal("Missing option letter");
204 /* copy options to Buffer for $(MFLAGS), strip 'f' and 'C'*/
205 q
= strchr(Buffer
, '\0');
207 char c
= (*q
++ = *p
++);
208 if( c
== 'f' || c
== 'C' ) q
--;
218 for( p
= *argv
+1; *p
; p
++) switch (*p
) {
220 _do_f_flag( 'f', *++argv
, &fil_name
); argc
--;
223 #if defined(MSDOS) && !defined(OS2)
225 _do_f_flag( 'C', *++argv
, &std_fil_name
); argc
--;
226 Hook_std_writes( std_fil_name
);
231 _do_f_flag( 'K', *++argv
, &state_name
); argc
--;
232 Def_macro(".KEEP_STATE", state_name
, M_EXPANDED
|M_PRECIOUS
);
238 _do_f_flag( 'w', *++argv
, &whatif
); argc
--;
239 wif
= Def_cell(whatif
);
240 wif
->ce_attr
|= A_WHATIF
;
252 case 'k': Continue
= TRUE
; break;
253 case 'c': Comment
= TRUE
; break;
254 case 'p': Listing
= TRUE
; break;
255 case 'r': Rules
= FALSE
; break;
256 case 't': Touch
= TRUE
; break;
257 case 'q': Check
= TRUE
; break;
258 case 'u': Force
= TRUE
; break;
259 case 'x': m_export
= TRUE
; break;
260 case 'X': No_exec
= TRUE
; break;
261 case 'T': Transitive
= FALSE
; break;
262 case 'e': Get_env
= 'e'; break;
263 case 'E': Get_env
= 'E'; break;
265 case 'V': Version(); Quit(0); break;
266 case 'A': Def_macro("AUGMAKE", "y", M_EXPANDED
); break;
267 case 'B': Def_macro(".NOTABS", "y", M_EXPANDED
); break;
268 case 'i': Def_macro(".IGNORE", "y", M_EXPANDED
); break;
269 case 's': Def_macro(".SILENT", "y", M_EXPANDED
); break;
270 case 'S': Def_macro(".SEQUENTIAL", "y", M_EXPANDED
); break;
271 case 'g': Def_macro(".IGNOREGROUP","y", M_EXPANDED
); break;
272 case 'd': Def_macro(".DIRCACHE",NIL(char),M_EXPANDED
); break;
275 if( p
[-1] != '-' ) Usage(TRUE
);
276 while( p
[1] ) switch( *++p
) {
277 case 'c': Verbose
|= V_DIR_CACHE
; break;
278 case 'd': Verbose
|= V_DIR_SET
; break;
279 case 'f': Verbose
|= V_FILE_IO
; break;
280 case 'i': Verbose
|= V_INFER
; break;
281 case 'm': Verbose
|= V_MAKE
; break;
282 case 'r': Verbose
|= V_FORCEECHO
; break;
283 case 't': Verbose
|= V_LEAVE_TMP
; break;
284 case 'w': Verbose
|= V_WARNALL
; break;
286 default: Usage(TRUE
); break;
288 if( !Verbose
) Verbose
= V_ALL
;
289 if( Verbose
& V_FORCEECHO
) {
291 /* This cleans the .SILENT setting */
292 hp
= Def_macro(".SILENT", "", M_EXPANDED
);
293 /* This overrides the bitmask for further occurrences of
294 * .SILENT to "no bits allowed", see bit variables in the
295 * set_macro_value() definition in dag.c.
296 * The bitmask is already set by Create_macro_vars() in
297 * imacs.c and is overridden for the V_FORCEECHO case. */
298 hp
->MV_MASK
= A_DEFAULT
;
303 if( p
[-1] != '-' ) Usage(TRUE
);
304 while( p
[1] ) switch( *++p
) {
305 case 't': Measure
|= M_TARGET
; break;
306 case 'r': Measure
|= M_RECIPE
; break;
307 case 'a': Measure
|= M_ABSPATH
; break;
308 case 'e': Measure
|= M_SHELLESC
; break;
310 default: Usage(TRUE
); break;
312 if( !Measure
) Measure
= M_TARGET
;
317 /* Only set MAXPROCESS if -S flag is *not* used. */
318 if( !(Glob_attr
& A_SEQ
) ) {
319 Def_macro( "MAXPROCESS", p
+1, M_MULTI
|M_EXPANDED
);
324 Fatal( "Missing number for -P flag" );
334 case 'h': Usage(FALSE
); break;
335 case 0: break; /* lone - */
336 default: Usage(TRUE
); break;
339 else if( (q
= strchr(p
, '=')) != NIL(char) ) {
340 cmdmacs
= DmStrAdd( cmdmacs
, DmStrDup2(p
), TRUE
);
341 /* Macros defined on the command line are marked precious.
342 * FIXME: The exception for += appears to be bogus. */
343 Parse_macro( p
, (q
[-1]!='+')?M_PRECIOUS
:M_DEFAULT
);
346 /* Remember the targets from the command line. */
347 register STRINGPTR nsp
;
349 targets
= DmStrAdd( targets
, DmStrDup(p
), TRUE
);
351 TALLOC(nsp
, 1, STRING
);
352 nsp
->st_string
= DmStrDup( p
);
353 nsp
->st_next
= NIL(STRING
);
355 if(cltarget
!= NIL(STRING
) )
356 cltarget
->st_next
= nsp
;
358 cltarget_first
= nsp
;
364 Def_macro( "MAKEMACROS", cmdmacs
, M_PRECIOUS
|M_NOEXPORT
);
365 Def_macro( "MAKETARGETS", targets
, M_PRECIOUS
|M_NOEXPORT
);
366 if( cmdmacs
!= NIL(char) ) FREE(cmdmacs
);
367 if( targets
!= NIL(char) ) FREE(targets
);
369 Def_macro( "MFLAGS", Buffer
, M_PRECIOUS
|M_NOEXPORT
);
370 Def_macro( "%", "$@", M_PRECIOUS
|M_NOEXPORT
);
372 if( *Buffer
) Def_macro( "MAKEFLAGS", Buffer
+1, M_PRECIOUS
|M_NOEXPORT
);
374 _warn
= FALSE
; /* disable warnings for builtin rules */
375 Target
= TRUE
; /* make sure we don't mark any of the default rules as
376 * potential targets. */
377 Make_rules(); /* Parse the strings stored in Rule_tab. */
380 /* If -r was not given find and parse startup-makefile. */
383 char *fname
= NIL(char);
385 /* Search_file() also checks the environment variable. */
386 if( (mkfil
=Search_file("MAKESTARTUP", &fname
)) != NIL(FILE) )
389 Def_macro( "MAKESTARTUP", fname
, M_EXPANDED
|M_MULTI
|M_FORCE
);
392 Fatal( "Configuration file `%s' not found", fname
);
393 if ( fname
!= NIL(char)) { FREE( fname
); fname
= NIL(char); }
396 /* Define the targets set on the command line now. */
397 Target
= FALSE
; /* Will be set to TRUE when the default targets are set. */
398 for( cltarget
= cltarget_first
; cltarget
!= NIL(STRING
); ) {
400 STRINGPTR nta
= cltarget
->st_next
;
402 Add_prerequisite(Targets
, cp
= Def_cell(cltarget
->st_string
),
404 cp
->ce_flag
|= F_TARGET
;
405 cp
->ce_attr
|= A_FRINGE
;
408 FREE(cltarget
->st_string
);
413 if( Get_env
== 'E' ) _do_ReadEnvironment();
415 /* Search for and parse user makefile. */
416 if( fil_name
!= NIL(char) )
417 mkfil
= Openfile( fil_name
, FALSE
, TRUE
);
419 /* Search .MAKEFILES dependent list looking for a makefile.
423 cp
= Def_cell( ".MAKEFILES" );
424 mkfil
= TryFiles(cp
->CE_PRQ
);
427 if( mkfil
!= NIL(FILE) ) {
428 char *f
= Filename();
431 if( strcmp(f
, "stdin") == 0 ) f
= "-";
432 Def_macro( "MAKEFILE", p
= DmStrAdd( "-f", f
, FALSE
), M_PRECIOUS
|M_NOEXPORT
); FREE(p
);
436 Fatal( "No `makefile' present" );
438 if( Nest_level
) Fatal( "Missing .END for .IF" );
439 if( Get_env
== 'e' ) _do_ReadEnvironment();
441 _do_VPATH(); /* kludge it up with .SOURCE */
443 if( Listing
) Dump(); /* print out the structures */
444 if( Trace
) Glob_attr
&= ~A_SILENT
; /* make sure we see the trace */
447 Fatal( "No target" );
449 Test_circle( Root
, TRUE
);
456 for( i
=0; i
<HASH_TABLE_SIZE
; ++i
) {
457 HASHPTR hp
= Macs
[i
];
460 if( !(hp
->ht_flag
& M_NOEXPORT
) && hp
->ht_value
!= NIL(char) )
461 if( Write_env_string(hp
->ht_name
, hp
->ht_value
) != 0 )
462 Warning( "Could not export %s", hp
->ht_name
);
468 if( Buffer
!= NIL(char) ) {FREE( Buffer
); Buffer
= NIL(char);}
469 if( Trace
) Def_macro(".SEQUENTIAL", "y", M_EXPANDED
);
471 ex_val
= Make_targets();
475 /* Close fd for for @@-recipe silencing. */
477 Fatal( "Error closing %s !", NULLDEV
);
478 Epilog(ex_val
); /* Does not return -- EVER */
484 _do_f_flag( flag
, name
, fname
)
489 if( *fname
== NIL(char) ) {
490 if( name
!= NIL(char) ) {
493 Fatal("No file name for -%c", flag
);
495 Fatal("Only one `-%c file' allowed", flag
);
500 _do_ReadEnvironment()
502 t_attr saveattr
= Glob_attr
;
504 Glob_attr
|= A_SILENT
;
506 Glob_attr
= saveattr
;
515 extern char **Rule_tab
;
517 hp
= GET_MACRO("VPATH");
518 if( hp
== NIL(HASH
) ) return;
520 _rl
[0] = ".SOURCE :^ $(VPATH:s/:/ /)";
528 /* The file table and pointer to the next FREE slot for use by both
529 Openfile and Closefile. Each open stacks the new file onto the open
530 file stack, and a corresponding close will close the passed file, and
531 return the next file on the stack. The maximum number of nested
532 include files is limited by the value of MAX_INC_DEPTH */
535 FILE *file
; /* file pointer */
536 char *name
; /* name of file */
537 int numb
; /* line number */
538 } ftab
[ MAX_INC_DEPTH
];
540 static int next_file_slot
= 0;
542 /* Set the proper macro value to reflect the depth of the .INCLUDE directives
543 * and the name of the file we are reading.
549 sprintf( buf
, "%d", next_file_slot
);
550 Def_macro( "INCDEPTH", buf
, M_MULTI
|M_NOEXPORT
);
551 Def_macro( "INCFILENAME",
552 next_file_slot
? ftab
[next_file_slot
-1].name
: "",
553 M_MULTI
|M_NOEXPORT
|M_EXPANDED
);
558 Openfile(name
, mode
, err
)/*
559 ===========================
560 This routine opens a file for input or output depending on mode.
561 If the file name is `-' then it returns standard input.
562 The file is pushed onto the open file stack. */
569 DB_ENTER("Openfile");
571 if( name
== NIL(char) || !*name
) {
573 DB_RETURN(NIL(FILE));
575 Fatal( "Openfile: NIL filename" );
578 if( next_file_slot
== MAX_INC_DEPTH
)
579 Fatal( "Too many open files. Max nesting level is %d.", MAX_INC_DEPTH
);
581 DB_PRINT( "io", ("Opening file [%s], in slot %d", name
, next_file_slot
) );
583 if( strcmp("-", name
) == 0 ) {
588 fil
= fopen( name
, mode
? "w":"r" );
590 if( Verbose
& V_FILE_IO
)
591 printf( "%s: Openning [%s] for %s", Pname
, name
, mode
?"write":"read" );
593 if( fil
== NIL(FILE) ) {
594 if( Verbose
& V_FILE_IO
) printf( " (fail)\n" );
596 Fatal( mode
? "Cannot open file %s for write" : "File %s not found",
600 if( Verbose
& V_FILE_IO
) printf( " (success)\n" );
601 ftab
[next_file_slot
].file
= fil
;
602 ftab
[next_file_slot
].numb
= Line_number
;
603 ftab
[next_file_slot
++].name
= DmStrDup(name
);
615 This routine is used to close the last file opened. This forces make
616 to open files in a last open first close fashion. It returns the
617 file pointer to the next file on the stack, and NULL if the stack is empty.*/
619 DB_ENTER("Closefile");
621 if( !next_file_slot
)
622 DB_RETURN( NIL(FILE) );
624 if( ftab
[--next_file_slot
].file
!= stdin
) {
625 DB_PRINT( "io", ("Closing file in slot %d", next_file_slot
) );
627 if( Verbose
& V_FILE_IO
)
628 printf( "%s: Closing [%s]\n", Pname
, ftab
[next_file_slot
].name
);
630 fclose( ftab
[next_file_slot
].file
);
631 FREE( ftab
[next_file_slot
].name
);
636 if( next_file_slot
> 0 ) {
637 Line_number
= ftab
[next_file_slot
].numb
;
638 DB_RETURN( ftab
[next_file_slot
-1].file
);
643 DB_RETURN( NIL(FILE) );
648 Search_file( macname
, rname
)
653 FILE *fil
= NIL(FILE);
654 char *fname
= NIL(char);
655 char *ename
= NIL(char);
657 /* order of precedence is:
659 * MACNAME from command line (precious is marked)
660 * ... via MACNAME:=filename definition.
661 * MACNAME from environment
662 * MACNAME from builtin rules (not precious)
665 if( (hp
= GET_MACRO(macname
)) != NIL(HASH
) ) {
666 /* Only expand if needed. */
667 if( hp
->ht_flag
& M_EXPANDED
) {
668 ename
= fname
= DmStrDup(hp
->ht_value
);
670 ename
= fname
= Expand(hp
->ht_value
);
673 if( hp
->ht_flag
& M_PRECIOUS
) fil
= Openfile(fname
, FALSE
, FALSE
);
676 if( fil
== NIL(FILE) ) {
677 fname
=Expand(Read_env_string(macname
));
678 if( (fil
= Openfile(fname
, FALSE
, FALSE
)) != NIL(FILE) ) FREE(ename
);
681 if( fil
== NIL(FILE) && hp
!= NIL(HASH
) ) {
682 if ( fname
!= NIL(char) ) { FREE(fname
); fname
= NIL(char); }
683 fil
= Openfile(fname
=ename
, FALSE
, FALSE
);
686 if( rname
) *rname
= fname
;
695 Return name of file on top of stack */
697 return( next_file_slot
==0 ? NIL(char) : ftab
[next_file_slot
-1].name
);
704 Return the file nesting level */
706 return( next_file_slot
);
713 Try to open a makefile, try to make it if needed and return a
714 filepointer to the first successful found or generated file.
715 The function returns NIL(FILE) if nothing was found. */
718 FILE *mkfil
= NIL(FILE);
720 if( lp
!= NIL(LINK
) ) {
727 Trace
= Touch
= Check
= FALSE
;
728 /* We are making a makefile. Wait for it. */
729 Makemkf
= Wait_for_completion
= TRUE
;
732 for(; lp
!= NIL(LINK
) && mkfil
== NIL(FILE); lp
=lp
->cl_next
) {
733 if( lp
->cl_prq
->ce_attr
& A_FRINGE
) continue;
735 mkfil
= Openfile( lp
->cl_prq
->CE_NAME
, FALSE
, FALSE
);
737 /* Note that no error handling for failed Make() calls is possible
738 * as expected errors (no rule to make the makefile) or unexpected
739 * errors both return -1. */
740 if( mkfil
== NIL(FILE) && Make(lp
->cl_prq
, NIL(CELL
)) != -1 ) {
741 mkfil
= Openfile( lp
->cl_prq
->CE_NAME
, FALSE
, FALSE
);
742 /* Remove flags that indicate that the target was already made.
743 * This is also needed to avoid conflicts with the circular
744 * dependency check in rulparse(), see issues 62118 and 81296
753 Makemkf
= Wait_for_completion
= FALSE
;
761 ** print error message from variable arg list
764 static int errflg
= TRUE
;
765 static int warnflg
= FALSE
;
772 int warn
= _warn
&& warnflg
&& !(Glob_attr
& A_SILENT
);
774 if( errflg
|| warn
) {
775 char *f
= Filename();
777 fprintf( stderr
, "%s: ", Pname
);
778 if( f
!= NIL(char) ) fprintf(stderr
, "%s: line %d: ", f
, Line_number
);
781 fprintf(stderr
, "Error: -- ");
783 fprintf(stderr
, "Warning: -- ");
785 vfprintf( stderr
, fmt
, args
);
786 putc( '\n', stderr
);
787 if( errflg
&& !Continue
) Quit(0);
793 ** Print error message and abort
796 Fatal(ARG(char *,fmt
), ARG(va_alist_type
,va_alist
))
798 DARG(va_alist_type
,va_alist
)
809 ** error message and exit (unless -k)
812 Error(ARG(char *,fmt
), ARG(va_alist_type
,va_alist
))
814 DARG(va_alist_type
,va_alist
)
828 Warning(ARG(char *,fmt
), ARG(va_alist_type
,va_alist
))
830 DARG(va_alist_type
,va_alist
)
847 Fatal( "No more memory" );
858 fill
= DmStrDup(Pname
);
859 for(p
=fill
; *p
; p
++) *p
=' ';
862 fprintf(stderr
, USAGE
, Pname
);
863 fprintf(stderr
, USAGE2
, fill
);
866 printf(USAGE
, Pname
);
867 printf(USAGE2
, fill
);
868 puts(" -P# - set max number of child processes for parallel make");
869 puts(" -f file - use file as the makefile");
871 puts(" -C [+]file - duplicate console output to file, ('+' => append)");
873 puts(" -K file - use file as the .KEEP_STATE file");
874 puts(" -w target - show what you would do if 'target' were out of date");
875 puts(" -W target - rebuild pretending that 'target' is out of date");
876 puts(" -v[cdfimrtw] - verbose, indicate what we are doing, (-v => -vcdfimrtw)");
877 puts(" c => dump directory cache info only" );
878 puts(" d => dump change of directory info only" );
879 puts(" f => dump file open/close info only" );
880 puts(" i => dump inference information only" );
881 puts(" m => dump make of target information only" );
882 puts(" r => Force output of recipe lines and warnings," );
883 puts(" overrides -s" );
884 puts(" t => keep temporary files when done" );
885 puts(" w => issue non-essential warnings\n" );
887 puts(" -m[trae] - Measure timing information, (-m => -mt)");
888 puts(" t => display the start and end time of each target" );
889 puts(" r => display the start and end time of each recipe" );
890 puts(" a => display the target as an absolute path" );
891 puts(" e => display the timing of shell escape macros\n" );
893 puts("Options: (can be catenated, ie -irn == -i -r -n)");
894 puts(" -A - enable AUGMAKE special target mapping");
895 puts(" -B - enable the use of spaces instead of tabs to start recipes");
896 puts(" -c - use non standard comment scanning");
897 puts(" -d - do not use directory cache");
898 puts(" -E - define environment strings as macros");
899 puts(" -e - same as -E but done after parsing makefile");
900 puts(" -g - disable the special meaning of [ ... ] for group recipes");
901 puts(" -h - print out usage info");
902 puts(" -i - ignore errors");
903 puts(" -k - make independent targets, even if errors");
904 puts(" -n - trace and print, do not execute commands");
905 puts(" -p - print out a version of the makefile");
906 puts(" -q - check if target is up to date. Does not do");
907 puts(" anything. Returns 0 if up to date, 1 otherwise");
908 puts(" -r - don't use internal rules");
909 puts(" -s - do your work silently");
910 puts(" -S - disable parallel (force sequential) make, overrides -P");
911 puts(" -t - touch, update time stamps without executing commands");
912 puts(" -T - do not apply transitive closure on inference rules");
913 puts(" -u - force unconditional update of target");
914 puts(" -V - print out version number");
915 puts(" -x - export macro values to environment");
916 puts(" -X - ignore #! lines at start of makefile");
927 extern char **Rule_tab
;
930 printf("%s - Version %s (%s)\n", Pname
, VERSION
, BUILDINFO
);
931 printf("%s\n\n", sccid
);
933 puts("Default Configuration:");
934 for (p
=Rule_tab
; *p
!= NIL(char); p
++)
935 printf("\t%s\n", *p
);
939 #if defined(HAVE_SPAWN_H) || defined(__CYGWIN__)
940 /* Only systems that have spawn ar concerned whether spawn or fork/exec
943 printf("Subprocesses are executed using: spawn.\n\n");
945 printf("Subprocesses are executed using: fork/exec.\n\n");
949 printf("Please read the NEWS file for the latest release notes.\n");