Commit e4161532 authored by Kai Germaschewski's avatar Kai Germaschewski

Make objects in $(export-objs) only depend on themselves

Currently, if dependencies for one object file listed in $(export-objs)
change, we will rebuild all $(export-objs) files in the same subdirectory,
which may take a noticable amount of time and thus is annoying during
development, and, of course, unnecessary.

The patch is originally from Russell King and has been tested in the ARM
kernel tree for a long time.
parent c643de42
......@@ -304,7 +304,8 @@ $(TOPDIR)/include/linux/modversions.h:
endif # CONFIG_MODVERSIONS
ifneq "$(strip $(export-objs))" ""
$(export-objs): $(export-objs:.o=.c) $(TOPDIR)/include/linux/modversions.h
$(export-objs): $(TOPDIR)/include/linux/modversions.h
$(export-objs): %.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -DEXPORT_SYMTAB -c $(@:.o=.c)
@ ( \
echo 'ifeq ($(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DEXPORT_SYMTAB)),$$(strip $$(subst $$(comma),:,$$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@) -DEXPORT_SYMTAB)))' ; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment