mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>, linux-kernel@vger.kernel.org
Subject: Re: [patch] 2.4.19-pre6 standardize {aic7xxx,aicasm}/Makefile
Date: Sun, 07 Apr 2002 09:00:44 +1000	[thread overview]
Message-ID: <25618.1018134044@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Sat, 06 Apr 2002 12:58:07 MST." <200204061958.g36Jw7987298@aslan.scsiguy.com>

On Sat, 06 Apr 2002 12:58:07 -0700, 
"Justin T. Gibbs" <gibbs@scsiguy.com> wrote:
>>Standardize the makefiles for aic7xxx and aic7xxx/aicasm.
>>  Use standard kbuild 2.4 rules.
>
>Are these documented somewhere?  I emulated "scsi/Makefile" some
>time back, but it must be out of date with current conventions.

No, you have to understand the interaction between the magic make
variables and the undocumented processing in Rules.make.  This is one
of the reasons that the new kernel build mechanism (kbuild 2.5) has
complete documentation on its language and how it works.

>Three other quick questions:
>
>1) Why doesn't "make dep" pickup the dependencies you have added
>   explicitly the aic7xxx/Makefile?  I would expect at least this
>   dependency to be picked up:
>
>+
>+# Only aic7xxx_core.c includes aic7xxx_seq.h.
>+aic7xxx_core.o: aic7xxx_seq.h
>
>    The other, indirect, dependencies (through aic7xxx.h) are picked
>    up in every other OS this driver supports.  I suppose "make dep"'s
>    shortcuts mean you have to hard code stuff to make it work.

Congratulations, you just found one of the (many) problems with make dep.
make dep is only run at the start (before aic7xxx_seq.h is generated)
and it silently ignores includes for files that do not exist at that
time.  So no dependencies for aic7xxx_seq.h are detected.

make dep does a reasonable job at dependencies for files that always
exist.  It is no good for generated files, you have to explicitly
specify such dependencies.

kbuild 2.5 is better.  You still have to tell make that a generated
file must be created before make can build anything that includes that
file, otherwise you get compile errors on a parallel build, this is a
make restriction.  However the kbuild 2.5 dependency tracking is
continuous, it is not run once like make dep, so kbuild 2.5 does more
accurate tracking of dependencies.

>2) Are there plans to allow "down tree" Makefiles to list there own
>   clean files?  Having to modify the top level Makefile is a bit messy.

Already done in kbuild 2.5.  Most clean targets are automatically
generate as a side effect of the kbuild 2.5 statements, no user action
required.  You can add your own clean and mrproper entries for the very
rare cases when they are not automatically added.

>3) Why remove the ability to override the module target name?  I eventually
>   renamed my driver's main file to avoid this issue because I will be adding
>   a second driver to the aic7xxx/Makefile (U320), but this same thing
>   will probably come up again.

Your code was the only one that tried to override the module name and
that was because your code was the only one that was breaking the
kbuild rules.  When a conglomerate object exists, all the objects that
make up that conglomerate must have unique names.  As long as you
follow the rules and do not have foo.c at the the same time as you link
multiple objects into foo.o then there are no problems.

For u320, ensure that the source is u320_core.c (not u320.c) and the
conglomerate is u320.o and there will be no problems with the module
name.


  reply	other threads:[~2002-04-06 23:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-06 10:06 Keith Owens
2002-04-06 19:58 ` Justin T. Gibbs
2002-04-06 23:00   ` Keith Owens [this message]
2002-04-08  2:51     ` Justin T. Gibbs
2002-04-08  3:54       ` Keith Owens
2002-04-08  4:27         ` Justin T. Gibbs
2002-04-10  2:41           ` Keith Owens
2002-04-10 15:52             ` Justin T. Gibbs
2002-04-10 19:52             ` Roman Zippel
2002-04-11  0:04               ` Keith Owens
2002-04-11 12:42                 ` Roman Zippel

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=25618.1018134044@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=gibbs@scsiguy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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®