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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to