This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Move print_insn_XXX to an opcodes internal header, again
On Tue, Jul 11, 2017 at 11:04 AM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Jul 10, 2017 at 05:14:58PM +0100, Yao Qi wrote:
>> diff --git a/opcodes/cgen.sh b/opcodes/cgen.sh
>> index 637cf89..cdfa011 100644
>> --- a/opcodes/cgen.sh
>> +++ b/opcodes/cgen.sh
>> @@ -155,6 +155,8 @@ opcodes)
>> | sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
>> -e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \
>> > ${tmp}-dis.c
>> + # Mark these generated files read-only.
>> + sed -i '1 i /* -*- buffer-read-only: t -*- vi:set ro: *\/' ${tmp}-dis.c
>> ${rootdir}/move-if-change ${tmp}-dis.c ${srcdir}/${prefix}-dis.c
>>
>> # Remove temporary files.
>
> Good idea. In fact, I like it so much I'm going to steal it to add
> the header to all the cgen.sh generated files.
>
Yeah, that is better.
--
Yao (齐尧)