1#! /bin/sh 2 3# Copyright (C) 2001, 2002, 2006, 2007, 2010, 2011 Free Software Foundation, Inc. 4# This file is part of GCC. 5 6# GCC is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 3, or (at your option) 9# any later version. 10 11# GCC is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15 16# You should have received a copy of the GNU General Public License 17# along with GCC; see the file COPYING3. If not see 18# <http://www.gnu.org/licenses/>. 19 20 21# Print libgcc_tm.h to the standard output. 22# DEFINES and HEADERS are expected to be set in the environment. 23 24# Add multiple inclusion protection guard, part one. 25echo "#ifndef LIBGCC_TM_H" 26echo "#define LIBGCC_TM_H" 27 28# Generate the body of the file 29echo "/* Automatically generated by mkheader.sh. */" 30for def in $DEFINES; do 31 echo "#ifndef $def" | sed 's/=.*//' 32 echo "# define $def" | sed 's/=/ /' 33 echo "#endif" 34done 35 36for file in $HEADERS; do 37 echo "#include \"$file\"" 38done 39 40# Add multiple inclusion protection guard, part two. 41echo "#endif /* LIBGCC_TM_H */" 42