8sa1-gcc/gcc/fixinc/genfixes

88 lines
1.4 KiB
Plaintext
Raw Normal View History

#! /bin/sh
if (autogen --help > /dev/null 2>&1) ; then : ; else
echo "AutoGen does not appear to be correctly installed."
echo "Please download and install:"
echo " ftp://sourceware.cygnus.com/pub/egcs/infrastructure/autogen.tar.gz"
exit 1
fi
SHELL=/bin/sh
export SHELL
1999-10-25 12:11:12 -04:00
AG="autogen"
if [ $# -eq 0 ] ; then
not_done=false
else
not_done=true
fi
while $not_done
do
case "$1" in
-D )
shift
if [ $# -eq 0 ] ; then
not_done=false
else
AG="$AG -D$1"
shift
fi
;;
-D* )
AG="$AG $1"
shift
;;
'-?' )
echo "USAGE: gendefs [ -D<def-name> ... ] [ <output-name> ]"
echo "WHERE: '<def-name>' specifies a #define test name from inclhack.def"
echo " and '<output-name>' is one of: inclhack.sh fixincl.x fixincl.sh"
echo "The default is to produce all three outputs."
exit 0
;;
* )
not_done=false
;;
esac
done
if [ $# -eq 0 ] ; then
echo AutoGen-ing inclhack.sh
$AG inclhack.def
echo AutoGen-ing fixincl.x
$AG -T fixincl.tpl -b fixincl inclhack.def
echo AutoGen-ing fixincl.sh
$AG -DPROGRAM=1 -b fixincl inclhack.def
exit 0
fi
set -e
case "$1" in
fixtests.c (is_cxx_header): New fn, split out of double_slash_test. 1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu> * fixtests.c (is_cxx_header): New fn, split out of double_slash_test. (else_endif_label): Allow "#endif // comment" in C++ headers, as determined by is_cxx_header. * fixfixes.c (else_endif_label_fix): Update comment. * fixincl.c: Don't output VERB_PROGRESS lines if stdout is not a tty. * genfixes: Correct double thinko in commandline parsing. * hackshell.tpl: Generate correct sh syntax for bypass entries. * inclhack.def (all): Whenever an inserted preprocessor conditional is split over multiple lines, use double backslashes in this file so the fixed header will be readable. (AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h and add bypass entry for correct version of this header. (AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h. (AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h. (hpux8_bogus_inlines): New fix, split from... (ultrix_atof_param) ... here. (math_expression): Add bypass entry keyed to glibc comment indicating the problem has been dealt with; disable unnecessary sed operations; update commentary. (math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max, add select and bypass entries, simplify shell operation. (math_huge_val_ifndef): Split from math_gcc_ifndefs. (ip_missing_semi, rs6000_param, tinfo_cplusplus, ultrix_atof_param): Add select entry. (stdio_va_list, sunos_mather_decl): Add bypass entry. (systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the comments with the fixes they describe. * fixincl.x, fixincl.sh, inclhack.sh: Regen. From-SVN: r30999
1999-12-17 16:49:30 -05:00
inclhack.sh )
echo AutoGen-ing inclhack.sh
fixtests.c (is_cxx_header): New fn, split out of double_slash_test. 1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu> * fixtests.c (is_cxx_header): New fn, split out of double_slash_test. (else_endif_label): Allow "#endif // comment" in C++ headers, as determined by is_cxx_header. * fixfixes.c (else_endif_label_fix): Update comment. * fixincl.c: Don't output VERB_PROGRESS lines if stdout is not a tty. * genfixes: Correct double thinko in commandline parsing. * hackshell.tpl: Generate correct sh syntax for bypass entries. * inclhack.def (all): Whenever an inserted preprocessor conditional is split over multiple lines, use double backslashes in this file so the fixed header will be readable. (AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h and add bypass entry for correct version of this header. (AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h. (AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h. (hpux8_bogus_inlines): New fix, split from... (ultrix_atof_param) ... here. (math_expression): Add bypass entry keyed to glibc comment indicating the problem has been dealt with; disable unnecessary sed operations; update commentary. (math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max, add select and bypass entries, simplify shell operation. (math_huge_val_ifndef): Split from math_gcc_ifndefs. (ip_missing_semi, rs6000_param, tinfo_cplusplus, ultrix_atof_param): Add select entry. (stdio_va_list, sunos_mather_decl): Add bypass entry. (systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the comments with the fixes they describe. * fixincl.x, fixincl.sh, inclhack.sh: Regen. From-SVN: r30999
1999-12-17 16:49:30 -05:00
$AG inclhack.def
;;
fixincl.x )
echo AutoGen-ing fixincl.x
$AG -T fixincl.tpl -b fixincl inclhack.def
;;
fixincl.sh )
echo AutoGen-ing fixincl.sh
$AG -DPROGRAM=1 -b fixincl inclhack.def
;;
* )
echo genfixes cannot create $1
exit 1
;;
esac
exit 0