Rainer Orth | 852b75e | 2011-11-02 15:26:35 +0000 | [diff] [blame^] | 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. |
| 25 | echo "#ifndef LIBGCC_TM_H" |
| 26 | echo "#define LIBGCC_TM_H" |
| 27 | |
| 28 | # Generate the body of the file |
| 29 | echo "/* Automatically generated by mkheader.sh. */" |
| 30 | for def in $DEFINES; do |
| 31 | echo "#ifndef $def" | sed 's/=.*//' |
| 32 | echo "# define $def" | sed 's/=/ /' |
| 33 | echo "#endif" |
| 34 | done |
| 35 | |
| 36 | for file in $HEADERS; do |
| 37 | echo "#include \"$file\"" |
| 38 | done |
| 39 | |
| 40 | # Add multiple inclusion protection guard, part two. |
| 41 | echo "#endif /* LIBGCC_TM_H */" |