gmake/make dependency problem
Giorgos Keramidas
keramida at ceid.upatras.gr
Mon Sep 19 07:42:47 PDT 2005
On 2005-09-19 01:54, Harlan Stenn <stenn at ntp.isc.org> 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
More information about the freebsd-questions
mailing list