Ok...
I'm just a beginner with make, but while I was trying to make the
following makefile, make aborted the compilation complaining about
an assertion failed in its code (not mine). Maybe I did something nasty, but I
believe it should report my error instead of saying 'assertion failed'...
However, it aborts when I 'make debug'. Consider that in the subdirectorys I use
again the += on CCOPT, and this seems to be the problem. It seems also like that if
I change the line:
debug: CCOPT += -Wall -ggdb -D_DEBUG
into the line:
debug: CCOPT = $(CCOPT) -Wall -ggdb -D_DEBUG
everything works fine. Isn't that the same thing? Oh, well, here's everything I have
about it.
Let me know if I did something wrong,
Thanks for your effort for making things better,
Bye, Carlo
Here is the error:
---------------------
gcc -O2 -DCOUNTERS -Wall -ggdb -D_DEBUG -I. -I./include -lpthread -o exe/newbind
main.c newbind.c error/error.o counters/counters.o
make: expand.c:489: allocated_variable_append: Assertion
`current_variable_set_list->next != 0' failed.
Here is the makefile:
---------------------
SRCDIR = .
INCLDIR = $(SRCDIR)/include
export
CC = gcc
CCOPT = -O2 -DCOUNTERS
INCLS = -I. -I$(INCLDIR)
DEFS =
CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
default: all
all: main
#***********************************************************
# If i comment out the line below everything seems all right
#***********************************************************
debug: CCOPT += -Wall -ggdb -D_DEBUG
debug: all
main: error/error.o counters/counters.o newbind.c main.c
$(CC) $(CFLAGS) -lpthread -o exe/newbind main.c newbind.c error/error.o
counters/counters.o
counters.o: include/counters.h counters/counters.c
cd counters && $(MAKE) # -w -C counters
error.o: include/error.h error/error.c
cd error && $(MAKE) # -w -C error
clean:
-rm -f ./exe/*;
-rm -f ./error/*.o
-rm -f ./counters/*.o
-rm -f ./*.o
----------------------------------
------------------------
Here is everything I have:
----------------------------
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-pc-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <[EMAIL PROTECTED]>.
----------------------------
System is a Debian GNU linux with kernel 2.4.6 and glibc 2.2.3
--
*** bye, Carlo!
_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make