]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/mkheader.sh
[Ada] Use new API when creating a special SPARK heap entity
[thirdparty/gcc.git] / libgcc / mkheader.sh
CommitLineData
852b75ed
RO
1#! /bin/sh
2
8d9254fc 3# Copyright (C) 2001-2020 Free Software Foundation, Inc.
852b75ed
RO
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 */"