|
From: Kenn H. <ke...@us...> - 2003-01-12 22:52:57
|
Update of /cvsroot/linux-vax/kernel-2.5
In directory sc8-pr-cvs1:/tmp/cvs-serv30622
Modified Files:
Makefile Rules.make
Log Message:
Merge with 2.5.19
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/Makefile,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Makefile 9 Jan 2003 22:01:10 -0000 1.22
+++ Makefile 12 Jan 2003 22:52:52 -0000 1.23
@@ -1,6 +1,6 @@
VERSION = 2
PATCHLEVEL = 5
-SUBLEVEL = 18
+SUBLEVEL = 19
EXTRAVERSION =
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
@@ -110,63 +110,8 @@
LIBS =$(TOPDIR)/lib/lib.a
SUBDIRS =init kernel lib drivers mm fs net ipc sound
-DRIVERS-n :=
-DRIVERS-y :=
-DRIVERS-m :=
-DRIVERS- :=
-
-DRIVERS-$(CONFIG_ACPI) += drivers/acpi/acpi.o
-DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
-DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
-DRIVERS-y += drivers/base/base.o \
- drivers/char/char.o \
- drivers/block/block.o \
- drivers/misc/misc.o \
- drivers/net/net.o \
- drivers/media/media.o
-DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/built-in.o
-DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
-DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
-DRIVERS-$(CONFIG_FC4) += drivers/fc4/built-in.o
-DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
-DRIVERS-$(CONFIG_FUSION) += drivers/message/message.o
-DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
-
-ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
-DRIVERS-y += drivers/cdrom/driver.o
-endif
-
+DRIVERS-y = drivers/built-in.o
DRIVERS-$(CONFIG_SOUND) += sound/sound.o
-DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
-DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
-DRIVERS-$(CONFIG_DIO) += drivers/dio/built-in.o
-DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
-DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
-DRIVERS-$(CONFIG_ALL_PPC) += drivers/macintosh/macintosh.o
-DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
-DRIVERS-$(CONFIG_PNP) += drivers/pnp/pnp.o
-DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/built-in.o
-DRIVERS-$(CONFIG_VT) += drivers/video/video.o
-DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/built-in.o
-DRIVERS-$(CONFIG_TC) += drivers/tc/built-in.o
-DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
-DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
-DRIVERS-$(CONFIG_GAMEPORT) += drivers/input/gameport/gamedrv.o
-DRIVERS-$(CONFIG_SERIO) += drivers/input/serio/seriodrv.o
-DRIVERS-$(CONFIG_I2O) += drivers/message/message.o
-DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
-DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
-DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
-DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
-DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
-DRIVERS-$(CONFIG_ISDN) += drivers/isdn/vmlinux-obj.o
-
-# VAX-specific modules
-DRIVERS-$(CONFIG_VSBUS) += drivers/vsbus/vsbus.a
-DRIVERS-$(CONFIG_VAX) += drivers/vax/bus/vaxbus.o
-DRIVERS-$(CONFIG_VAX) += drivers/vax/char/vaxchar.o
-DRIVERS-$(CONFIG_VAX) += drivers/vax/net/vaxnet.o
-# End VAX-specific modules
DRIVERS := $(DRIVERS-y)
@@ -179,7 +124,7 @@
# ---------------------------------------------------------------------------
boot: vmlinux
- @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C arch/$(ARCH)/boot
+ @$(MAKE) -C arch/$(ARCH)/boot
# Build vmlinux
# ---------------------------------------------------------------------------
@@ -209,29 +154,40 @@
echo Generating build number
. scripts/mkversion > .tmpversion
mv -f .tmpversion .version
- $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C init
+ $(MAKE) -C init
echo $(cmd_link_vmlinux)
$(cmd_link_vmlinux)
echo 'cmd_$@ := $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd
$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
endef
-vmlinux: $(CONFIGURATION) $(vmlinux-objs) dummy
+vmlinux: $(CONFIGURATION) $(vmlinux-objs) FORCE
$(call if_changed_rule,link_vmlinux)
-# The actual objects are generated when descending, make sure
-# no implicit rule kicks in
+# The actual objects are generated when descending,
+# make sure no implicit rule kicks in
-$(sort $(vmlinux-objs)): linuxsubdirs
- @
+$(sort $(vmlinux-objs)): $(SUBDIRS) ;
# Handle descending into subdirectories listed in $(SUBDIRS)
-.PHONY: linuxsubdirs
-linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
+.PHONY: $(SUBDIRS)
+$(SUBDIRS): FORCE include/linux/version.h include/config/MARKER
+ @$(MAKE) -C $@
+
+# Single targets
+# ---------------------------------------------------------------------------
-$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
- @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
+%.s: %.c FORCE
+ @$(MAKE) -C $(@D) $(@F)
+%.i: %.c FORCE
+ @$(MAKE) -C $(@D) $(@F)
+%.o: %.c FORCE
+ @$(MAKE) -C $(@D) $(@F)
+%.s: %.S FORCE
+ @$(MAKE) -C $(@D) $(@F)
+%.o: %.S FORCE
+ @$(MAKE) -C $(@D) $(@F)
# Configuration
# ---------------------------------------------------------------------------
@@ -273,7 +229,10 @@
@echo Generating $@
@. scripts/mkversion_h $@ $(KERNELRELEASE) $(VERSION) $(PATCHLEVEL) $(SUBLEVEL)
-comma := ,
+# helpers built in scripts/
+
+scripts/mkdep scripts/split-include : FORCE
+ @$(MAKE) -C scripts
# ---------------------------------------------------------------------------
# Generate dependencies
@@ -282,11 +241,34 @@
dep-files: scripts/mkdep archdep include/linux/version.h
scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
- $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
+ @$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS))
ifdef CONFIG_MODVERSIONS
$(MAKE) update-modverfile
endif
+.PHONY: $(patsubst %,_sfdep_%,$(SUBDIRS))
+$(patsubst %,_sfdep_%,$(SUBDIRS)): FORCE
+ @$(MAKE) -C $(patsubst _sfdep_%, %, $@) fastdep
+
+# update modversions.h, but only if it would change
+update-modverfile:
+ @(echo "#ifndef _LINUX_MODVERSIONS_H";\
+ echo "#define _LINUX_MODVERSIONS_H"; \
+ echo "#include <linux/modsetver.h>"; \
+ cd $(TOPDIR)/include/linux/modules; \
+ for f in *.ver; do \
+ if [ -f $$f ]; then echo "#include <linux/modules/$${f}>"; fi; \
+ done; \
+ echo "#endif"; \
+ ) > $(TOPDIR)/include/linux/modversions.h.tmp
+ @if [ -r $(TOPDIR)/include/linux/modversions.h ] && cmp -s $(TOPDIR)/include/linux/modversions.h $(TOPDIR)/include/linux/modversions.h.tmp; then \
+ echo $(TOPDIR)/include/linux/modversions.h was not updated; \
+ rm -f $(TOPDIR)/include/linux/modversions.h.tmp; \
+ else \
+ echo $(TOPDIR)/include/linux/modversions.h was updated; \
+ mv -f $(TOPDIR)/include/linux/modversions.h.tmp $(TOPDIR)/include/linux/modversions.h; \
+ fi
+
# ---------------------------------------------------------------------------
# Modules
@@ -303,7 +285,7 @@
.PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
- @$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(CFLAGS_MODULE)" AFLAGS="$(AFLAGS) $(AFLAGS_MODULE)" modules
+ @$(MAKE) -C $(patsubst _mod_%, %, $@) modules
# Install modules
@@ -340,7 +322,7 @@
# ---------------------------------------------------------------------------
# Modules not configured
-modules modules_install: dummy
+modules modules_install: FORCE
@echo
@echo "The present kernel configuration has modules disabled."
@echo "Type 'make config' and enable loadable module support."
@@ -350,19 +332,6 @@
endif # CONFIG_MODULES
-# ---------------------------------------------------------------------------
-
-include Rules.make
-
-# Build helpers in scripts/
-# FIXME: do that in scripts/Makefile?
-
-scripts/mkdep: scripts/mkdep.c
- $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
-
-scripts/split-include: scripts/split-include.c
- $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
-
# Cleaning up
# ---------------------------------------------------------------------------
@@ -487,25 +456,18 @@
# Generate tags for editors
-TAGS: dummy
+TAGS: FORCE
{ find include/asm-${ARCH} -name '*.h' -print ; \
find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
find $(SUBDIRS) init -name '*.[ch]' ; } | grep -v SCCS | etags -
# Exuberant ctags works better with -I
-tags: dummy
+tags: FORCE
CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
-# Targets which will only descend into one subdir, not trying
-# to link vmlinux afterwards
-# FIXME: anybody still using this?
-
-fs lib mm ipc kernel drivers net sound: dummy
- $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
-
# Make a backup
# FIXME anybody still using this?
@@ -527,3 +489,4 @@
$(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\
@$(rule_$(1)))
+FORCE:
Index: Rules.make
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/Rules.make,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Rules.make 9 Jan 2003 22:01:14 -0000 1.10
+++ Rules.make 12 Jan 2003 22:52:52 -0000 1.11
@@ -2,36 +2,25 @@
# This file contains rules which are shared between multiple Makefiles.
#
-#
-# False targets.
-#
-.PHONY: dummy
+# Some standard vars
-#
-# Special variables which should not be exported
-#
-unexport EXTRA_AFLAGS
-unexport EXTRA_CFLAGS
-unexport EXTRA_LDFLAGS
-unexport EXTRA_ARFLAGS
-unexport SUBDIRS
-unexport SUB_DIRS
-unexport ALL_SUB_DIRS
-unexport MOD_SUB_DIRS
-unexport O_TARGET
-
-unexport obj-y
-unexport obj-m
-unexport obj-n
-unexport obj-
-unexport export-objs
-unexport subdir-y
-unexport subdir-m
-unexport subdir-n
-unexport subdir-
-unexport mod-subdirs
+comma := ,
+empty :=
+space := $(empty) $(empty)
-comma := ,
+# Figure out paths
+# ---------------------------------------------------------------------------
+# Find the path relative to the toplevel dir, $(RELDIR), and express
+# the toplevel dir as a relative path from this dir, $(TOPDIR_REL)
+
+ifeq ($(findstring $(TOPDIR),$(CURDIR)),)
+ # Can only happen when something is built out of tree
+ RELDIR := $(CURDIR)
+ TOPDIR_REL := $(TOPDIR)
+else
+ RELDIR := $(subst $(TOPDIR)/,,$(CURDIR))
+ TOPDIR_REL := $(subst $(space),,$(foreach d,$(subst /, ,$(RELDIR)),../))
+endif
# Figure out what we need to build from the various variables
# ===========================================================================
@@ -63,7 +52,7 @@
# add it to $(subdir-m)
both-m := $(filter $(mod-subdirs), $(subdir-y))
-SUB_DIRS := $(subdir-y)
+SUB_DIRS := $(subdir-y) $(if $(BUILD_MODULES),$(subdir-m))
MOD_SUB_DIRS := $(sort $(subdir-m) $(both-m))
ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-))
@@ -94,14 +83,14 @@
subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o)))
# Replace multi-part objects by their individual parts, look at local dir only
-real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m)))
+real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m))) $(EXTRA_TARGETS)
real-objs-m := $(foreach m, $(obj-m), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m)))
# ==========================================================================
#
# Get things started.
#
-first_rule: all_targets
+first_rule: vmlinux $(if $(BUILD_MODULES),$(obj-m))
#
# Common rules
@@ -113,38 +102,61 @@
# Compile C sources (.c)
# ---------------------------------------------------------------------------
-$(export-objs): export_flags := $(EXPORT_FLAGS)
+# FIXME: if we don't know if built-in or modular, assume built-in.
+# Only happens in Makefiles which override the default first_rule:
+modkern_cflags := $(CFLAGS_KERNEL)
+
+$(real-objs-y) : modkern_cflags := $(CFLAGS_KERNEL)
+$(real-objs-y:.o=.i): modkern_cflags := $(CFLAGS_KERNEL)
+$(real-objs-y:.o=.s): modkern_cflags := $(CFLAGS_KERNEL)
+
+$(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE)
+$(real-objs-m:.o=.i): modkern_cflags := $(CFLAGS_MODULE)
+$(real-objs-m:.o=.s): modkern_cflags := $(CFLAGS_MODULE)
-c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(export_flags)
+$(export-objs) : export_flags := $(EXPORT_FLAGS)
+$(export-objs:.o=.i): export_flags := $(EXPORT_FLAGS)
+$(export-objs:.o=.s): export_flags := $(EXPORT_FLAGS)
-cmd_cc_s_c = $(CC) $(c_flags) -S $< -o $@
+c_flags = $(CFLAGS) $(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(export_flags)
-%.s: %.c dummy
+cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
+
+%.s: %.c FORCE
$(call if_changed,cmd_cc_s_c)
-cmd_cc_i_c = $(CPP) $(c_flags) $< > $@
+cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $<
-%.i: %.c dummy
+%.i: %.c FORCE
$(call if_changed,cmd_cc_i_c)
cmd_cc_o_c = $(CC) $(c_flags) $(listing_o_c) -c -o $@ $<
-%.o: %.c dummy
+%.o: %.c FORCE
$(call if_changed,cmd_cc_o_c)
# Compile assembler sources (.S)
# ---------------------------------------------------------------------------
-a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
+# FIXME (s.a.)
+modkern_aflags := $(AFLAGS_KERNEL)
+
+$(real-objs-y) : modkern_aflags := $(AFLAGS_KERNEL)
+$(real-objs-y:.o=.s): modkern_aflags := $(AFLAGS_KERNEL)
+
+$(real-objs-m) : modkern_aflags := $(AFLAGS_MODULE)
+$(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
-cmd_as_s_S = $(CPP) $(a_flags) $< > $@
+a_flags = $(AFLAGS) $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
-%.s: %.S dummy
+cmd_as_s_S = $(CPP) $(a_flags) -o $@ $<
+
+%.s: %.S FORCE
$(call if_changed,cmd_as_s_S)
cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<
-%.o: %.S dummy
+%.o: %.S FORCE
$(call if_changed,cmd_as_o_S)
# FIXME
@@ -166,10 +178,10 @@
# Build the compiled-in targets
# ---------------------------------------------------------------------------
-all_targets: $(O_TARGET) $(L_TARGET) sub_dirs
+vmlinux: $(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS) sub_dirs
# To build objects in subdirs, we need to descend into the directories
-$(subdir-obj-y): sub_dirs
+$(sort $(subdir-obj-y)): sub_dirs ;
#
# Rule to compile a set of .o files into one .o file
@@ -180,7 +192,7 @@
$(LD) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), $^),\
rm -f $@; $(AR) rcs $@)
-$(O_TARGET): $(obj-y) dummy
+$(O_TARGET): $(obj-y) FORCE
$(call if_changed,cmd_link_o_target)
endif # O_TARGET
@@ -190,7 +202,7 @@
ifdef L_TARGET
cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(obj-y)
-$(L_TARGET): $(obj-y) dummy
+$(L_TARGET): $(obj-y) FORCE
$(call if_changed,cmd_link_l_target)
endif
@@ -205,16 +217,16 @@
# foo.o: $(foo-objs)
# but that's not so easy, so we rather make all composite objects depend
# on the set of all their parts
-$(multi-used-y) : %.o: $(multi-objs-y) dummy
+$(multi-used-y) : %.o: $(multi-objs-y) FORCE
$(call if_changed,cmd_link_multi)
-$(multi-used-m) : %.o: $(multi-objs-m) dummy
+$(multi-used-m) : %.o: $(multi-objs-m) FORCE
$(call if_changed,cmd_link_multi)
#
# This make dependencies quickly
#
-fastdep: dummy
+fastdep: FORCE
$(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS) -- $(wildcard *.[chS]) > .depend
ifdef ALL_SUB_DIRS
$(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)"
@@ -230,53 +242,48 @@
# A rule to make subdirectories
#
subdir-list = $(sort $(patsubst %,_subdir_%,$(SUB_DIRS)))
-sub_dirs: dummy $(subdir-list)
+sub_dirs: FORCE $(subdir-list)
ifdef SUB_DIRS
-$(subdir-list) : dummy
+$(subdir-list) : FORCE
@$(MAKE) -C $(patsubst _subdir_%,%,$@)
endif
#
# A rule to make modules
#
-ifneq "$(strip $(obj-m))" ""
-MOD_DESTDIR := $(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)
-endif
-
ifneq "$(strip $(MOD_SUB_DIRS))" ""
.PHONY: $(patsubst %,_modsubdir_%,$(MOD_SUB_DIRS))
-$(patsubst %,_modsubdir_%,$(MOD_SUB_DIRS)) : dummy
+$(patsubst %,_modsubdir_%,$(MOD_SUB_DIRS)) : FORCE
@$(MAKE) -C $(patsubst _modsubdir_%,%,$@) modules
.PHONY: $(patsubst %,_modinst_%,$(MOD_SUB_DIRS))
-$(patsubst %,_modinst_%,$(MOD_SUB_DIRS)) : dummy
+$(patsubst %,_modinst_%,$(MOD_SUB_DIRS)) : FORCE
@$(MAKE) -C $(patsubst _modinst_%,%,$@) modules_install
endif
.PHONY: modules
-modules: $(obj-m) dummy \
- $(patsubst %,_modsubdir_%,$(MOD_SUB_DIRS))
+modules: $(obj-m) FORCE $(patsubst %,_modsubdir_%,$(MOD_SUB_DIRS))
.PHONY: _modinst__
-_modinst__: dummy
+_modinst__: FORCE
ifneq "$(strip $(obj-m))" ""
- mkdir -p $(MODLIB)/kernel/$(MOD_DESTDIR)
- cp $(obj-m) $(MODLIB)/kernel/$(MOD_DESTDIR)
+ mkdir -p $(MODLIB)/kernel/$(RELDIR)
+ cp $(obj-m) $(MODLIB)/kernel/$(RELDIR)
endif
.PHONY: modules_install
-modules_install: _modinst__ \
- $(patsubst %,_modinst_%,$(MOD_SUB_DIRS))
+modules_install: _modinst__ $(patsubst %,_modinst_%,$(MOD_SUB_DIRS))
-#
-# A rule to do nothing
-#
-dummy:
+
+# Add FORCE to the prequisites of a target to force it to be always rebuilt.
+# ---------------------------------------------------------------------------
+.PHONY: FORCE
+FORCE:
#
# This is useful for testing
-#
+# FIXME: really?
script:
$(SCRIPT)
@@ -293,12 +300,9 @@
ifdef CONFIG_MODVERSIONS
ifneq "$(strip $(export-objs))" ""
-MODINCL = $(TOPDIR)/include/linux/modules
-MODCURDIR = $(subst $(TOPDIR)/,,$(shell /bin/pwd))
-MODPREFIX = $(subst /,-,$(MODCURDIR))__
+MODINCL := $(TOPDIR)/include/linux/modules
+MODPREFIX := $(subst /,-,$(RELDIR))__
-# The -w option (enable warnings) for genksyms will return here in 2.1
-# So where has it gone?
#
# Added the SMP separator to stop module accidents between uniprocessor
# and SMP Intel boxes - AC - from bits by Michael Chastain
@@ -325,30 +329,8 @@
# updates .ver files but not modversions.h
fastdep: $(addprefix $(MODINCL)/$(MODPREFIX),$(export-objs:.o=.ver))
-# updates .ver files and modversions.h like before (is this needed?)
-dep: fastdep update-modverfile
-
endif # export-objs
-# update modversions.h, but only if it would change
-update-modverfile:
- @(echo "#ifndef _LINUX_MODVERSIONS_H";\
- echo "#define _LINUX_MODVERSIONS_H"; \
- echo "#include <linux/modsetver.h>"; \
- cd $(TOPDIR)/include/linux/modules; \
- for f in *.ver; do \
- if [ -f $$f ]; then echo "#include <linux/modules/$${f}>"; fi; \
- done; \
- echo "#endif"; \
- ) > $(TOPDIR)/include/linux/modversions.h.tmp
- @if [ -r $(TOPDIR)/include/linux/modversions.h ] && cmp -s $(TOPDIR)/include/linux/modversions.h $(TOPDIR)/include/linux/modversions.h.tmp; then \
- echo $(TOPDIR)/include/linux/modversions.h was not updated; \
- rm -f $(TOPDIR)/include/linux/modversions.h.tmp; \
- else \
- echo $(TOPDIR)/include/linux/modversions.h was updated; \
- mv -f $(TOPDIR)/include/linux/modversions.h.tmp $(TOPDIR)/include/linux/modversions.h; \
- fi
-
$(active-objs): $(TOPDIR)/include/linux/modversions.h
else
@@ -365,7 +347,6 @@
endif
endif # CONFIG_MODULES
-
#
# include dependency files if they exist
|