mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Samuelson <peter@cadcamlab.org>
To: brendan.simon@bigpond.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: touch commands in Makefiles
Date: Sat, 26 Jan 2002 19:29:58 -0600	[thread overview]
Message-ID: <20020127012958.GB645@cadcamlab.org> (raw)

[Brendan Simon]
> Why are header file touched in Makefiles ?

Dependency reasons.  Header files depend on whatever CONFIG options
they reference, and this is implemented via proxy header files.  Say
you have foo.c which includes foo_bar.h which makes a reference to
CONFIG_BAR.  The correct dep tree would be

  foo.o: foo.c foo_bar.h CONFIG_BAR

but, as it turned out, it was easier / more efficient to represent the
tree as

  foo.o: foo.c foo_bar.h
  foo_bar.h: CONFIG_BAR

This second tree is not strictly correct -- foo_bar.h does *not* in
fact need to be rebuilt when CONFIG_BAR changes -- so the 'touch'
commands are there to make it work correctly.

If you don't like it (and most of us don't!), you should patch your
tree with Keith Owens's 2.5 makefile structure, "kbuild-2.5".  It fixes
this problem (and many others).  It is hoped that kbuild-2.5 will be
merged with Linux 2.5 in the near future.

Peter

             reply	other threads:[~2002-01-27  1:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-27  1:29 Peter Samuelson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-01-25  5:54 Brendan J Simon
2002-01-26 10:38 ` Keith Owens
2002-01-28  8:17   ` Marian Jancar
2002-01-28  8:20     ` Keith Owens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020127012958.GB645@cadcamlab.org \
    --to=peter@cadcamlab.org \
    --cc=brendan.simon@bigpond.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®