Posts: 3 | Thanked: 0 times | Joined on May 2010
#1
I tried to upload libneon to extraz-devel. And I have the next problem:
debian/rules:32: *** Recursive variable `CFLAGS' references itself (eventually). Stop.

debian/rules:
...
#CFLAGS = -Wall -g
LDFLAGS = -L/usr/lib
CFLAGS = "$(CFLAGS) -I/usr/include"

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O3
endif
...

And yes, it works in my own scracthbox.
So, what is the problem it can be?
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#2
make expands variables whenever you use them (unless you use ":="). This leads to

CFLAGS = "$(CFLAGS) -I/usr/include"

being left recursive with an ever expanding expansion of the variable.

Try to rewrite it to

CFLAGS += -I/usr/include"

and it might very well work better. This is semantically equivalent to what I'm guessing that you want to do.
 
Posts: 3 | Thanked: 0 times | Joined on May 2010
#3
I tried. Result was the same.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#4
Could you perhaps supply the rules file?
 
Posts: 3 | Thanked: 0 times | Joined on May 2010
#5
Yes, of course.You can get it here:
http://osll.spb.ru/repositories/entr...les?format=raw
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#6
If you tried using "+=" and it didn't change anything, I have no idea.

A little Google gives me this:

`Recursive variable `xxx' references itself (eventually). Stop.'
This means you've defined a normal (recursive) make variable xxx that, when it's expanded, will refer to itself (xxx). This is not allowed; either use simply-expanded variables (:=) or use the append operator (+=).

This supports my initial comment.

Source: http://sunsite.ualberta.ca/Documenta...r/make_16.html
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 17:42.