From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 13 12:07:20 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8F2DEAA for ; Mon, 13 Oct 2014 12:07:20 +0000 (UTC) Received: from BAY004-OMC1S15.hotmail.com (bay004-omc1s15.hotmail.com [65.54.190.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0149A49 for ; Mon, 13 Oct 2014 12:07:20 +0000 (UTC) Received: from BAY169-W12 ([65.54.190.60]) by BAY004-OMC1S15.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Mon, 13 Oct 2014 05:06:14 -0700 X-TMN: [r9paJlsGz81aHeCtRZwZJanAC5lj99aAX7VRGg4nfAA=] X-Originating-Email: [tris_vern@hotmail.com] Message-ID: From: Tristan Verniquet To: Matthias Apitz , freebsd hackers Subject: RE: gmake && file time precision of 1 second Date: Mon, 13 Oct 2014 22:06:14 +1000 Importance: Normal In-Reply-To: <20141013092018.GA2737@unixarea.DDR.dd> References: <20141013092018.GA2737@unixarea.DDR.dd> MIME-Version: 1.0 X-OriginalArrivalTime: 13 Oct 2014 12:06:14.0529 (UTC) FILETIME=[161EF710:01CFE6DE] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2014 12:07:20 -0000 We have this problem too using recursive make and I am interested in =0A= what other solutions there are. Currently we sleep until the start of the n= ext =0A= second using a custom binary=2C but it does slow down the =0A= build. Another thing I've tried though haven't put much thought into is touching t= he lib file -1 second after each ar command. Tristan > Date: Mon=2C 13 Oct 2014 11:20:18 +0200 > From: guru@unixarea.de > To: freebsd-hackers@freebsd.org > Subject: gmake && file time precision of 1 second >=20 >=20 > Hello=2C >=20 > I have a large project where a shell script fires up > gmake runs in subdirs as: >=20 > for dir in src norm print ....=3B do=20 > cd $dir > gmake > cd .. > done >=20 > in each subdir *.c are compiled to *.o and the resulting *.o are ar'ed > into all the same lib.a=3B based on normal Makefile rules like: >=20 > SRCS =3D f1.c f2.c > OBJS =3D $(SRCS:.c=3D.o) >=20 > .c.o: > $(CC) -c ... $*.c >=20 > lib.a:: $(OBJS) > $(AR) $@ $(OBJS) >=20 >=20 > after moving to a faster server it turned out that gmake sometimes forget > to ar the *.o into the lib=3B I investigated it and it turned out that th= e > *.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. >=20 > Any idea how to address this in the Makefiles? >=20 > Well I could place (and it works) a 'sleep 1' into the loop=2C but I thin= k > that there is some better way. >=20 > Thx >=20 > matthias > --=20 > 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_Campaig= n > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe=2C send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg" =