[U-Boot] [PATCH v2 03/15] kbuild: move asm-offsets.h rules to ./Kbuild
Masahiro Yamada
yamada.m at jp.panasonic.com
Mon Feb 24 13:05:16 CET 2014
Hello Wolfgang,
> Can we use here documents in cases like this, so the number of
> shell command executions could be greatly reduced?
>
> Does something like this work?
>
> define cmd_generic-offsets \
> cat <<_END_ > $@ \
> #ifndef __GENERIC_ASM_OFFSETS_H__ \
> #define __GENERIC_ASM_OFFSETS_H__ \
> /* \
> * DO NOT MODIFY \
> * \
> * This file was generated by Kbuild \
> */ \
> $$(sed -ne $(sed-y) $<) \
> #endif \
> _END_
>
> ?
No.
I tried your code but it did not work.
Kbuild created an empty file
include/generated/generic-asm-offsets.h.
I tried to debug but finally I gave up.
Here document ( cat <<END ... END) syntax
is really nightmare in Makefile.
I've never seen that syntax in Makefile.
For example, if you see the top Makefile
of Linux Kernel, it always uses "echo" command.
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list