Mon 15 Sep 2008 05:48:37 PM UTC, comment #3:
I reproduced the behavior you saw without svn by replacing the end of the makefile with:
$(ECOS_MAKE) : $(ECOS_DIR)
$(ECOS_DIR) :
mkdir -p $(ECOS_DIR)/include/pkgconf/
{ \
echo 'ECOS_GLOBAL_CFLAGS = -mcpu=arm7tdmi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -finit-priority'; \
echo 'ECOS_GLOBAL_LDFLAGS = -mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib'; \
echo 'ECOS_COMMAND_PREFIX = arm-elf-'; \
} > $(ECOS_MAKE)
Looking at the manual, "After all makefiles have been checked, if any have actually been changed, `make' starts with a clean slate and reads all the makefiles over again". That suggests that it should re-evaluate all these variables. But using "make --debug=all" suggests that make isn't restarting.
Looking at the source code, it seems to be checking whether the modification time on the makefile has changed:
if (file->updated && g->changed &&
mtime != file->mtime_before_update)
{
/* Updating was done. If this is a makefile and
just_print_flag or question_flag is set (meaning
-n or -q was given and this file was specified
as a command-line target), don't change STATUS.
If STATUS is changed, we will get re-exec'd, and
enter an infinite loop. */
But makefile doesn't give a rule for updating $(ECOS_MAKE). It just says that it depends on $(ECOS_DIR). Telling make that it needn't do anything to update $(ECOS_MAKE) once it's updated $(ECOS_DIR), by changing:
$(ECOS_MAKE) : $(ECOS_DIR)
To:
$(ECOS_MAKE) : $(ECOS_DIR);
Fixes the problem.
|