Re: [kbuild-devel] linux kernel conf 0.6

2002-10-03 Thread Roman Zippel

Hi,

(I almost forgot to reply to this one, sorry for the delay.)

On Sun, 22 Sep 2002, Kai Germaschewski wrote:

 I'm not particularly fond of these md5sum hacks. I don't think it's all
 that annoying for the developer, either, it's basically just a
 alias make=make LKC_GENPARSER=1

 (Of course, you'll have to update the _shipped files eventually, but there
 isn't really any way around that either way)

Where's the problem with md5sum? If the rules are usually not visible
anyway, why do we use the _shipped postfix at all? The depencies are
hidden this way as well, so make won't even try to regenerate the file.
The developer has to remember that extra argument to get the file
regenerated, what is IMO more hacky than using md5sum.

bye, Roman



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: RfC: Don't cd into subdirs during kbuild

2002-10-03 Thread Sam Ravnborg

On Wed, Oct 02, 2002 at 09:59:00PM -0500, Kai Germaschewski wrote:
 
 Hi,
 
 I'd appreciate to get comments on the appended patch. It's mostly cleanups 
 and the like, but the interesting part is the last cset, which is actually
 fairly small:

Tried out what I pulled from linux-2.5.make

1) warning present in Makefile
2) Annoying /././ when doing make dep
3) Did a ld built-in.o in scripts, despite obj-y is empty
   - When i changed = to := to fix next error ar failed.

ifdef O_TARGET replaced with ifdef obj-y to make it work

4) Could not link, no *.o file were used as parameters to ld

cmd_link_o_target := $(if $(strip $(obj-y)),\
  $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), 
$^),\
  rm -f $@; $(AR) rcs $@)

$(O_TARGET): $(obj-y) FORCE
@echo X $^
@echo $(obj-y) - $@


Result:
make[1]: Entering directory `/home/sam/src/linux/kernel/bk/kai-make/init'
  Generating /home/sam/src/linux/kernel/bk/kai-make/include/linux/compile.h (unchanged)
X main.o version.o do_mounts.o FORCE
./main.o ./version.o ./do_mounts.o - built-in.o
   ld -m elf_i386  -r -o  
ld: unrecognized option '-o'
ld: use the --help option for usage information

It seems that make strips ./ in front of all .o files listed in obj-y
Utilising $(filter-out FORCE,$(obj-y) did the trick for me.

[sam@mars kai-make]$ make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.


Hmmm, was the stuff present at bkbits incomplete?

Sam


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



Re: [kbuild-devel] Re: RfC: Don't cd into subdirs during kbuild

2002-10-03 Thread Sam Ravnborg

On Thu, Oct 03, 2002 at 09:26:18PM +0200, Sam Ravnborg wrote:
 
 Hmmm, was the stuff present at bkbits incomplete?

Just checked, yes the attached patch was never. And fixes I think all the
above.

A new round of testing needed

Sam


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: RfC: Don't cd into subdirs during kbuild

2002-10-03 Thread Sam Ravnborg

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


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: RfC: Don't cd into subdirs during kbuild

2002-10-03 Thread Peter Samuelson


[Sam Ravnborg]
  +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 )

Except that it is harmless.  list-multi is a hint which the kbuild
system no longer needs.  Code with list-multi is (I believe) still
compatible with today's kbuild, so there's no need to *force* a
cleanup.

Peter


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: RfC: Don't cd into subdirs during kbuild

2002-10-03 Thread Sam Ravnborg

On Thu, Oct 03, 2002 at 10:01:20PM +0200, Sam Ravnborg wrote:
 Now it's testing time..

1)
In order to make it link I had to change the following in rules.make:
 # If the list of objects to link is empty, just create an empty O_TARGET
 cmd_link_o_target = $(if $(strip $(obj-y)),\
- $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), 
$^),\
+ $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter-out 
+FORCE,$(obj-y)),\
  rm -f $@; $(AR) rcs $@)

Otherwise no objects were on the commandline because make strips ./

2)
Top-level Makefile still uses make -C therefore apths are relative to first
subdirectory as seen here:
  CC  udf/balloc.o
  CC  udf/dir.o
  CC  udf/file.o
  CC  udf/ialloc.o
  

3) acpi failed to compile due to  -Idrivers/acpi/include, but current
directory is drivers.

Sam


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



RE: [kbuild-devel] RfC: Don't cd into subdirs during kbuild

2002-10-03 Thread Grover, Andrew

 From: Kai Germaschewski [mailto:[EMAIL PROTECTED]] 
 [EMAIL PROTECTED], 2002-10-02 14:46:16-05:00, [EMAIL PROTECTED]
   kbuild: Standardize ACPI Makefiles
   
   ACPI was a bit lazy and just said compile all .c files in 
 this directory,
   which is different from all other Makefiles and will not work very
   well e.g. bk, where a .c file may not be checked out yet, 
 or separate
   obj/src dirs. So just explicitly list the files we want to compile.

Excellent, I was just going to fix this, and now I don't have to ;-)

-- Andy


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



[kbuild-devel] Re: RfC: Don't cd into subdirs during kbuild

2002-10-03 Thread Sam Ravnborg

On Thu, Oct 03, 2002 at 03:38:22PM -0500, Kai Germaschewski wrote:
 On Thu, 3 Oct 2002, Sam Ravnborg wrote:
 
  On Thu, Oct 03, 2002 at 10:01:20PM +0200, Sam Ravnborg wrote:
   Now it's testing time..
 
 [...]
 
 You must be missing some of the changes (My first push to bkbits was 
 incomplete, since I did inadvertently edit Makefile without checking it 
 out, I do that mistake all the time...). It's fixed in the current repo.

This time I applied the patch you sent in the mail.
Checking bkbits
Yep, the latest csets on bkbits fixes some of this.

Sam


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel