⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 foreach

📁 make debug tool. You can use this tool to debug Makefile
💻
字号:
#                                                                    -*-perl-*-# Updated 6.16.93  variable "MAKE" is default was environment override# For make 3.63 and above$description = "The following test creates a makefile to verifytest the foreach function.";$details = "This is a test of the foreach function in gnu make.This function starts with a space separated list ofnames and a variable. Each name in the list is subsitutedinto the variable and the given text evaluated. The generalform of the command is $(foreach var,$list,$text). Severaltypes of foreach loops are tested\n";open(MAKEFILE,"> $makefile");# The Contents of the MAKEFILE ...# On WIN32 systems, the user's path is found in %Path% ($Path)#$pathvar = (($port_type eq 'Windows') ? "Path" : "PATH");print MAKEFILE <<EOF;foo = bletch null \@ garfnull :=space = ' 'auto_var = udef space CC null $pathvar MAKE foo CFLAGS WHITE \@ <av = \$(foreach var, \$(auto_var), \$(origin \$(var)) )override WHITE := BLACKfor_var = \$(addsuffix .c,foo \$(null) \$(foo) \$(space) \$(av) )fe = \$(foreach var2, \$(for_var),\$(subst .c,.o, \$(var2) ) )all: auto for2auto :\t\@echo \$(av)for2:\t\@echo \$(fe)EOFclose(MAKEFILE);&run_make_with_options($makefile,                      "-e WHITE=WHITE CFLAGS=",                      &get_logfile);# Create the answer to what should be produced by this Makefile$answer = "undefined file default file environment default file command line override automatic automaticfoo.o bletch.o null.o @.o garf.o .o    .o undefined.o file.o default.o file.o environment.o default.o file.o command.o line.o override.o automatic.o automatic.o\n";&compare_output($answer,&get_logfile(1));1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -