Skip to content

Commit

Permalink
kbuild: clean up asm-offsets.h creation
Browse files Browse the repository at this point in the history
- Move mkdir out of cmd_offsets
- Add input file to sed command instead of using cat

Signed-off-by: Brian Gerst <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
Brian Gerst authored and Sam Ravnborg committed Jan 8, 2006
1 parent ae215b1 commit ac448af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p"

quiet_cmd_offsets = GEN $@
define cmd_offsets
mkdir -p $(dir $@); \
cat $< | \
(set -e; \
echo "#ifndef __ASM_OFFSETS_H__"; \
echo "#define __ASM_OFFSETS_H__"; \
Expand All @@ -34,7 +32,7 @@ define cmd_offsets
echo " *"; \
echo " */"; \
echo ""; \
sed -ne $(sed-y); \
sed -ne $(sed-y) $<; \
echo ""; \
echo "#endif" ) > $@
endef
Expand All @@ -45,5 +43,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
$(call if_changed_dep,cc_s_c)

$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
$(Q)mkdir -p $(dir $@)
$(call cmd,offsets)

0 comments on commit ac448af

Please sign in to comment.