[BACK]Return to Makefile.modinst CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs-OLD / linux / scripts

File: [Development] / linux-2.6-xfs-OLD / linux / scripts / Makefile.modinst (download)

Revision 1.3, Wed Feb 19 15:07:52 2003 UTC (14 years, 8 months ago) by hch
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +25 -20 lines

Merge up to Linux 2.5.62

# ==========================================================================
# Installing modules
# ==========================================================================

.PHONY: __modinst
__modinst:

include scripts/Makefile.lib

#

__modules := $(shell cat /dev/null $(wildcard $(MODVERDIR)/*.mod))
modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o)))

ifneq ($(filter-out $(modules),$(__modules)),)
  $(warning *** Uh-oh, you have stale module entries. You messed with SUBDIRS, do not complain if something goes wrong.)
endif

.PHONY: $(modules)
__modinst: $(modules)
	@:

# Modules built within the kernel tree

quiet_cmd_modules_install = INSTALL $@
      cmd_modules_install = mkdir -p $(MODLIB)/kernel/$(@D); \
			    cp $@ $(MODLIB)/kernel/$(@D)

$(filter-out ../% /%,$(modules)):
	$(call cmd,modules_install)

# Modules built outside just go into extra

quiet_cmd_modules_install_extra = INSTALL $(obj-m:.o=.ko)
      cmd_modules_install_extra = mkdir -p $(MODLIB)/extra; \
			    	  cp $@ $(MODLIB)/extra

$(filter     ../% /%,$(modules)):
	$(call cmd,modules_install_extra)