#!/usr/bin/env bash SRC_DIR=$1 BUILD_DIR=$2 if [ ! -e "$SRC_DIR/gcc/rtl.def" ] then echo "`$SRC_DIR' is not top directory of gcc source code" exit 1 fi if [ ! -e "$BUILD_DIR/gcc/gtype-desc.h" ] then echo "`$BUILD_DIR' is not top directory of gcc build" exit 1 fi pushd "$SRC_DIR" SRC_DIR=$PWD popd pushd "$BUILD_DIR" etags $SRC_DIR/gcc/*.[hc] $SRC_DIR/include/*.[hc] $SRC_DIR/libiberty/*.[hc] $SRC_DIR/gcc/config/arm/*.[hc] $SRC_DIR/gcc/c-family/*.[hc] $SRC_DIR/gcc/lto/*.[hc] $SRC_DIR/gcc/cp/*.[hc] gcc/*.[hc] --language=none --regex='/DEF_RTL_EXPR(\([A-Z_]+\),/\1/' $SRC_DIR/gcc/rtl.def popd