This is the mail archive of the
mailing list for the GCC project.
Re: struggling with make inside GCC MELT
2012/1/10 Ian Lance Taylor <email@example.com>:
> 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.
> The effect is that anything which depends on FILE is only rebuilt if the
> contents of FILE changes.
Hmm, will it work to just write as
commands to create FILE.tmp
move-if-change FILE.tmp FILE
> Note that everything I show above is required. ?A naive approach would
> omit the "; @true" but it is necessary.
Then what the role here "; @true" play? I'm still confused by the usage.
Thanks for explanation.