| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Copyright (C) 2022-2025 Free Software Foundation, Inc. |
| 4 |
# |
| 5 |
# This file is part of GCC. |
| 6 |
# |
| 7 |
# GCC is free software; you can redistribute it and/or modify |
| 8 |
# it under the terms of the GNU General Public License as published by |
| 9 |
# the Free Software Foundation; either version 3, or (at your option) |
| 10 |
# any later version. |
| 11 |
# |
| 12 |
# GCC is distributed in the hope that it will be useful, |
| 13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
# GNU General Public License for more details. |
| 16 |
# |
| 17 |
# You should have received a copy of the GNU General Public License |
| 18 |
# along with GCC; see the file COPYING3. If not see |
| 19 |
# <http://www.gnu.org/licenses/>. |
| 20 |
|
| 21 |
style="$1" |
| 22 |
case $style in |
| 23 |
opt) |
| 24 |
;; |
| 25 |
c) |
| 26 |
first=true |
| 27 |
;; |
| 28 |
*) |
| 29 |
echo "Unknown style: \"$style\"" |
| 30 |
exit 1 |
| 31 |
;; |
| 32 |
esac |
| 33 |
|
| 34 |
( cat <<EOF |
| 35 |
Copyright (C) 2022-2025 Free Software Foundation, Inc. |
| 36 |
|
| 37 |
This file is part of GCC. |
| 38 |
|
| 39 |
GCC is free software; you can redistribute it and/or modify it under |
| 40 |
the terms of the GNU General Public License as published by the Free |
| 41 |
Software Foundation; either version 3, or (at your option) any later |
| 42 |
version. |
| 43 |
|
| 44 |
GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
| 45 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 46 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 47 |
for more details. |
| 48 |
|
| 49 |
You should have received a copy of the GNU General Public License |
| 50 |
along with GCC; see the file COPYING3. If not see |
| 51 |
<http://www.gnu.org/licenses/>. |
| 52 |
EOF |
| 53 |
) | while read line; do |
| 54 |
case $style in |
| 55 |
opt) |
| 56 |
if [ "$line" = "" ]; then |
| 57 |
echo ";" |
| 58 |
else |
| 59 |
echo "; $line" |
| 60 |
fi |
| 61 |
;; |
| 62 |
c) |
| 63 |
if $first; then |
| 64 |
echo "/* $line" |
| 65 |
first=false |
| 66 |
else |
| 67 |
if [ "$line" = "" ]; then |
| 68 |
echo |
| 69 |
else |
| 70 |
echo " $line" |
| 71 |
fi |
| 72 |
fi |
| 73 |
;; |
| 74 |
esac |
| 75 |
done |
| 76 |
|
| 77 |
|
| 78 |
case $style in |
| 79 |
c) |
| 80 |
echo "*/" |
| 81 |
;; |
| 82 |
esac |