From: Masahiro Yamada Date: Mon, 24 Feb 2014 21:05:16 +0900 Subject: [U-Boot] [PATCH v2 03/15] kbuild: move asm-offsets.h rules to ./Kbuild In-Reply-To: <20140224053607.6B9603801BF@gemini.denx.de> References: <1393207943-3725-4-git-send-email-yamada.m@jp.panasonic.com> <20140224053607.6B9603801BF@gemini.denx.de> Message-ID: <20140224210515.1045.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 <