[PATCH 2/6] Generate arch_includes.h and arch_personalities.h

Dmitry V. Levin ldv at altlinux.org
Wed Nov 8 22:15:08 UTC 2017


On Thu, Nov 09, 2017 at 01:06:49AM +0300, Edgar Kaziakhmedov wrote:
> On 11/09/2017 12:12 AM, Dmitry V. Levin wrote:
> > On Wed, Nov 08, 2017 at 04:44:45PM +0300, Edgar Kaziakhmedov wrote:
> >> Since arch_definitions.h contains full description about architectures,
> >> arch_includes.h and arch_personalities.h can be generated.
> >>
> >> * tools/asinfo/gen_asinfo_files.sh: New file.
> >> * bootstrap: Add it.
> >> * tools/asinfo/arch_includes.h: Delete it.
> >> * tools/asinfo/arch_personalities.h: Likewise.
> >> * tools/asinfo/Makefile.am: Include Makemodule.am.
> >> (asinfo_SOURCES): Add $(ARCH_AUX_FILES).
> >> * tools/asinfo/README-arch: New README explaining how to add new
> >> architecture/ABI to asinfo tool.
> > [...]
> >> +	#Makemodule.am
> >> +	(
> >> +	echo -n \
> >> +"ARCH_AUX_FILES = ${includes_file} ${pers_file}\n\
> >> +\$(top_srcdir)/tools/asinfo/${includes_file}: \
> >> +\$(top_srcdir)/tools/asinfo/${defs_file} \
> >> +\$(top_srcdir)/tools/asinfo/gen_asinfo_files.sh\n\
> >> +	\$(AM_V_GEN)\$(top_srcdir)/tools/asinfo/gen_asinfo_files.sh\n\
> >> +\$(top_srcdir)/tools/asinfo/${pers_file}: \
> >> +\$(top_srcdir)/tools/asinfo/${defs_file} \
> >> +\$(top_srcdir)/tools/asinfo/gen_asinfo_files.sh\n\
> >> +	\$(AM_V_GEN)\$(top_srcdir)/tools/asinfo/gen_asinfo_files.sh"
> >> +	) > "${output}/Makemodule.am"
> >> +	#.gitignore
> >> +	(
> >> +	echo -n \
> >> +"/${includes_file}\n\
> >> +/${pers_file}\n\
> >> +/Makemodule.am\n\
> >> +/.gitignore"
> >> +	) > "${output}/.gitignore"
> > Neither the shell nor echo -n interpret \n, so Makemodule.am and gitignore
> > end up filled with garbage.  I wonder how does it work for you.
> >
> > Let's use cat with here-document instead.
> Well, tested right now, it works,

It means you are likely using dash as /bin/sh.

"echo" is one the least portable shell builtin.  According to autoconf
"Limitations of Builtins" guide, it is not possible to use "echo" portably
unless both options and escape sequences are omitted.

> nevertheless I'll change it with cat with here-doc

Thanks.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20171109/fd74548a/attachment.bin>


More information about the Strace-devel mailing list