From 81e93fe61d75133bbe858d4e1ff4150a2debb20d Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Wed, 5 Jun 2002 02:44:15 -0500 Subject: kbuild: Use deep directory structure for include/linux/modules We used to force the obvious deep structure of all objects which export symbols into a flat list in include/linux/modules. This initially caused the restriction the no two exporting objects could have the same name (Ever wondered why there's ksyms.c and i386_ksyms.c?) With the ALSA merge this restriction was mostly lifted by some hack, but some cases still don't work right (Hi XFS). As it's much cleaner to just use a normal tree under include/linux/modules, reflecting the source tree, we now do just that. --- Rules.make | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Rules.make') diff --git a/Rules.make b/Rules.make index 161092673672..60aab0a38c91 100644 --- a/Rules.make +++ b/Rules.make @@ -303,8 +303,7 @@ script: ifdef CONFIG_MODVERSIONS ifneq "$(strip $(export-objs))" "" -MODINCL := $(TOPDIR)/include/linux/modules -MODPREFIX := $(subst /,-,$(RELDIR))__ +MODVERDIR := $(TOPDIR)/include/linux/modules/$(RELDIR) # # Added the SMP separator to stop module accidents between uniprocessor @@ -320,21 +319,21 @@ endif # We don't track dependencies for .ver files, so we FORCE to check # them always (i.e. always at "make dep" time). -quiet_cmd_create_ver = Creating $@ +quiet_cmd_create_ver = Creating include/linux/modules/$(RELDIR)/$*.ver cmd_create_ver = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -E -D__GENKSYMS__ $< | \ $(GENKSYMS) $(genksyms_smp_prefix) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp -$(MODINCL)/$(MODPREFIX)%.ver: %.c FORCE - @echo $(cmd_create_ver) +$(MODVERDIR)/%.ver: %.c FORCE + @mkdir -p $(dir $@) @$(call cmd,cmd_create_ver) @if [ -r $@ ] && cmp -s $@ $@.tmp; then \ - echo $@ is unchanged; rm -f $@.tmp; \ + rm -f $@.tmp; \ else \ mv -f $@.tmp $@; \ fi # updates .ver files but not modversions.h -fastdep: $(addprefix $(MODINCL)/$(MODPREFIX),$(export-objs:.o=.ver)) +fastdep: $(addprefix $(MODVERDIR)/,$(export-objs:.o=.ver)) endif # export-objs -- cgit v1.2.3