mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Kai Germaschewski <kai-germaschewski@uiowa.edu>
Cc: kbuild-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: RfC: Don't cd into subdirs during kbuild
Date: Thu, 3 Oct 2002 22:01:20 +0200	[thread overview]
Message-ID: <20021003220120.B17403@mars.ravnborg.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0210022153090.10307-100000@chaos.physics.uiowa.edu>; from kai-germaschewski@uiowa.edu on Wed, Oct 02, 2002 at 09:59:00PM -0500

On Wed, Oct 02, 2002 at 09:59:00PM -0500, Kai Germaschewski wrote:
> 
> Hi,
> 
> I'd appreciate to get comments on the appended patch.

> -obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
> +obj-y := dsfield.o   dsmthdat.o  dsopcode.o  dswexec.o  dswscope.o \
> +	 dsmethod.o  dsobject.o  dsutils.o   dswload.o  dswstate.o

Should that have been:
obj-$(CONFIG_ACPI_INTERPRETER) := dsfield.o   dsmthdat.o  dsopcode.o...

Looks wrong to me that you remove the CONFIG_ dependency.
Same is true for the rest of this cset.

> +ifdef list-multi
> +$(warning kbuild: list-multi ($(list-multi)) is obsolete in 2.5. Please fix!)
> +endif
Since kbuild no longer support list-multi this should be $(error ....)

> -multi-used-y := $(filter-out $(list-multi),$(__multi-used-y))
Here is list-multi removed.


>  SUBDIRS		+= $(patsubst %/,%,$(filter %/, $(init-y) $(init-m)))
I prefer first assignment to be := not +=
This is true for several places including several makefiles as well.


> -export CPPFLAGS EXPORT_FLAGS NOSTDINC_FLAGS OBJCOPYFLAGS
> +export CPPFLAGS EXPORT_FLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS
Did not see this change justified.

> -export	NETWORKS DRIVERS LIBS HEAD LDFLAGS MAKEBOOT
> +$(warning $(SUBDIRS))

Warning shall be deleted

>  ifndef O_TARGET
>  ifndef L_TARGET
> -O_TARGET := built-in.o
> +O_TARGET := $(obj)/built-in.o
> +endif
>  endif
This change result in ld being called for directories like:
$(TOPDIR)/scripts
$(TOPDIR)/scripts/lxdialog
$(TOPDIR)/Documentation/DocBook
If obj-y is empty then do not define O_TARGET?

Another more general comment.
There seem to no consistency in the variables used in the first section of
the makefile. There is a mixture of lower and upper case variables:
O_TARGET, host-progs etc. This is confusing.
Furthermore the construct:
obj-y := some.o dot.o .o module.o
Seems illogical to me. What does obj-y mean to me??
mandatory-objs := some.o dot.o .o module.o
It a litte longer, but occur only once (typical) per makefile.
Thats not something I propose for now, more to be seen as a general comment
about striving for consistency in the interface to rules.make.

>  
>  first_rule: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \
Where comes the requirement that EXTRA_TARGETS needs to be buildin?

> -cmd_link_multi = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $($(basename $@)-objs),$^)
> +cmd_link_multi = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(addprefix $(obj)/,$($(subst $(obj)/,,$(@:.o=-objs)))),$^)
Keep a variable without obj appended would make this readable I think.

Now it's testing time..

	Sam

  parent reply	other threads:[~2002-10-03 19:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03  2:59 Kai Germaschewski
2002-10-03  3:32 ` Andreas Dilger
2002-10-03  5:18 ` [kbuild-devel] " Peter Samuelson
2002-10-03 14:54   ` Kai Germaschewski
2002-10-03  8:21 ` Xavier Bestel
2002-10-03 14:56   ` Kai Germaschewski
2002-10-03 15:31     ` Xavier Bestel
2002-10-03 20:41   ` Peter Samuelson
2002-10-03 14:05 ` John Levon
2002-10-03 14:27   ` Kai Germaschewski
2002-10-03 14:45     ` John Levon
2002-10-03 19:26 ` Sam Ravnborg
2002-10-03 19:33   ` [kbuild-devel] " Sam Ravnborg
2002-10-03 20:01 ` Sam Ravnborg [this message]
2002-10-03 20:19   ` Kai Germaschewski
2002-10-03 20:44     ` Sam Ravnborg
2002-10-03 20:20   ` Peter Samuelson
2002-10-03 20:30   ` Sam Ravnborg
2002-10-03 20:38     ` Kai Germaschewski
2002-10-03 20:50       ` Sam Ravnborg
2002-10-04 19:07       ` Sam Ravnborg
2002-10-04 20:17         ` Sam Ravnborg
2002-10-09  0:45       ` [kbuild-devel] " Brendan J Simon

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=20021003220120.B17403@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=kai-germaschewski@uiowa.edu \
    --cc=kbuild-devel@lists.sourceforge.net \
    --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®