/* Argument parsing and main program of GNU Make.
Copyright (C) 1988-2022 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>. */
#include "makeint.h"
#include "os.h"
#include "filedef.h"
#include "dep.h"
#include "variable.h"
#include "job.h"
#include "commands.h"
#include "rule.h"
#include "debug.h"
#include "getopt.h"
#include "shuffle.h"
#include <assert.h>
#ifdef _AMIGA
# include <dos/dos.h>
# include <proto/dos.h>
#endif
#ifdef WINDOWS32
# include <windows.h>
# include <io.h>
#ifdef HAVE_STRINGS_H
# include <strings.h> /* for strcasecmp */
#endif
# include "pathstuff.h"
# include "sub_proc.h"
# include "w32err.h"
#endif
#ifdef __EMX__
# include <sys/types.h>
# include <sys/wait.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#ifdef _AMIGA
int __stack = 20000; /* Make sure we have 20K of stack space */
#endif
#ifdef VMS
int vms_use_mcr_command = 0;
int vms_always_use_cmd_file = 0;
int vms_gnv_shell = 0;
int vms_legacy_behavior = 0;
int vms_comma_separator = 0;
int vms_unix_simulation = 0;
int vms_report_unix_paths = 0;
/* Evaluates if a VMS environment option is set, only look at first character */
static int
get_vms_env_flag (const char *name, int default_value)
{
char * value;
char x;
value = getenv (name);
if (value == NULL)
return default_value;
x = toupper (value[0]);
switch (x)
{
case '1':
case 'T':
case 'E':
return 1;
break;
case '0':
case 'F':
case 'D':
return 0;
}
}
#endif
#if defined HAVE_WAITPID || defined HAVE_WAIT3
# define HAVE_WAIT_NOHANG
#endif
#ifndef HAVE_UNISTD_H
int chdir ();
#endif
#ifndef STDC_HEADERS
# ifndef sun /* Sun has an incorrect decl in a header. */
void exit (int) NORETURN;
# endif
double atof ();
#endif
static void clean_jobserver (int status);
static void print_data_base (void);
static void print_version (void);
static void decode_switches (int argc, const char **argv, int env);
static struct variable *define_makeflags (int all, int makefile);
static char *quote_for_env (char *out, const char *in);
static void initialize_global_hash_tables (void);
/* True if C is a switch value that corresponds to a short option. */
#define short_option(c) ((c) <= CHAR_MAX)
/* The structure used to hold the list of strings given
in command switches of a type that takes strlist arguments. */
struct stringlist
{
const char **list; /* Nil-terminated list of strings. */
unsigned int idx; /* Index into above. */
unsigned int max; /* Number of pointers allocated. */
};
/* The recognized command switches. */
/* Nonzero means do extra verification (that may slow things down). */
int verify_flag;
/* Nonzero means do not print commands to be executed (-s). */
static int silent_flag;
static const int default_silent_flag = 0;
/* Nonzero means either -s was given, or .SILENT-with-no-deps was seen. */
int run_silent = 0;
/* Nonzero means just touch the files
that would appear to need remaking (-t) */
int touch_flag;
/* Nonzero means just print what commands would need to be executed,
don't actually execute them (-n). */
int just_print_flag;
/* Print debugging info (--debug). */
static struct stringlist *db_flags = 0;
static int debug_flag = 0;
int db_level = 0;
/* Synchronize output (--output-sync). */
char *output_sync_option = 0;
/* Environment variables override makefile definitions. */
int env_overrides = 0;
/* Nonzero means ignore status codes returned by commands
executed to remake files. Just treat them all as successful (-i). */
int ignore_errors_flag = 0;
/* Nonzero means don't remake anything, just print the data base
that results from reading the makefile (-p). */
int print_data_base_flag = 0;
/* Nonzero means don't remake anything; just return a nonzero status
if the specified targets are not up to date (-q). */
int question_flag = 0;
/* Nonzero means do not use any of the builtin rules (-r) / variables (-R). */
int no_builtin_rules_flag = 0;
int no_builtin_variables_flag = 0;
/* Nonzero means keep going even if remaking some file fails (-k). */
int keep_going_flag;
static const int default_keep_going_flag = 0;
/* Nonzero means check symlink mtimes. */
int check_symlink_flag = 0;
/* Nonzero means print directory before starting and when done (-w). */
int print_directory;
static int print_directory_flag = -1;
static const int default_print_directory_flag = -1;
/* Nonzero means print version information. */
int print_version_flag = 0;
/* List of makefiles given with -f switches. */
static struct stringlist *makefiles = 0;
/* Size of the stack when we started. */
#ifdef SET_STACK_SIZE
struct rlimit stack_limit;
#endif
/* Number of job slots for parallelism. */
unsigned int job_slots;
#define INVALID_JOB_SLOTS (-1)
static unsigned int master_job_slots = 0;
static int arg_job_slots = INVALID_JOB_SLOTS;
static const int default_job_slots = INVALID_JOB_SLOTS;
/* Value of job_slots that means no limit. */
static const int inf_jobs = 0;
/* Authorization for the jobserver. */
char *jobserver_auth = NULL;
/* Style for the jobserver. */
static char *jobserver_style = NULL;
/* Shuffle mode for goals and prerequisites. */
static char *shuffle_mode = NULL;
/* Handle for the mutex to synchronize output of our children under -O. */
static char *sync_mutex = NULL;
/* Maximum load average at which multiple jobs will be run.
Negative values mean unlimited, while zero means limit to
zero load (which could be useful to start infinite jobs remotely
but one at a time locally). */
double max_load_average = -1.0;
double default_load_average = -1.0;
/* List of directories given with -C switches. */
static struct stringlist *directories = 0;
/* List of include directories given with -I switches. */
static struct stringlist *include_dirs = 0;
/* List of files given with -o switches. */
static struct stringlist *old_files = 0;
/* List of files given with -W switches. */
static struct stringlist *new_files = 0;
/* List of strings to be eval'd. */
static struct stringlist *eval_strings = 0;
/* If nonzero, we should just print usage and exit. */
static int print_usage_flag = 0;
/* If nonzero, we should print a warning message
for each reference to an undefined variable. */
int warn_undefined_variables_flag;
/* If nonzero, always build all targets, regardless of whether
they appear out of date or not. */
static int always_make_set = 0;
int always_make_flag = 0;
/* If nonzero, we're in the "try to rebuild makefiles" phase. */
int rebuilding_makefiles = 0;
/* Remember the original value of the SHELL variable, from the environment. */
struct variable shell_var;
/* This character introduces a command: it's the first char on the line. */
char cmd_prefix = '\t';
/* Count the number of commands we've invoked, that might change something in
the filesystem. Start with 1 so calloc'd memory never matches. */
unsigned long command_count = 1;
/* Remember the location of the name of the batch file from stdin. */
static int stdin_offset = -1;
/* The usage output. We write it this way to make life easier for the
translators, especially those trying to translate to right-to-left
languages like Hebrew. */
static const char *const usage[] =
{
N_("Options:\n"),
N_("\
-b, -
没有合适的资源?快使用搜索试试~ 我知道了~
windows 安装make (gnu make)
共448个文件
c:51个
h:40个
obj:39个
5星 · 超过95%的资源 需积分: 1 43 下载量 103 浏览量
2023-03-04
14:25:01
上传
评论 1
收藏 6.05MB ZIP 举报
温馨提示
windows 安装make (gnu make) 步骤说明参考:https://blog.csdn.net/qq_31868891/article/details/129333319
资源推荐
资源详情
资源评论
收起资源包目录
windows 安装make (gnu make) (448个子文件)
respf.$$$ 331B
make.1 12KB
ABOUT-NLS 92KB
abspath 2KB
configure.ac 19KB
addprefix 1KB
addsuffix 737B
Makefile.am 7KB
Makefile.am 6KB
Makefile.am 901B
config.ami 9KB
README.Amiga 3KB
andor 1KB
archives 7KB
AUTHORS 4KB
automatic 3KB
basename 1KB
build_w32.bat 12KB
builddos.bat 5KB
run_make_tests.bat 814B
bs-nl 4KB
main.c 115KB
job.c 112KB
read.c 104KB
function.c 72KB
variable.c 59KB
remake.c 58KB
sub_proc.c 51KB
vmsjobs.c 42KB
implicit.c 41KB
file.c 36KB
dir.c 35KB
glob.c 35KB
getopt.c 29KB
arscan.c 29KB
getloadavg.c 25KB
default.c 21KB
posixos.c 20KB
misc.c 19KB
expand.c 19KB
commands.c 19KB
vpath.c 19KB
vmsify.c 18KB
rule.c 18KB
vms_progname.c 14KB
w32os.c 14KB
vms_export_symbol.c 14KB
findprog-in.c 13KB
hash.c 13KB
fnmatch.c 13KB
output.c 12KB
strcache.c 9KB
ar.c 8KB
pathstuff.c 8KB
remote-cstms.c 8KB
signame.c 7KB
load.c 7KB
vmsfunctions.c 6KB
shuffle.c 6KB
dirent.c 5KB
alloca.c 5KB
getopt1.c 4KB
guile.c 4KB
posixfcn.c 3KB
w32err.c 3KB
vms_exit.c 3KB
remote-stub.c 3KB
amiga.c 3KB
concat-filename.c 2KB
misc.c 2KB
loadapi.c 2KB
version.c 1KB
call 3KB
ChangeLog 237KB
clean 911B
close_stdout 258B
makefile.com 5KB
config_flags_pm.com 2KB
vms_export_symbol_test.com 937B
comments 1KB
compile 7KB
conditionals 3KB
configure 456KB
COPYING 34KB
CURDIR 313B
README.customs 4KB
dash-B 2KB
dash-C 2KB
dash-d 270B
dash-e 284B
dash-f 5KB
dash-I 4KB
dash-k 3KB
dash-l 2KB
dash-n 2KB
dash-q 2KB
dash-r 986B
dash-s 918B
dash-t 2KB
dash-W 2KB
共 448 条
- 1
- 2
- 3
- 4
- 5
资源评论
- 两斤香菜2023-07-26虽然篇幅较短,但是核心信息齐全,能够满足大部分安装需求。
- 易烫YCC2023-07-26不仅介绍了安装GNU Make的步骤,还提供了相关资源链接,方便进一步深入学习。
- Orca是只鲸2023-07-26文档中提供了清晰的命令示例,让人能够快速上手安装GNU Make。
- 巧笑倩兮Evelina2023-07-26作者在讲解过程中尽量避免使用过于专业的术语,让读者更容易理解和跟随。
- 赶路的稻草人2023-07-26这个文件详细介绍了在Windows上安装GNU Make的步骤,对于初学者来说非常友好。
不良小人
- 粉丝: 52
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功