bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make to consider files checksum


From: Eli Zaretskii
Subject: Re: GNU make to consider files checksum
Date: Sat, 12 Apr 2008 11:34:17 +0300

> From: Giuseppe Scrivano <address@hidden>
> Date: Fri, 11 Apr 2008 23:45:02 +0200
> 
> Other systems like scons already support this feature and it would be
> great to have it for GNU Make too.
> 
> I attached a patch against the current CVS to add --use-checksum to
> GNU Make, it is just a proof-of-concept but it shows that adding this
> feature can really boost a remake.

Thanks.  (I'm not the head maintainer, so please wait for Paul and
others to respond.)

> +int
> +compute_checksum(struct file *new)
> +{
> +  int checksum = 0;
> +  FILE *f;
> +  char buffer [4096];
> +  
> +  f = fopen (new->name, "r");

This needs to use "rb", not "r".

Also, what about directories? they cannot be fopen'ed and fread, at
least not on all supported systems.




reply via email to

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