English 中文(简体)
GNU • 电话
原标题:GNU Make fail with foreach->eval->call

因此,我难以在一份表格的档案中为一股重复的线 :

dir := XXX  
include dir/Makefile  
VAR_1 += $(VAR2)    # where VAR2 and VAR4 are defined in the included makefile    
VAR_3 += $(VAR4)    

形式如下:

dir:= XXX1 XXX2 XXX3 ...
$(foreach elements,$(dir),$(eval $(call function,$(elements))))

define function  
$(eval include $(1)/Makefile)  
$(eval VAR_1+=$$(VAR2))  
$(eval VAR_3+=$$(VAR4))  
endef

但 我正在发现错误,因为档案似乎无法确定如何建立档案。 我是新来做的,我尝试过许多功能上的变动、 for等等,但没有任何工作。 如果我把所有事情重新归结到每一行,就明确列出一切。 我是否做过不正确的事情?

问题回答

当你在马克森特为确定或包括物品(非塔附属企业或行动)的基础辛迪加有宏观时,这些宏观因素在读物时立即扩大。 这确实是有意义的,因为需要加以扩大,以说明什么内容。 但是,由于这一点,规则定义的顺序——特别是后来在档案中定义的其他宏观——尚待确定,并将扩大为空洞。

举例来说,如果执行<条码>,<条码>功能/代码>,<条码>尚未被定义为任何内容,从而最终无所作为。 因此,你最终不列入你想要的任何子文件。

http://www.un.org/Depts/DGACM/index_french.htm

另外,你不需要<代码>eval。 在职能范围内进行电话(尽管他们可能在此案件中赢得任何伤害,但如果VAR4,则可能产生意外结果。 扩展至有<代码><$/code>的物品。





相关问题
Mysql Foreach Child show Max() and Min() in a single line

Is it possible to use a select statement so that it returns Max and min columns of a child row foreach Parent record? So foreach parent record that has MANY child records I want to see the Max and ...

Foreach in SQL?

I m not quite sure how to do this in SQL. Here it is in pseudocode: Take the list of nodes with content type X. For each node, take the value of field Y. Insert into term_nodes VALUES ((tid that ...

Custom container requirement to work with Qt s foreach

What is the bare minimum amount of code to create a custom container that would work with Qt foreach macro? I have this so far template< class T > class MyList { public: class iterator { ...

foreach loops & stdclass objects

I ve seen similar questions on here but I can t seem to apply the solutions to my problem. I have a variable called $results which I got from an API. I ll change the proper nouns so as to protect my ...

PHP - Foreach loops and ressources

I m using a foreach loop to process a large set of items, unfortunately it s using alot of memory. (probably because It s doing a copy of the array). Apparently there is a way to save some memory with ...

Hide a column programmatically in MS-Access

I want to hide or show a column based on variable data from a users selection. How do you set a column to hidden in MS-Access 2003? For Example, After user change event... For Each ctl In Me....

iterating over map and array simultaneously in a for loop

I am having some trouble creating a for loop within a constructor to iterate over a map and an array at the same time. Here, it is indicated that this cannot be done with an enhanced for loop. I have ...

Changing a struct inside another struct in a foreach loop

The following code prints (when invoking MyMethod): 0 0 0 1 I would expect it to print: 0 0 1 1 Why is this? Code: private struct MyStruct { public MyInnerStruct innerStruct; } private ...

热门标签