X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fcgen.sh;h=637cf89301b15d826b97d7a39efa61c7c56c4a32;hb=20b477a75c00de06a92b9577fd74416699d2c37f;hp=6865601ef0c2cb6deb8d14a1d99d0af50df6ffb2;hpb=b90efa5b79ac1524ec260f8eb89d1be37e0219a7;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/cgen.sh b/opcodes/cgen.sh index 6865601ef0..637cf89301 100644 --- a/opcodes/cgen.sh +++ b/opcodes/cgen.sh @@ -1,7 +1,7 @@ #! /bin/sh # CGEN generic assembler support code. # -# Copyright (C) 2000-2015 Free Software Foundation, Inc. +# Copyright (C) 2000-2017 Free Software Foundation, Inc. # # This file is part of the GNU opcodes library. # @@ -26,7 +26,7 @@ # cgen.sh action srcdir cgen cgendir cgenflags arch prefix \ # arch-file opc-file options [extrafiles] # -# ACTION is currently always "opcodes". It exists to be consistent with the +# ACTION is currently always "opcodes". It exists to be consistent with the # simulator. # ARCH is the name of the architecture. # It is substituted into @arch@ and @ARCH@ in the generated files. @@ -113,41 +113,48 @@ opcodes) ${extrafile_args} # Customise generated files for the particular architecture. - sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" < ${tmp}-desc.h1 > ${tmp}-desc.h + sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \ + -e 's/[ ][ ]*$//' < ${tmp}-desc.h1 > ${tmp}-desc.h ${rootdir}/move-if-change ${tmp}-desc.h ${srcdir}/${prefix}-desc.h sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \ - -e "s/@prefix@/${prefix}/" < ${tmp}-desc.c1 > ${tmp}-desc.c + -e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \ + < ${tmp}-desc.c1 > ${tmp}-desc.c ${rootdir}/move-if-change ${tmp}-desc.c ${srcdir}/${prefix}-desc.c - sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" < ${tmp}-opc.h1 > ${tmp}-opc.h + sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \ + -e 's/[ ][ ]*$//' < ${tmp}-opc.h1 > ${tmp}-opc.h ${rootdir}/move-if-change ${tmp}-opc.h ${srcdir}/${prefix}-opc.h sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \ - -e "s/@prefix@/${prefix}/" < ${tmp}-opc.c1 > ${tmp}-opc.c + -e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \ + < ${tmp}-opc.c1 > ${tmp}-opc.c ${rootdir}/move-if-change ${tmp}-opc.c ${srcdir}/${prefix}-opc.c case $extrafiles in *opinst*) sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \ - -e "s/@prefix@/${prefix}/" < ${tmp}-opinst.c1 >${tmp}-opinst.c + -e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \ + < ${tmp}-opinst.c1 >${tmp}-opinst.c ${rootdir}/move-if-change ${tmp}-opinst.c ${srcdir}/${prefix}-opinst.c ;; esac cat ${srcdir}/cgen-ibld.in ${tmp}-ibld.in1 | \ sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \ - -e "s/@prefix@/${prefix}/" > ${tmp}-ibld.c + -e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' > ${tmp}-ibld.c ${rootdir}/move-if-change ${tmp}-ibld.c ${srcdir}/${prefix}-ibld.c sed -e "/ -- assembler routines/ r ${tmp}-asm.in1" ${srcdir}/cgen-asm.in \ | sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \ - -e "s/@prefix@/${prefix}/" > ${tmp}-asm.c + -e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \ + > ${tmp}-asm.c ${rootdir}/move-if-change ${tmp}-asm.c ${srcdir}/${prefix}-asm.c sed -e "/ -- disassembler routines/ r ${tmp}-dis.in1" ${srcdir}/cgen-dis.in \ | sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \ - -e "s/@prefix@/${prefix}/" > ${tmp}-dis.c + -e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \ + > ${tmp}-dis.c ${rootdir}/move-if-change ${tmp}-dis.c ${srcdir}/${prefix}-dis.c # Remove temporary files.