Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #18887

Re: Makefile doesn't detect header file change

From Kaz Kylheku <kaz@kylheku.com>
Newsgroups comp.lang.c
Subject Re: Makefile doesn't detect header file change
Date 2012-03-20 02:48 +0000
Organization Aioe.org NNTP Server
Message-ID <20120319193313.571@kylheku.com> (permalink)
References <5ff2f2a1-d2e7-4c2b-bd24-d728d7588904@9g2000pbn.googlegroups.com>

Show all headers | View raw


On 2012-03-20, lovecreatesbeauty <lovecreatesbeauty@gmail.com> wrote:
> My Makefile doesn't detect the change of header files.
>
> a.c b.c : b.h

Here you are saying that a.c and b.c are objects that are built from b.h.

But that is not the case, since they are not built; a.c and b.c they are
primary objects with no dependencies.

It is b.o and a.o which depend on b.h.

> $ touch b.h
> $ make

Hmm, a better message might be "no rule to make a.c from b.h",
since you've declared the dependency, and a.c is out of date
with respect to b.h under that dependency, and there isn't 
any way to make a.c from b.h".

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Makefile doesn't detect header file change lovecreatesbeauty <lovecreatesbeauty@gmail.com> - 2012-03-19 19:15 -0700
  Re: Makefile doesn't detect header file change Ian Collins <ian-news@hotmail.com> - 2012-03-20 15:46 +1300
  Re: Makefile doesn't detect header file change Kaz Kylheku <kaz@kylheku.com> - 2012-03-20 02:48 +0000
    Re: Makefile doesn't detect header file change lovecreatesbeauty <lovecreatesbeauty@gmail.com> - 2012-03-19 23:08 -0700
    Re: Makefile doesn't detect header file change lovecreatesbeauty <lovecreatesbeauty@gmail.com> - 2012-03-20 02:32 -0700
      Re: Makefile doesn't detect header file change Keith Thompson <kst-u@mib.org> - 2012-03-20 11:48 -0700

csiph-web