11debfc3dSmrg#! /bin/sh 21debfc3dSmrg 3*8feb0f0bSmrg# Copyright (C) 2001-2020 Free Software Foundation, Inc. 41debfc3dSmrg# This file is part of GCC. 51debfc3dSmrg 61debfc3dSmrg# GCC is free software; you can redistribute it and/or modify 71debfc3dSmrg# it under the terms of the GNU General Public License as published by 81debfc3dSmrg# the Free Software Foundation; either version 3, or (at your option) 91debfc3dSmrg# any later version. 101debfc3dSmrg 111debfc3dSmrg# GCC is distributed in the hope that it will be useful, 121debfc3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 131debfc3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 141debfc3dSmrg# GNU General Public License for more details. 151debfc3dSmrg 161debfc3dSmrg# You should have received a copy of the GNU General Public License 171debfc3dSmrg# along with GCC; see the file COPYING3. If not see 181debfc3dSmrg# <http://www.gnu.org/licenses/>. 191debfc3dSmrg 201debfc3dSmrg 211debfc3dSmrg# Print libgcc_tm.h to the standard output. 221debfc3dSmrg# DEFINES and HEADERS are expected to be set in the environment. 231debfc3dSmrg 241debfc3dSmrg# Add multiple inclusion protection guard, part one. 251debfc3dSmrgecho "#ifndef LIBGCC_TM_H" 261debfc3dSmrgecho "#define LIBGCC_TM_H" 271debfc3dSmrg 281debfc3dSmrg# Generate the body of the file 291debfc3dSmrgecho "/* Automatically generated by mkheader.sh. */" 301debfc3dSmrgfor def in $DEFINES; do 311debfc3dSmrg echo "#ifndef $def" | sed 's/=.*//' 321debfc3dSmrg echo "# define $def" | sed 's/=/ /' 331debfc3dSmrg echo "#endif" 341debfc3dSmrgdone 351debfc3dSmrg 361debfc3dSmrgfor file in $HEADERS; do 371debfc3dSmrg echo "#include \"$file\"" 381debfc3dSmrgdone 391debfc3dSmrg 401debfc3dSmrg# Add multiple inclusion protection guard, part two. 411debfc3dSmrgecho "#endif /* LIBGCC_TM_H */" 42