Commit f6ecebd6 authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild: fix make dir/file.xx when asm symlink is missing

Added a dependency so we do full preparation before trying to build single
file targets. This fixes a case where Andrew Morton did:
	make kernel/sched.o
        rm include/asm
	make kernel/sched.o     -> splat
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 43c74d17
...@@ -1289,17 +1289,17 @@ kernelversion: ...@@ -1289,17 +1289,17 @@ kernelversion:
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# The directory part is taken from first prerequisite, so this # The directory part is taken from first prerequisite, so this
# works even with external modules # works even with external modules
%.s: %.c scripts FORCE %.s: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
%.i: %.c scripts FORCE %.i: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
%.o: %.c scripts FORCE %.o: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
%.lst: %.c scripts FORCE %.lst: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
%.s: %.S scripts FORCE %.s: %.S prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
%.o: %.S scripts FORCE %.o: %.S prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
# For external modules we shall include any directory of the target, # For external modules we shall include any directory of the target,
......
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