0

Hi

I am creating Makefile and it gives me following error

Makefile:124: *** unterminated call to function `foreach': missing `)'.  Stop.

The Makefile around line 124 is

.PHONY: popiso
popiso: isolinux_cfg $(foreach x,$(_$(country)_pops_roles), pop_iso_$(x))  $(isomedia)
        @echo $@
        @echo
        @echo allhostname $(allhostname)
        @echo
        @echo
        @echo allnetwork_setup $(allnetwork_setup)
        @sudo cp $(addsuffix .ks.cfg,$(allhostname)) $(isomedia)
        @sudo cp isolinux.cfg $(isomedia)/isolinux/
        @echo ready to make iso

$(_$(country)_pops_roles) gets expanded correctly and it calls pop_iso_XXXX 4 times as it suppose to.
And then it gives above mentioned error.

I'm using RHEL6 - 64bit machine
I'm not that deep into Makefile/Gmake, and so I'm not sure what's the issue.

Hemanshu

3
Contributors
4
Replies
27
Views
3 Years
Discussion Span
Last Post by hemanshurpatel
0

My guess is that there is a hidden file in the directory which the shell is not able to expand, resulting in the error. Check for that.

0

Well nothing like that, I did check. I did run make with debug, it doesnt give any error and yet it fails.
the strange part is, that if I replace

popiso: isolinux_cfg $(foreach x,$(_$(country)_pops_roles), pop_iso_$(x)) $(isomedia)

with

popiso: 
    @echo testing

error stays the same.How can this be?
This means error is due to some other part and its, just showing this line due to god knows what.

0

Do you have any foreach loops before line 124? While line 124 is the one with the reported error, the cause of the error could be before it.

0

Nope there is none.
I'm not sure what this error is but running make file with -i (ignore error) flags, makes it to run and generate final product successfully.

So this error, doesnt effect anything that is to be generated via make.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.