2 * Copyright (c) 1988, 1989, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1989 by Berkeley Softworks
7 * This code is derived from software contributed to Berkeley by
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * @(#) Copyright (c) 1988, 1989, 1990, 1993 The Regents of the University of California. All rights reserved.
39 * @(#)main.c 8.3 (Berkeley) 3/19/94
40 * $FreeBSD: src/usr.bin/make/main.c,v 1.118 2005/02/13 13:33:56 harti Exp $
41 * $DragonFly: src/usr.bin/make/main.c,v 1.134 2005/07/02 10:48:42 okumoto Exp $
46 * The main file for this entire program. Exit routines etc
49 * Utility functions defined in this file:
51 * Takes a line of arguments, breaks them and
52 * treats them as if they were given when first
53 * invoked. Used by the parse module to implement
58 #include <sys/utsname.h>
60 #include <sys/param.h>
63 #include <sys/queue.h>
64 #include <sys/resource.h>
80 #include "pathnames.h"
88 extern char **environ; /* XXX what header declares this variable? */
92 * This control the default concurrency. On no occasion will more
93 * than DEFMAXJOBS targets be created at once.
98 /** ordered list of makefiles to read */
101 /** list of variables to print */
104 /** Targets to be made */
107 /** directories to search when looking for includes */
108 struct Path parseIncPath;
110 /** directories to search when looking for system includes */
111 struct Path sysIncPath;
113 Boolean expandVars; /* fully expand printed variables */
114 Boolean builtins; /* -r flag */
115 Boolean forceJobs; /* -j argument given */
119 * TRUE if we aren't supposed to really make anything, just
120 * see if the targets are out-of-date
125 /* (-E) vars to override from env */
126 Lst envFirstVars = Lst_Initializer(envFirstVars);
128 Boolean allPrecious; /* .PRECIOUS given on line by itself */
129 Boolean beSilent; /* -s flag */
130 Boolean beVerbose; /* -v flag */
131 Boolean compatMake; /* -B argument */
132 Boolean debug; /* -d flag */
133 Boolean ignoreErrors; /* -i flag */
134 int jobLimit; /* -j argument */
135 Boolean jobsRunning; /* TRUE if the jobs might be running */
136 Boolean keepgoing; /* -k flag */
137 Boolean noExecute; /* -n flag */
138 Boolean touchFlag; /* -t flag */
139 Boolean usePipes; /* !-P flag */
140 uint32_t warn_cmd; /* command line warning flags */
141 uint32_t warn_flags; /* actual warning flags */
142 uint32_t warn_nocmd; /* command line no-warning flags */
144 time_t now; /* Time at start of make */
145 struct GNode *DEFAULT; /* .DEFAULT node */
149 * Exit with usage message.
155 "usage: make [-BPSXeiknqrstv] [-C directory] [-D variable]\n"
156 "\t[-d flags] [-E variable] [-f makefile] [-I directory]\n"
157 "\t[-j max_jobs] [-m directory] [-V variable]\n"
158 "\t[variable=value] [target ...]\n");
164 * Append a flag with an optional argument to MAKEFLAGS and MFLAGS
167 MFLAGS_append(const char *flag, char *arg)
171 Var_Append(".MAKEFLAGS", flag, VAR_GLOBAL);
173 str = MAKEFLAGS_quote(arg);
174 Var_Append(".MAKEFLAGS", str, VAR_GLOBAL);
178 Var_Append("MFLAGS", flag, VAR_GLOBAL);
180 str = MAKEFLAGS_quote(arg);
181 Var_Append("MFLAGS", str, VAR_GLOBAL);
187 * Open and parse the given makefile.
190 * TRUE if ok. FALSE if couldn't open file.
193 ReadMakefile(Parser *parser, CLI *cli, const char file[], const char curdir[], const char objdir[])
195 char path[MAXPATHLEN];
200 if (!strcmp(file, "-")) {
201 Parse_File(parser, cli, "(stdin)", stdin);
202 Var_SetGlobal("MAKEFILE", "");
206 if (strcmp(curdir, objdir) == 0 || file[0] == '/') {
210 * we've chdir'd, rebuild the path name
212 snprintf(path, MAXPATHLEN, "%s/%s", curdir, file);
214 #if THIS_BREAKS_THINGS
216 * XXX The realpath stuff breaks relative includes
217 * XXX in some cases. The problem likely is in
218 * XXX parse.c where it does special things in
219 * XXX ParseDoInclude if the file is relateive
220 * XXX or absolute and not a system file. There
221 * XXX it assumes that if the current file that's
222 * XXX being included is absolute, that any files
223 * XXX that it includes shouldn't do the -I path
224 * XXX stuff, which is inconsistant with historical
225 * XXX behavior. However, I can't pentrate the mists
226 * XXX further, so I'm putting this workaround in
227 * XXX here until such time as the underlying bug
230 if (realpath(path, path) == NULL) {
233 stream = fopen(path, "r");
236 stream = fopen(path, "r");
238 if (stream != NULL) {
239 if (strcmp(file, ".depend") != 0)
240 Var_SetGlobal("MAKEFILE", file);
241 Parse_File(parser, cli, path, stream);
246 /* look in -I and system include directories. */
247 fname = estrdup(file);
250 name = Path_FindFile(fname, &cli->parseIncPath);
252 name = Path_FindFile(fname, &cli->sysIncPath);
255 stream = fopen(name, "r");
256 if (stream != NULL) {
258 * set the MAKEFILE variable desired by System V fans
259 * -- the placement of the setting here means it gets
260 * set to the last makefile specified, as it is set
263 if (strcmp(file, ".depend") != 0)
264 Var_SetGlobal("MAKEFILE", name);
265 Parse_File(parser, cli, name, stream);
271 return (FALSE); /* no makefile found */
275 * Read in the built-in rules first, followed by the specified
276 * makefiles or the one of the default makefiles. Finally .depend
280 ReadInputFiles(Parser *parser, CLI *cli, const char curdir[], const char objdir[])
283 char defsysmk[] = PATH_DEFSYSMK; /* Path of sys.mk */
284 Lst sysMkPath = Lst_Initializer(sysMkPath);
287 Path_Expand(defsysmk, &cli->sysIncPath, &sysMkPath);
288 if (Lst_IsEmpty(&sysMkPath))
289 Fatal("make: no system rules (%s).", PATH_DEFSYSMK);
291 LST_FOREACH(ln, &sysMkPath) {
292 char *name = Lst_Datum(ln);
293 if (!ReadMakefile(parser, cli, name, curdir, objdir))
294 Fatal("make: cannot open %s.", name);
296 Lst_Destroy(&sysMkPath, free);
299 if (!Lst_IsEmpty(&cli->makefiles)) {
302 LST_FOREACH(ln, &cli->makefiles) {
303 char *name = Lst_Datum(ln);
304 if (!ReadMakefile(parser, cli, name, curdir, objdir))
305 Fatal("make: cannot open %s.", name);
307 } else if (ReadMakefile(parser, cli, "BSDmakefile", curdir, objdir)) {
308 /* read BSDmakefile */
309 } else if (ReadMakefile(parser, cli, "makefile", curdir, objdir)) {
311 } else if (ReadMakefile(parser, cli, "Makefile", curdir, objdir)) {
314 /* No Makefile found */
317 ReadMakefile(parser, cli, ".depend", curdir, objdir);
323 * Handle argument to warning option.
326 Main_ParseWarn(const char *arg, int iscmd)
330 static const struct {
334 { "dirsyntax", WARN_DIRSYNTAX },
339 if (arg[0] == 'n' && arg[1] == 'o') {
344 for (i = 0; options[i].option != NULL; i++)
345 if (strcmp(arg, options[i].option) == 0)
348 if (options[i].option == NULL)
354 warn_cmd |= options[i].flag;
355 warn_nocmd &= ~options[i].flag;
356 warn_flags |= options[i].flag;
358 warn_nocmd |= options[i].flag;
359 warn_cmd &= ~options[i].flag;
360 warn_flags &= ~options[i].flag;
364 warn_flags |= (options[i].flag & ~warn_nocmd);
366 warn_flags &= ~(options[i].flag | warn_cmd);
374 * Parse a given argument vector. Called from main() and from
375 * Main_ParseArgLine() when the .MAKEFLAGS target is used.
377 * XXX: Deal with command line overriding .MAKEFLAGS in makefile
380 * Various global and local flags will be set depending on the flags
384 MainParseArgs(CLI *cli, int argc, char **argv)
387 Boolean found_dd = FALSE;
390 optind = 1; /* since we're called more than once */
392 #define OPTFLAGS "ABC:D:E:I:PSV:Xd:ef:ij:km:nqrstvx:"
394 if ((optind < argc) && strcmp(argv[optind], "--") == 0) {
397 if ((c = getopt(argc, argv, OPTFLAGS)) == -1) {
404 MFLAGS_append("-A", NULL);
407 if (chdir(optarg) == -1)
408 err(1, "chdir %s", optarg);
411 Var_SetGlobal(optarg, "1");
412 MFLAGS_append("-D", optarg);
415 Path_AddDir(&cli->parseIncPath, optarg);
416 MFLAGS_append("-I", optarg);
419 Lst_AtEnd(&cli->variables, estrdup(optarg));
420 MFLAGS_append("-V", optarg);
423 cli->expandVars = FALSE;
427 MFLAGS_append("-B", NULL);
428 unsetenv("MAKE_JOBS_FIFO");
432 MFLAGS_append("-P", NULL);
436 MFLAGS_append("-S", NULL);
439 char *modules = optarg;
441 for (; *modules; ++modules)
459 if (modules[1] == '1') {
460 debug |= DEBUG_GRAPH1;
463 else if (modules[1] == '2') {
464 debug |= DEBUG_GRAPH2;
487 warnx("illegal argument to d option "
491 MFLAGS_append("-d", optarg);
495 Lst_AtEnd(&envFirstVars, estrdup(optarg));
496 MFLAGS_append("-E", optarg);
499 checkEnvFirst = TRUE;
500 MFLAGS_append("-e", NULL);
503 Lst_AtEnd(&cli->makefiles, estrdup(optarg));
507 MFLAGS_append("-i", NULL);
512 cli->forceJobs = TRUE;
513 jobLimit = strtol(optarg, &endptr, 10);
514 if (jobLimit <= 0 || *endptr != '\0') {
515 warnx("illegal number, -j argument -- %s",
519 MFLAGS_append("-j", optarg);
524 MFLAGS_append("-k", NULL);
527 Path_AddDir(&cli->sysIncPath, optarg);
528 MFLAGS_append("-m", optarg);
532 MFLAGS_append("-n", NULL);
535 cli->queryFlag = TRUE;
536 /* Kind of nonsensical, wot? */
537 MFLAGS_append("-q", NULL);
540 cli->builtins = FALSE;
541 MFLAGS_append("-r", NULL);
545 MFLAGS_append("-s", NULL);
549 MFLAGS_append("-t", NULL);
553 MFLAGS_append("-v", NULL);
556 if (Main_ParseWarn(optarg, 1) != -1)
557 MFLAGS_append("-x", optarg);
570 * Parse the rest of the arguments.
571 * o Check for variable assignments and perform them if so.
572 * o Check for more flags and restart getopt if so.
573 * o Anything else is taken to be a target and added
574 * to the end of the "create" list.
576 for (; *argv != NULL; ++argv, --argc) {
577 if (Parse_IsVar(*argv)) {
578 char *ptr = MAKEFLAGS_quote(*argv);
580 Var_Append(".MAKEFLAGS", ptr, VAR_GLOBAL);
581 Parse_DoVar(*argv, VAR_CMD);
584 } else if ((*argv)[0] == '-') {
585 if ((*argv)[1] == '\0') {
587 * (*argv) is a single dash, so we
590 } else if (found_dd) {
592 * Double dash has been found, ignore
593 * any more options. But what do we do
594 * with it? For now treat it like a target.
596 Lst_AtEnd(&cli->create, estrdup(*argv));
599 * (*argv) is a -flag, so backup argv and
600 * argc. getopt() expects options to start
601 * in the 2nd position.
608 } else if ((*argv)[0] == '\0') {
609 Punt("illegal (null) argument.");
612 Lst_AtEnd(&cli->create, estrdup(*argv));
619 * Used by the parse module when a .MFLAGS or .MAKEFLAGS target
620 * is encountered and by main() when reading the .MAKEFLAGS envariable.
621 * Takes a line of arguments and breaks it into its
622 * component words and passes those words and the number of them to the
623 * MainParseArgs function.
624 * The line should have all its leading whitespace removed.
627 * Only those that come from the various arguments.
630 Main_ParseArgLine(CLI *cli, const char line[], int mflags)
635 MAKEFLAGS_break(&aa, line);
637 brk_string(&aa, line, TRUE);
639 MainParseArgs(cli, aa.argc, aa.argv);
644 * Try to change the current working directory to path, and return
645 * the whole path using getcwd().
647 * @note for amd managed mount points we really should use pawd(1).
650 chdir_verify_path(const char path[], char newdir[])
655 * Check if the path is a directory. If not fail without reporting
658 if (stat(path, &sb) < 0) {
661 if (S_ISDIR(sb.st_mode) == 0) {
666 * The path refers to a directory, so we try to change into it. If we
667 * fail, or we fail to obtain the path from root to the directory,
668 * then report an error and fail.
670 if (chdir(path) < 0) {
671 warn("warning: %s", path);
674 if (getcwd(newdir, MAXPATHLEN) == NULL) {
675 warn("warning: %s", path);
682 determine_objdir(const char machine[], char curdir[], char objdir[])
685 char newdir[MAXPATHLEN];
686 char mdpath[MAXPATHLEN];
690 * Find a path to where we are... [-C directory] might have changed
691 * our current directory.
693 if (getcwd(curdir, MAXPATHLEN) == NULL)
696 if (stat(curdir, &sa) == -1)
697 err(2, "%s", curdir);
700 * The object directory location is determined using the
701 * following order of preference:
703 * 1. MAKEOBJDIRPREFIX`cwd`
705 * 3. PATH_OBJDIR.${MACHINE}
707 * 5. PATH_OBJDIRPREFIX`cwd`
709 * If one of the first two fails, use the current directory.
710 * If the remaining three all fail, use the current directory.
712 if ((env = getenv("MAKEOBJDIRPREFIX")) != NULL) {
713 snprintf(mdpath, MAXPATHLEN, "%s%s", env, curdir);
714 if (chdir_verify_path(mdpath, newdir)) {
715 strcpy(objdir, newdir);
718 strcpy(objdir, curdir);
722 if ((env = getenv("MAKEOBJDIR")) != NULL) {
723 if (chdir_verify_path(env, newdir)) {
724 strcpy(objdir, newdir);
727 strcpy(objdir, curdir);
731 snprintf(mdpath, MAXPATHLEN, "%s.%s", PATH_OBJDIR, machine);
732 if (chdir_verify_path(mdpath, newdir)) {
733 strcpy(objdir, newdir);
737 if (chdir_verify_path(PATH_OBJDIR, newdir)) {
738 strcpy(objdir, newdir);
742 snprintf(mdpath, MAXPATHLEN, "%s%s", PATH_OBJDIRPREFIX, curdir);
743 if (chdir_verify_path(mdpath, newdir)) {
744 strcpy(objdir, newdir);
748 strcpy(objdir, curdir);
752 * Initialize various make variables.
753 * MAKE also gets this name, for compatibility
754 * .MAKEFLAGS gets set to the empty string just in case.
755 * MFLAGS also gets initialized empty, for compatibility.
758 InitVariables(const char progname[])
761 const char *machine_arch;
762 const char *machine_cpu;
764 Var_SetGlobal("MAKE", progname);
765 Var_SetGlobal(".MAKEFLAGS", "");
766 Var_SetGlobal("MFLAGS", "");
768 Var_SetGlobal(".DIRECTIVE_MAKEENV", "YES");
769 Var_SetGlobal(".ST_EXPORTVAR", "YES");
771 Var_SetGlobal("MAKE_VERSION", MAKE_VERSION);
775 * Get the name of this type of MACHINE from utsname
776 * so we can share an executable for similar machines.
777 * (i.e. m68k: amiga hp300, mac68k, sun3, ...)
779 * Note that while MACHINE is decided at run-time,
780 * MACHINE_ARCH is always known at compile time.
782 if ((machine = getenv("MACHINE")) == NULL) {
786 static struct utsname utsname;
787 if (uname(&utsname) == -1)
789 machine = utsname.machine;
793 if ((machine_arch = getenv("MACHINE_ARCH")) == NULL) {
795 machine_arch = MACHINE_ARCH;
797 machine_arch = "unknown";
802 * Set machine_cpu to the minumum supported CPU revision based
803 * on the target architecture, if not already set.
805 if ((machine_cpu = getenv("MACHINE_CPU")) == NULL) {
806 if (!strcmp(machine_arch, "i386"))
807 machine_cpu = "i386";
808 else if (!strcmp(machine_arch, "alpha"))
811 machine_cpu = "unknown";
814 Var_SetGlobal("MACHINE", machine);
815 Var_SetGlobal("MACHINE_ARCH", machine_arch);
816 Var_SetGlobal("MACHINE_CPU", machine_cpu);
822 * We have read the entire graph and need to make
823 * a list of targets to create. If none were given
824 * on the command line, we consult the parsing
825 * module to find the main target(s) to create.
828 build_stuff(CLI *cli)
831 Lst targs = Lst_Initializer(targs);
833 if (Lst_IsEmpty(&cli->create))
834 Parse_MainName(&targs);
836 Targ_FindList(&targs, &cli->create, TARG_CREATE);
838 /* Traverse the graph, checking on all the targets */
840 status = Compat_Run(&targs, cli->queryFlag);
842 status = Make_Run(&targs, cli->queryFlag);
845 Lst_Destroy(&targs, NOFREE);
851 * The main function, for obvious reasons. Initializes variables
852 * and a few modules, then parses the arguments give it in the
853 * environment and on the command line. Reads the system makefile
854 * followed by either Makefile, makefile or the file given by the
855 * -f argument. Sets the .MAKEFLAGS PMake variable based on all the
856 * flags it has received by then uses either the Make or the Compat
857 * module to create the initial list of targets.
860 * If -q was given, exits -1 if anything was out-of-date. Else it exits
864 * The program exits when done. Targets are created. etc. etc. etc.
867 main(int argc, char **argv)
871 int status; /* exit status */
872 char curdir[MAXPATHLEN]; /* startup directory */
873 char objdir[MAXPATHLEN]; /* where we chdir'ed to */
874 const char *make_flags;
876 /*------------------------------------------------------------*
877 * This section initializes stuff that require no input.
878 *------------------------------------------------------------*/
880 * Initialize program globals.
882 beSilent = FALSE; /* Print commands as executed */
883 ignoreErrors = FALSE; /* Pay attention to non-zero returns */
884 noExecute = FALSE; /* Execute all commands */
885 keepgoing = FALSE; /* Stop on error */
886 allPrecious = FALSE; /* Remove targets when interrupted */
887 touchFlag = FALSE; /* Actually update targets */
888 usePipes = TRUE; /* Catch child output in pipes */
889 debug = 0; /* No debug verbosity, please. */
892 jobLimit = DEFMAXJOBS;
893 compatMake = FALSE; /* No compat mode */
896 * Initialize program flags.
898 Lst_Init(&cli.makefiles);
899 Lst_Init(&cli.variables);
900 Lst_Init(&cli.create);
901 TAILQ_INIT(&cli.parseIncPath);
902 TAILQ_INIT(&cli.sysIncPath);
904 cli.expandVars = TRUE;
905 cli.builtins = TRUE; /* Read the built-in rules */
906 cli.queryFlag = FALSE;
907 cli.forceJobs = FALSE;
910 * Initialize the various modules.
913 Shell_Init(DEFSHELLNAME);
918 /*------------------------------------------------------------*
919 * This section initializes stuff that depend on things
920 * in the enviornment, command line, or a input file.
921 *------------------------------------------------------------*/
924 InitVariables(argv[0]);
927 * First snag things out of the MAKEFLAGS environment
928 * variable. Then parse the command line arguments.
930 if ((make_flags = getenv("MAKEFLAGS")) != NULL) {
931 Main_ParseArgLine(&cli, make_flags, 1);
933 MainParseArgs(&cli, argc, argv);
935 determine_objdir(Var_Value("MACHINE", VAR_GLOBAL), curdir, objdir);
936 Var_SetGlobal(".CURDIR", curdir);
937 Var_SetGlobal(".OBJDIR", objdir);
940 * Set up the .TARGETS variable to contain the list of targets to be
941 * created. If none specified, make the variable empty -- the parser
942 * will fill the thing in with the default or .MAIN target.
944 if (Lst_IsEmpty(&cli.create)) {
945 Var_SetGlobal(".TARGETS", "");
949 LST_FOREACH(ln, &cli.create) {
950 char *name = Lst_Datum(ln);
952 Var_Append(".TARGETS", name, VAR_GLOBAL);
956 Dir_CurObj(curdir, objdir);
959 * If no user-supplied system path was given (through the -m option)
960 * add the directories from the DEFSYSPATH (more than one may be given
961 * as dir1:...:dirn) to the system include path.
963 if (TAILQ_EMPTY(&cli.sysIncPath)) {
964 char syspath[] = PATH_DEFSYSPATH;
965 char *start = syspath;
968 while ((cp = strsep(&start, ":")) != NULL) {
969 Path_AddDir(&cli.sysIncPath, cp);
973 if (getenv("MAKE_JOBS_FIFO") != NULL)
974 cli.forceJobs = TRUE;
977 * Be compatible if user did not specify -j and did not explicitly
978 * turned compatibility on
980 if (compatMake == FALSE && cli.forceJobs == FALSE)
986 parser.create = &cli.create;
987 parser.parseIncPath = &cli.parseIncPath;
988 parser.sysIncPath = &cli.sysIncPath;
990 ReadInputFiles(&parser, &cli, curdir, objdir);
992 /*------------------------------------------------------------*
993 * We are finished processing inputs.
994 *------------------------------------------------------------*/
996 /* Install all the flags into the MAKE envariable. */
1000 p = Var_Value(".MAKEFLAGS", VAR_GLOBAL);
1001 if (p != NULL && *p != '\0')
1002 setenv("MAKEFLAGS", p, 1);
1006 * For compatibility, look at the directories in the VPATH variable
1007 * and add them to the search path, if the variable is defined. The
1008 * variable's value is in the same format as the PATH envariable, i.e.
1009 * <directory>:<directory>:<directory>...
1011 if (Var_Exists("VPATH", VAR_CMD)) {
1012 Buffer *buf = Var_Subst("${VPATH}", VAR_CMD, FALSE);
1013 char *start = Buf_Data(buf);
1016 while ((cp = strsep(&start, ":")) != NULL) {
1017 Path_AddDir(&dirSearchPath, cp);
1020 Buf_Destroy(buf, TRUE);
1024 * Now that all search paths have been read for suffixes et al, it's
1025 * time to add the default search path to their lists...
1029 /* print the initial graph, if the user requested it */
1033 if (Lst_IsEmpty(&cli.variables)) {
1034 status = build_stuff(&cli);
1036 /* Print the values of variables requested by the user. */
1037 Var_Print(&cli.variables, cli.expandVars);
1041 * This should be a "don't care", we do not check
1042 * the status of any files. It might make sense to
1043 * modify Var_Print() to indicate that one of the
1044 * requested variables did not exist, and use that
1045 * as the return status.
1048 status = cli.queryFlag ? 1 : 0;
1051 /* print the graph now it's been processed if the user requested it */
1056 TAILQ_DESTROY(&cli.sysIncPath);
1057 TAILQ_DESTROY(&cli.parseIncPath);
1059 Lst_Destroy(&cli.create, free);
1060 Lst_Destroy(&cli.variables, free);
1061 Lst_Destroy(&cli.makefiles, free);