[RFC] Prevent unnecessary recompilation for trivial params.def changes

Tom de Vries Tom_deVries@mentor.com
Tue Sep 8 11:27:00 GMT 2015


On 08/09/15 13:00, Andreas Schwab wrote:
> Tom de Vries <Tom_deVries@mentor.com> writes:
>
>> @@ -3236,6 +3236,10 @@ installdirs:
>>   	$(mkinstalldirs) $(DESTDIR)$(man1dir)
>>   	$(mkinstalldirs) $(DESTDIR)$(man7dir)
>>
>> +params.list: $(srcdir)/params-list.h $(srcdir)/params.def
>> +	$(CPP) $(srcdir)/params-list.h | sed 's/^#.*//;/^$$/d' > tmp-params.list
>> +	$(SHELL) $(srcdir)/../move-if-change tmp-params.list params.list
>> +
>
> You need a stamp file to avoid continuous rebuilding, don't you?
>

After a trivial change and a rebuild, I see the files being rebuild:
...
/usr/bin/gcc-4.6 -E src/gcc/params-list.h | sed 's/^#.*//;/^$/d' > 
tmp-params.list
/bin/bash src/gcc/../move-if-change tmp-params.list params.list
...

After a subsequent rebuild I don't see anything being rebuild. So I 
don't observe 'continuous rebuilding'.

Thanks,
- Tom



More information about the Gcc-patches mailing list