This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: struggling with make inside GCC MELT


On Tue, Jan 10, 2012 at 07:12:50AM -0800, Ian Lance Taylor wrote:
> Basile Starynkevitch <basile@starynkevitch.net> writes:
> 
> > I am fighting against makefile issues on the GCC MELT branch.
> >
> > Much more details are given in 
> >    http://stackoverflow.com/q/8727896/841108
> > and in 
> >    http://lists.gnu.org/archive/html/help-make/2012-01/msg00017.html
> >
> > So (unless you ask) I won't repeat them here.
> >    
> > (and the bugs affect mostly me, not the usual MELT user)
> >
> > The symptoms are:
> >
> >    1. make -j don't work
> >
> >    2. "make ; make" is running a lot of useless commands for the
> > second make and it should not 
> >
> >
> > I probably am not understanding when stampfiles in Makefiles should be
> > used. The main point is that MELT cares much more about file contents
> > than file timestamps.
> 
> Your stackoverflow question has way too much detail for me to
> understand.  I think you need to debug this like any other issue: reduce
> to the minimal test case.
> 
> Stamp files in make work like this:
> 
> FILE: STAMP-FILE; @true
> STAMP-FILE: DEPENDENCIES
> 	commands to create FILE.tmp
> 	move-if-change FILE.tmp FILE
>         touch $@
> 
> What this says is: if any of DEPENDENCIES change, then run the commands
> to create FILE.tmp.  The move-if-change shell script then compares
> FILE.tmp and FILE; if they are different, it moves FILE.tmp to FILE,
> updating the timestamp.  If they are not different, FILE is left
> unchanged, with the same timestamp.


A big thanks for the reply. Then I can ask the next question: when should I use time stamps files? 
Only for dependencies upon content, or something else?

Cheers.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]