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

📄 flavors

📁 make debug tool. You can use this tool to debug Makefile
💻
字号:
#                                                                    -*-perl-*-#$Id: flavors,v 1.3 2005/12/24 03:13:57 rockyb Exp $$description = "Test various flavors of make variable setting.";$details = "";open(MAKEFILE, "> $makefile");# The Contents of the MAKEFILE ...print MAKEFILE <<'EOF';foo = $(bar)bar = ${ugh}ugh = Helloall: multi ; @echo $(foo)multi: ; $(multi)x := fooy := $(x) barx := laternullstring :=space := $(nullstring) $(nullstring)next: ; @echo $x$(space)$ydefine multi@echo hiecho thereendefifdef BOGUSdefine@echo errorendefendifdefine outer define inner  A = B endefendef$(eval $(outer))outer: ; @echo $(inner)EOF# END of Contents of MAKEFILEclose(MAKEFILE);# TEST #1# -------&run_make_with_options($makefile, "", &get_logfile);$answer = "hi\necho there\nthere\nHello\n";&compare_output($answer, &get_logfile(1));# TEST #2# -------&run_make_with_options($makefile, "next", &get_logfile);$answer = "later foo bar\n";&compare_output($answer, &get_logfile(1));# TEST #3# -------&run_make_with_options($makefile, "BOGUS=true", &get_logfile, 512);$answer = "$makefile:24: *** empty variable name.  Stop.Command-line arguments:	\"-f work/variables/flavors.mk BOGUS=true\"";&compare_output($answer, &get_logfile(1));# TEST #4# -------&run_make_with_options($makefile, "outer", &get_logfile);$answer = "A = B\n";&compare_output($answer, &get_logfile(1));# Clean up from "old style" testing.  If all the above tests are converted to# run_make_test() syntax than this line can be removed.$makefile = undef;# -------------------------# Make sure that prefix characters apply properly to define/endef values.## There's a bit of oddness here if you try to use a variable to hold the# prefix character for a define.  Even though something like this:##       define foo#       echo bar#       endef##       all: ; $(V)$(foo)## (where V=@) can be seen by the user to be obviously different than this:##       define foo#       $(V)echo bar#       endef##       all: ; $(foo)## and the user thinks it should behave the same as when the "@" is literal# instead of in a variable, that can't happen because by the time make# expands the variables for the command line and sees it begins with a "@" it# can't know anymore whether the prefix character came before the variable# reference or was included in the first line of the variable reference.# TEST #5# -------run_make_test('define FOO$(V1)echo hello$(V2)echo worldendefall: ; @$(FOO)', '', 'helloworld');# TEST #6# -------run_make_test(undef, 'V1=@ V2=@', 'helloworld');# TEST #7# -------run_make_test('define FOO$(V1)echo hello$(V2)echo worldendefall: ; $(FOO)', 'V1=@', 'helloecho worldworld');# TEST #8# -------run_make_test(undef, 'V2=@', 'echo hellohelloworld');# TEST #9# -------run_make_test(undef, 'V1=@ V2=@', 'helloworld');# TEST #10# -------# Test the basics; a "@" internally to the variable applies to only one line.# A "@" before the variable applies to the entire variable.run_make_test('define FOO@echo helloecho worldendefdefine BARecho helloecho worldendefall: foo barfoo: ; $(FOO)bar: ; @$(BAR)', '', 'helloecho worldworldhelloworld');1;

⌨️ 快捷键说明

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