上一页 1 ··· 69 70 71 72 73 74 75 76 77 ··· 104 下一页
摘要: 继续翻译 When you add to a variable's value with `+=', `make' actsessentially as if you had included the extra text in the initialdefinition of the variable. If you defined it first with `:=', makingit a simply-expanded variable, `+=' adds to that simply-expandeddefinition, and expan 阅读全文
posted @ 2012-10-04 10:55 健哥的数据花园 阅读(218) 评论(0) 推荐(0)
摘要: 继续翻译6.6 Appending More Text to Variables====================================Often it is useful to add more text to the value of a variable alreadydefined. You do this with a line containing `+=', like this: objects += another.oThis takes the value of the variable `objects', and adds the text 阅读全文
posted @ 2012-10-04 10:28 健哥的数据花园 阅读(201) 评论(0) 推荐(0)
摘要: 继续翻译6.5 Setting Variables=====================To set a variable from the makefile, write a line starting with thevariable name followed by `=' or `:='. Whatever follows the `=' or`:=' on the line becomes the value. For example, objects = main.o foo.o bar.o utils.odefines a variable n 阅读全文
posted @ 2012-10-04 10:05 健哥的数据花园 阅读(187) 评论(0) 推荐(0)
摘要: 继续翻译6.4 How Variables Get Their Values==================================Variables can get values in several different ways: * You can specify an overriding value when you run `make'. *Note Overriding Variables: Overriding. * You can specify a value in the makefile, either with an assignment... 阅读全文
posted @ 2012-10-04 09:32 健哥的数据花园 阅读(179) 评论(0) 推荐(0)
摘要: 上例子首先,在linux 环境中,如此设置:#test=1234567#export test#echo $test1234567#然后编辑 Makefileall: @echo $(test)运行结果:#make 1234567#结束 阅读全文
posted @ 2012-10-04 09:29 健哥的数据花园 阅读(2617) 评论(0) 推荐(0)
摘要: 上例子gao:=123all: @echo $(gao)如果运行 make ,结果是 123如果运行 make gao=456, 结果是456那么如果改变一下呢。比如我们想要:即便你在命令行给出了变量的值,我也不想放弃呢?修改例子:override gao:=123all: @echo $(gao)如果运行 make ,结果是 123因为有 override 的存在,make gao=456 的结果仍然是 123结束 阅读全文
posted @ 2012-10-04 09:02 健哥的数据花园 阅读(634) 评论(0) 推荐(0)
摘要: 继续翻译 The only restriction on this sort of use of nested variablereferences is that they cannot specify part of the name of a functionto be called. This is because the test for a recognized function nameis done before the expansion of nested references. For example, ifdef do_sort func := sort ... 阅读全文
posted @ 2012-10-04 08:51 健哥的数据花园 阅读(225) 评论(0) 推荐(0)
摘要: 继续翻译 A computed variable name need not consist entirely of a singlevariable reference. It can contain several variable references, aswell as some invariant text. For example, a_dirs := dira dirb 1_dirs := dir1 dir2 a_files := filea fileb 1_files := file1 file2 ifeq "$(use_a)"... 阅读全文
posted @ 2012-10-04 08:10 健哥的数据花园 阅读(264) 评论(0) 推荐(0)
摘要: 继续翻译 The previous example shows two levels of nesting, but any number oflevels is possible. For example, here are three levels: x = y y = z z = u a := $($($(x)))Here the innermost `$(x)' expands to `y', so `$($(x))' expands to`$(y)' which in turn expands to `z'; now we have `$(z) 阅读全文
posted @ 2012-10-04 08:04 健哥的数据花园 阅读(208) 评论(0) 推荐(0)
摘要: 继续翻译6.3.2 Computed Variable Names-----------------------------Computed variable names are a complicated concept needed only forsophisticated makefile programming. For most purposes you need notconsider them, except to know that making a variable with a dollar signin its name might have strange resu. 阅读全文
posted @ 2012-10-03 17:31 健哥的数据花园 阅读(210) 评论(0) 推荐(0)
上一页 1 ··· 69 70 71 72 73 74 75 76 77 ··· 104 下一页