1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 /* 27 * globals.cc 28 * 29 * This declares all global variables 30 */ 31 32 /* 33 * Included files 34 */ 35 #include <nl_types.h> 36 #include <mk/defs.h> 37 #include <sys/stat.h> 38 39 /* 40 * Defined macros 41 */ 42 43 /* 44 * typedefs & structs 45 */ 46 47 /* 48 * Global variables used by make only 49 */ 50 FILE *dependency_report_file; 51 52 /* 53 * Global variables used by make 54 */ 55 Boolean allrules_read=false; 56 Name posix_name; 57 Name svr4_name; 58 Boolean sdot_target; /* used to identify s.m(/M)akefile */ 59 Boolean all_parallel; 60 Boolean assign_done; 61 int foo; 62 Boolean build_failed_seen; 63 Name built_last_make_run; 64 Name c_at; 65 Boolean cleanup; 66 Boolean close_report; 67 Boolean command_changed; 68 Boolean commands_done; 69 Chain conditional_targets; 70 Name conditionals; 71 Boolean continue_after_error; /* `-k' */ 72 Property current_line; 73 Name current_make_version; 74 Name current_target; 75 short debug_level; 76 Cmd_line default_rule; 77 Name default_rule_name; 78 Name default_target_to_build; 79 Name dmake_group; 80 Name dmake_max_jobs; 81 Name dmake_mode; 82 DMake_mode dmake_mode_type; 83 Name dmake_output_mode; 84 DMake_output_mode output_mode = txt1_mode; 85 Name dmake_odir; 86 Name dmake_rcfile; 87 Name done; 88 Name dot; 89 Name dot_keep_state; 90 Name dot_keep_state_file; 91 Name empty_name; 92 Boolean fatal_in_progress; 93 int file_number; 94 #if 0 95 Boolean filter_stderr; /* `-X' */ 96 #endif 97 Name force; 98 Name ignore_name; 99 Boolean ignore_errors; /* `-i' */ 100 Boolean ignore_errors_all; /* `-i' */ 101 Name init; 102 int job_msg_id; 103 Boolean keep_state; 104 Name make_state; 105 timestruc_t make_state_before; 106 Dependency makefiles_used; 107 Name makeflags; 108 // Boolean make_state_locked; // Moved to lib/mksh 109 Name make_version; 110 char mbs_buffer2[(MAXPATHLEN * MB_LEN_MAX)]; 111 char *mbs_ptr; 112 char *mbs_ptr2; 113 int mtool_msgs_fd; 114 Boolean depinfo_already_read = false; 115 Boolean no_action_was_taken = true; /* true if we've not ** 116 ** run any command */ 117 118 Boolean no_parallel = false; 119 Name no_parallel_name; 120 Name not_auto; 121 Boolean only_parallel; 122 Boolean parallel; 123 Name parallel_name; 124 Name localhost_name; 125 int parallel_process_cnt; 126 Percent percent_list; 127 Dyntarget dyntarget_list; 128 Name plus; 129 Name pmake_machinesfile; 130 Name precious; 131 Name primary_makefile; 132 Boolean quest; /* `-q' */ 133 short read_trace_level; 134 Boolean reading_dependencies = false; 135 Name recursive_name; 136 int recursion_level; 137 short report_dependencies_level = 0; /* -P */ 138 Boolean report_pwd; 139 Boolean rewrite_statefile; 140 Running running_list; 141 char *sccs_dir_path; 142 Name sccs_get_name; 143 Name sccs_get_posix_name; 144 Cmd_line sccs_get_rule; 145 Cmd_line sccs_get_org_rule; 146 Cmd_line sccs_get_posix_rule; 147 Name get_name; 148 Cmd_line get_rule; 149 Name get_posix_name; 150 Cmd_line get_posix_rule; 151 Boolean send_mtool_msgs; /* `-K' */ 152 Boolean all_precious; 153 Boolean silent_all; /* `-s' */ 154 Boolean report_cwd; /* `-w' */ 155 Boolean silent; /* `-s' */ 156 Name silent_name; 157 char *stderr_file = NULL; 158 char *stdout_file = NULL; 159 Boolean stdout_stderr_same; 160 Dependency suffixes; 161 Name suffixes_name; 162 Name sunpro_dependencies; 163 Boolean target_variants; 164 const char *tmpdir = NOCATGETS("/tmp"); 165 const char *temp_file_directory = NOCATGETS("."); 166 Name temp_file_name; 167 short temp_file_number; 168 time_t timing_start; 169 wchar_t *top_level_target; 170 Boolean touch; /* `-t' */ 171 Boolean trace_reader; /* `-D' */ 172 Boolean build_unconditional; /* `-u' */ 173 pathpt vroot_path = VROOT_DEFAULT; 174 Name wait_name; 175 wchar_t wcs_buffer2[MAXPATHLEN]; 176 wchar_t *wcs_ptr; 177 wchar_t *wcs_ptr2; 178 nl_catd catd; 179 long int hostid; 180 181 /* 182 * File table of contents 183 */ 184