[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #24251] Random error including rebuilt makefiles
From: |
Martin Dorey |
Subject: |
[bug #24251] Random error including rebuilt makefiles |
Date: |
Mon, 15 Sep 2008 17:48:38 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 |
Follow-up Comment #3, bug #24251 (project make):
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.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24251>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/