[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: 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:


        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
        echo 'ECOS_GLOBAL_LDFLAGS = -mcpu=arm7tdmi -Wl,--gc-sections 
-Wl,-static -g
        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
                             -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,
                             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:




Fixes the problem.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]