Date: Tue, 14 Oct 2014 09:10:40 +0200 From: Matthias Apitz <guru@unixarea.de> To: Stefan Esser <se@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: gmake && file time precision of 1 second Message-ID: <20141014071040.GA1596@unixarea.DDR.dd> In-Reply-To: <543BCC97.7080608@freebsd.org> References: <20141013092018.GA2737@unixarea.DDR.dd> <543BCC97.7080608@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
El día Monday, October 13, 2014 a las 02:59:03PM +0200, Stefan Esser escribió: > > after moving to a faster server it turned out that gmake sometimes forget > > to ar the *.o into the lib; I investigated it and it turned out that the > > *.o files have the same modification time (in seconds) as the target > > lib.a (which was produced/updated in the last directory worked on) and > > gmake thinks that the lib.a is uptodate. > > > > Any idea how to address this in the Makefiles? > > > > Well I could place (and it works) a 'sleep 1' into the loop, but I think > > that there is some better way. > > Could this be a solutionn for you: > > $ sysctl -d vfs.timestamp_precision > vfs.timestamp_precision: File timestamp precision (0: seconds, 1: sec + > ns accurate to 1/HZ, 2: sec + ns truncated to ms, 3+: sec + ns (max. > precision)) > > Beware: This is a global variable, higher resolution timestamps are > not supported on all filesystems, and not all programs check for the > sub-second part of the timestamp value ... Thanks. I was hoping that there is a Makefile solution in the sense that if objs and target lib have the same age (i.e. the same second of age), that gmake assumes that the obj is newer. We will re-think our Makefiles, write into different lib.a and merge them in a final step by unpacking the libs with ar again. Thx matthias -- Matthias Apitz | /"\ ASCII Ribbon Campaign: E-mail: guru@unixarea.de | \ / - No HTML/RTF in E-mail WWW: http://www.unixarea.de/ | X - No proprietary attachments phone: +49-170-4527211 | / \ - Respect for open standards | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141014071040.GA1596>