From owner-freebsd-questions@FreeBSD.ORG Mon Sep 19 14:42:47 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46A8316A41F for ; Mon, 19 Sep 2005 14:42:47 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66E4A43D48 for ; Mon, 19 Sep 2005 14:42:44 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j8JEggII013149; Mon, 19 Sep 2005 17:42:43 +0300 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j8JEgRDD037007; Mon, 19 Sep 2005 17:42:27 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j8JEgRH0037006; Mon, 19 Sep 2005 17:42:27 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 19 Sep 2005 17:42:27 +0300 From: Giorgos Keramidas To: Harlan Stenn Message-ID: <20050919144227.GA36987@flame.pc> References: <20050919011517.GA8214@flame.pc> <20050919015416.D8D1D39AB3@ntp1.ntp.isc.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050919015416.D8D1D39AB3@ntp1.ntp.isc.org> Cc: freebsd-questions@freebsd.org Subject: Re: gmake/make dependency problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2005 14:42:47 -0000 On 2005-09-19 01:54, Harlan Stenn wrote: > I could try and post fragments, but I'd probably mess it up. > > The full tarball is at: > > http://ntp.isc.org/~stenn/ntp-4.2.0b.tar.gz > > and I to duplicate the problem I recommend: > > % tar xzf ... > % cd ntp-4.2.0b > % mkdir A.foo > % cd A.foo > % ../configure > % make > > and it will soon die in ntpd/, at which point: > > % cd ntpd > % make -n ntpd-opts.c > > should show it trying to run autogen to produce ../../ntpd/ntpd-opts.c > (which exists and should have "proper" timestamps with respect to its > dependencies), and: It doesn't though. ntpd-opts.c depends on ntpd-opts.def, and their timestamps are: % flame:/home/keramida/ws/ntp/ntp-4.2.0b/obj/ntpd$ make -ndm % Examining ntpd-opts.def...modified 11:01:00 Aug 30, 2005...up-to-date. % Examining ntpdbase-opts.def...modified 10:57:02 Aug 26, 2005...up-to-date. % Examining ntpd-opts.c...non-existent...modified before source...out-of-date. % cd ../../ntpd && autogen ntpd-opts.def % update time: 17:38:09 Sep 19, 2005 % [...] % flame:/home/keramida/ws/ntp/ntp-4.2.0b/obj/ntpd$ ls -ld ../../ntpd/ntpd-opts.c ../../ntpd/ntpd-opts.def % -r--r--r-- 1 keramida keramida - 32849 Aug 30 11:02 ../../ntpd/ntpd-opts.c % -rw-rw-r-- 1 keramida keramida - 1255 Aug 30 11:01 ../../ntpd/ntpd-opts.def It seems that ntpd-opts.c has a timestamp 1 minute after ntpd-opts.def, and this is what triggers the autogen run. > % gmake ntpd-opts.c > > should say the target is up-to-date. I don't think this is correct. The obj/ntpd/Makefile file contains: % flame:/home/keramida/ws/ntp/ntp-4.2.0b/obj/ntpd$ grep ntpd-opts.def * | cat -n % 1 EXTRA_DIST = ntpd-opts.def ntpdbase-opts.def ntpdsim-opts.def $(BUILT_SOURCES) % 2 ntpd-opts.c: ntpd-opts.def ntpdbase-opts.def % 3 cd $(srcdir) && autogen ntpd-opts.def % 4 ntpd.1: ntpd-opts.def ntpdbase-opts.def % 5 cd $(srcdir) && autogen -Tagman1.tpl -bntpd ntpd-opts.def % 6 ntpd-opts.texi ntpd-opts.menu: ntpd-opts.def % 7 -Taginfo.tpl -DLEVEL=section ntpd-opts.def % flame:/home/keramida/ws/ntp/ntp-4.2.0b/obj/ntpd$ The second matched line clearly states that ntpd-opts.c depends on ntpd-opts.def and their timestamps are backwards. make(1) is right in this case, IMHO