Re: RfC: Don't cd into subdirs during kbuild

From: Sam Ravnborg (sam@ravnborg.org)
Date: Fri Oct 04 2002 - 14:07:01 EST


On Thu, Oct 03, 2002 at 03:38:22PM -0500, Kai Germaschewski wrote:
> 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.

Did a pull from bkbits at 18:30 CET, something like 09:30 pacific I think.

In general.
I like where you are heading, both the make -f, but also the cleanup done
in the top-level Makefile.
It makes it much easier to integrate my (ours) new make clean stuff -
but that shall wait until this is in the kernel.

Comments looking at the two new csets:
1)
In the descend macro you test for
ifeq ($(KBUILD_VERBOSE),1)
To make it consistent I suggest to use
ifneq ($(KBUILD_VERBOSE),0)
As done earlier in the Makefile

2) Needed the following to make my kernel compile (make mrproper defconfig all)
===== Rules.make 1.76 vs edited =====
--- 1.76/Rules.make Thu Oct 3 04:51:25 2002
+++ edited/Rules.make Fri Oct 4 20:38:37 2002
@@ -161,7 +161,7 @@
 # This sets version suffixes on exported symbols
 # ---------------------------------------------------------------------------
 
-MODVERDIR := include/linux/modules/$(obj)
+MODVERDIR := include/linux/modules
 
 #
 # Added the SMP separator to stop module accidents between uniprocessor
@@ -191,7 +191,7 @@
 # files (fix-dep filters them), so touch modversions.h if any of the .ver
 # files changes
 
-quiet_cmd_cc_ver_c = MKVER include/linux/modules/$(obj)/$*.ver
+quiet_cmd_cc_ver_c = MKVER include/linux/modules/$*.ver
 cmd_cc_ver_c = $(CPP) $(c_flags) $< | $(GENKSYMS) $(genksyms_smp_prefix) \
                  -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp
 
Otherwise if failed first time it included modversions.h

3) This is just to make output nicer with KBUILD_VERBOSE=0
===== drivers/pci/Makefile 1.15 vs edited =====
--- 1.15/drivers/pci/Makefile Wed Oct 2 21:54:34 2002
+++ edited/drivers/pci/Makefile Fri Oct 4 20:59:55 2002
@@ -29,7 +29,9 @@
 obj-y += syscall.o
 endif
 
-host-progs := gen-devlist
+host-progs := gen-devlist
+quiet_cmd_gendevlist = DEVLIST $<
+cmd_gendevlist = ( cd $(obj); ./gen-devlist ) < $<
 
 include $(TOPDIR)/Rules.make
 
@@ -40,6 +42,6 @@
 # And that's how to generate them
 
 $(obj)/devlist.h: $(src)/pci.ids $(obj)/gen-devlist
- ( cd $(obj); ./gen-devlist ) < $<
+ $(call cmd,gendevlist)
 
 $(obj)/classlist.h: $(obj)/devlist.h

And the same for zorro:
===== drivers/zorro/Makefile 1.6 vs edited =====
--- 1.6/drivers/zorro/Makefile Wed Oct 2 21:54:34 2002
+++ edited/drivers/zorro/Makefile Fri Oct 4 21:05:54 2002
@@ -7,7 +7,9 @@
 obj-$(CONFIG_ZORRO) += zorro.o names.o
 obj-$(CONFIG_PROC_FS) += proc.o
 
-host-progs := gen-devlist
+host-progs := gen-devlist
+quiet_cmd_gendevlist = DEVLIST $<
+cmd_gendevlist = ( cd $(obj); ./gen-devlist ) < $<
 
 include $(TOPDIR)/Rules.make
 
@@ -18,4 +20,4 @@
 # And that's how to generate them
 
 $(obj)/devlist.h: $(src)/zorro.ids $(obj)/gen-devlist
- ( cd $(obj); ./gen-devlist ) < $<
+ $(call cmd,gendevlist)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:00:46 EST