Mail Archives: djgpp-workers/2000/05/19/15:57:51
>
> In message <39130EA2 DOT D42C42CC AT softhome DOT net>you write:
> > Currently fixproto script does not understand DOS style absolute
> > paths with drive letters. This leads to paths like
> This can't be correct since it will mess up on systems which allow directory
> names like c; (ie every unix system I'm aware of).
>
> You'll have to find some way to conditionalize this behavior for
> systems with dos-like naming conventions.
Ok, how about the idea below.
gcc/Changelog:
2000-05-19 Mark Elbrecht <snowball3 AT bigfoot DOT com>
* config/i386/x-djgpp (FIXPROTO_EXTRA_PATTERN): Define.
* Makefile.in: Pass it to fixproto.
* fixproto: Use it. Update copyright.
Index: egcs/gcc/config/i386/x-djgpp
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/x-djgpp,v
retrieving revision 1.2
diff -c -2 -p -r1.2 x-djgpp
*** x-djgpp 1999/09/04 15:08:57 1.2
--- x-djgpp 2000/05/19 18:47:17
*************** LN = cp -p
*** 23,24 ****
--- 23,26 ----
LN_S = cp -p
+ FIXPROTO_EXTRA_PATTERN="?:*"
+
Index: egcs/gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.447
diff -c -p -r1.447 Makefile.in
*** Makefile.in 2000/05/19 04:13:35 1.447
--- Makefile.in 2000/05/19 19:17:02
*************** stmp-fixproto: fixhdr.ready fixproto stm
*** 2043,2049 ****
mkinstalldirs="$(SHELL) $(srcdir)/mkinstalldirs"; \
export mkinstalldirs; \
if [ -d $(SYSTEM_HEADER_DIR) ] ; then \
! $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
else true; fi; \
touch include/fixed; \
--- 2043,2050 ----
mkinstalldirs="$(SHELL) $(srcdir)/mkinstalldirs"; \
export mkinstalldirs; \
if [ -d $(SYSTEM_HEADER_DIR) ] ; then \
! $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR) \
! $(FIXPROTO_EXTRA_PATTERN); \
if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
else true; fi; \
touch include/fixed; \
Index: egcs/gcc/fixproto
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixproto,v
retrieving revision 1.9
diff -c -p -r1.9 fixproto
*** fixproto 2000/04/17 14:40:03 1.9
--- fixproto 2000/05/19 19:55:14
***************
*** 1,10 ****
#!/bin/sh
#
# SYNOPSIS
! # fixproto TARGET-DIR SOURCE-DIR-ALL SOURCE-DIR-STD
#
# COPYRIGHT
! # Copyright (C) 1993, 1994, 1997, 1998 Free Software Foundation, Inc.
# This file is part of GNU CC.
#
# GNU CC is free software; you can redistribute it and/or modify
--- 1,11 ----
#!/bin/sh
#
# SYNOPSIS
! # fixproto TARGET-DIR SOURCE-DIR-ALL SOURCE-DIR-STD EXTRA-PATTERN
#
# COPYRIGHT
! # Copyright (C) 1993, 1994, 1997, 1998, 2000
! # Free Software Foundation, Inc.
# This file is part of GNU CC.
#
# GNU CC is free software; you can redistribute it and/or modify
*************** original_dir=`pwd`
*** 60,65 ****
--- 61,68 ----
FIX_HEADER=${FIX_HEADER-$original_dir/fix-header}
DEFINES="-D__STDC__=0 -D__cplusplus ${FIXPROTO_DEFINES}"
+ extra_pattern=$4
+
if mkdir -p . 2> /dev/null; then
# Great, mkdir accepts -p
mkinstalldirs="mkdir -p"
*************** src_dir_all=$2
*** 90,100 ****
# "standard" ANSI/POSIX files listed in $std_files are processed.
src_dir_std=$3
! if [ `expr $rel_target_dir : '\(.\)'` != '/' ] ; then
! abs_target_dir=$original_dir/$rel_target_dir
! else
! abs_target_dir=$rel_target_dir
! fi
# Determine whether this system has symbolic links.
if ln -s X $rel_target_dir/ShouldNotExist 2>/dev/null; then
--- 93,106 ----
# "standard" ANSI/POSIX files listed in $std_files are processed.
src_dir_std=$3
! case $rel_target_dir in
! /* | $extra_pattern)
! abs_target_dir=$rel_target_dir
! ;;
! *)
! abs_target_dir=$original_dir/$rel_target_dir
! ;;
! esac
# Determine whether this system has symbolic links.
if ln -s X $rel_target_dir/ShouldNotExist 2>/dev/null; then
*************** include_path=""
*** 118,128 ****
if [ `echo $* | wc -w` != 0 ] ; then
for rel_source_dir in $src_dir_all $src_dir_std; do
! if [ `expr $rel_source_dir : '\(.\)'` != '/' ] ; then
! abs_source_dir=$original_dir/$rel_source_dir
! else
! abs_source_dir=$rel_source_dir
! fi
include_path="$include_path -I$abs_source_dir"
done
fi
--- 124,137 ----
if [ `echo $* | wc -w` != 0 ] ; then
for rel_source_dir in $src_dir_all $src_dir_std; do
! case $rel_source_dir in
! /* | $extra_pattern)
! abs_source_dir=$rel_source_dir
! ;;
! *)
! abs_source_dir=$original_dir/$rel_source_dir
! ;;
! esac
include_path="$include_path -I$abs_source_dir"
done
fi
*************** for code in ALL STD ; do
*** 175,185 ****
;;
esac
! if [ `expr $rel_source_dir : '\(.\)'` != '/' ] ; then
! abs_source_dir=$original_dir/$rel_source_dir
! else
! abs_source_dir=$rel_source_dir
! fi
if [ \! -d $abs_source_dir ] ; then
echo $progname\: warning\: no such directory\: \`$rel_source_dir\'
--- 184,197 ----
;;
esac
! case $rel_source_dir in
! /* | $extra_pattern)
! abs_source_dir=$rel_source_dir
! ;;
! *)
! abs_source_dir=$original_dir/$rel_source_dir
! ;;
! esac
if [ \! -d $abs_source_dir ] ; then
echo $progname\: warning\: no such directory\: \`$rel_source_dir\'
- Raw text -