diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-06-05 02:44:15 -0500 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-06-05 02:44:15 -0500 |
| commit | 81e93fe61d75133bbe858d4e1ff4150a2debb20d (patch) | |
| tree | 14bccb63f663b0ff8fe27a0b2f62a8e8a0f0d839 /Rules.make | |
| parent | 04bd72170653f054003894ae864869990957ab0f (diff) | |
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.
Diffstat (limited to 'Rules.make')
| -rw-r--r-- | Rules.make | 13 |
1 files changed, 6 insertions, 7 deletions
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 |
