On Saturday, September 20, 2014 3:38:03 am Bruce Evans wrote:
> On Sat, 20 Sep 2014, Julian Elischer wrote:
> 
> > On 9/18/14, 10:41 PM, Will Andrews wrote:
> >> Author: will
> >> Date: Thu Sep 18 14:41:57 2014
> >> New Revision: 271771
> >> URL: http://svnweb.freebsd.org/changeset/base/271771
> >> 
> >> Log:
> >>    Fix incremental builds involving non-root users with read-only source 
> >> files.
> >>       Makefiles should not assume that source files can be overwritten. 
> >> This is the
> >>    common case for Perforce source trees.
> >
> > I'm concerned that just adding -f may not really be fixing the problem..
> > why are the files getting overwritten? I'm not sure forcing an overwrite is 
> > teh right answer to read-only sources.
> 
> The log message is confused.  Source files are not being overwritten.
> They are being copied to object directories using cp.  Then if they
> are read-only in the source directory, they are read-only in the object 
> directory, even if they are copied without -p so as to clobber their
> timestamps (their mode is still preserved).  Then if the source file's
> mtime is changed, either by actually changing the file or just by
> clobbering its mtime, the copy in the object directory becomes out of
> date.  Then the cp to make it up to date fails because it is read-only.

I ran into this the other day with the cxgbe firmware config files during
a kernel build due to the same issue.  That is due to entries in sys/conf/files
like this:

t4fw_cfg.fw             optional cxgbe                                  \
        dependency      "$S/dev/cxgbe/firmware/t4fw_cfg.txt"            \
        compile-with    "${CP} ${.ALLSRC} ${.TARGET}"                   \
        no-obj no-implicit-rule                                         \
        clean           "t4fw_cfg.fw"

Not sure if the correct solution there is to force -f for all of these or if
${CP} should be 'cp -f' for kernel builds.

-- 
John Baldwin
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to