From owner-freebsd-questions@FreeBSD.ORG Mon Sep 19 19:00:41 2005 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> 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 A524816A41F for <freebsd-questions@freebsd.org>; Mon, 19 Sep 2005 19:00:41 +0000 (GMT) (envelope-from stenn@ntp.isc.org) Received: from ntp1.ntp.isc.org (ntp1.ntp.isc.org [204.152.184.126]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5451843D45 for <freebsd-questions@freebsd.org>; Mon, 19 Sep 2005 19:00:39 +0000 (GMT) (envelope-from stenn@ntp.isc.org) Received: from localhost (localhost [127.0.0.1]) by ntp1.ntp.isc.org (Postfix) with ESMTP id DA21939AB7; Mon, 19 Sep 2005 19:00:38 +0000 (UTC) (envelope-from stenn@ntp1.isc.org) Received: from ntp1.ntp.isc.org ([127.0.0.1]) by localhost (ntp1.isc.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26749-02; Mon, 19 Sep 2005 19:00:37 +0000 (UTC) Received: from ntp1.isc.org (localhost [127.0.0.1]) by ntp1.ntp.isc.org (Postfix) with ESMTP; Mon, 19 Sep 2005 19:00:37 +0000 (UTC) (envelope-from stenn@ntp1.isc.org) To: Giorgos Keramidas <keramida@ceid.upatras.gr> In-Reply-To: Message from Giorgos Keramidas <keramida@ceid.upatras.gr> of "Mon, 19 Sep 2005 17:42:27 +0300." <20050919144227.GA36987@flame.pc> X-Mailer: MH-E 7.4.2; nmh 1.0.4; XEmacs 21.4 (patch 14) Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Mon, 19 Sep 2005 19:00:37 +0000 From: Harlan Stenn <stenn@ntp.isc.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on ntp1.isc.org Message-Id: <20050919190038.DA21939AB7@ntp1.ntp.isc.org> Cc: Harlan Stenn <stenn@ntp.isc.org>, 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 <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 19 Sep 2005 19:00:41 -0000 I'm confused. I believe that: a: b means that 'a' depends on 'b', and if 'b' has a later timestamp than 'a' then the rule will be invoked to produce a new 'a' from whatever is done with 'b'. In this case, 'a' is ntpd-opts.c, and 'b' is ntpd-opts.def. As can be seen on your system and mine: > It seems that ntpd-opts.c has a timestamp 1 minute after ntpd-opts.def, which means it is up-to-date with respect to its dependencies. You will also note the VPATH in the Makefile includes the source directory. I believe this is a VPATH issues. Am I missing something? I appreciate your working with me on this issue. H -- > > > > 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-opt > s.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 $(BUI > LT_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 >