- Move mkdir out of cmd_offsets
- Add input file to sed command instead of using cat
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
quiet_cmd_offsets = GEN $@
define cmd_offsets
- mkdir -p $(dir $@); \
- cat $< | \
(set -e; \
echo "#ifndef __ASM_OFFSETS_H__"; \
echo "#define __ASM_OFFSETS_H__"; \
echo " *"; \
echo " */"; \
echo ""; \
- sed -ne $(sed-y); \
+ sed -ne $(sed-y) $<; \
echo ""; \
echo "#endif" ) > $@
endef
$(call if_changed_dep,cc_s_c)
$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
+ $(Q)mkdir -p $(dir $@)
$(call cmd,offsets)