From: James S. <jsi...@us...> - 2002-06-03 22:45:28
|
Update of /cvsroot/linuxconsole/ruby/linux In directory usw-pr-cvs1:/tmp/cvs-serv23928/linux Modified Files: Makefile Log Message: Synced to 2.5.19 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Makefile,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- Makefile 25 May 2002 20:31:58 -0000 1.60 +++ Makefile 3 Jun 2002 22:44:55 -0000 1.61 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 18 +SUBLEVEL = 19 EXTRAVERSION = -ruby KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -110,57 +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/serial/serial.o \ - drivers/char/char.o \ - drivers/block/block.o \ - drivers/misc/misc.o \ - drivers/net/net.o \ - drivers/media/media.o \ - drivers/video/video.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_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 DRIVERS := $(DRIVERS-y) @@ -173,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 # --------------------------------------------------------------------------- @@ -203,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 $@ -$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER - @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@) +# Single targets +# --------------------------------------------------------------------------- + +%.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 # --------------------------------------------------------------------------- @@ -267,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 @@ -276,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 @@ -297,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 @@ -334,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." @@ -344,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 # --------------------------------------------------------------------------- @@ -481,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? @@ -521,3 +489,4 @@ $(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\ @$(rule_$(1))) +FORCE: |