This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: include facility for .md files
On Mon, 19 Nov 2001, Aldy Hernandez wrote:
> On Mon, 2001-11-19 at 20:20, Richard Henderson wrote:
> > On Mon, Nov 19, 2001 at 06:03:33PM -0500, Alan Matsuoka wrote:
> > > Btw.. Why do you want to use absolute pathnames anyway?
> >
> > You'd get that if you configure with
> >
> > /absolute/path/src/configure
> >
>
> and that is exactly how i configure :)
>
> so alan, you probably want to take the relative path from the absolute
> and have additional .md includeable files be relative to the original
> path.
>
> boy that sounds confusing, but you get the pic.
>
>
>
> > rather than
> >
> > ../../src/configure
> >
De left connected to de right side.. de right side connected to de other side...
de other side connected to .. dis side...
I think I know what you mean. I tried this to get things going but I'll
come up with a better solution tomorrow.
Index: gensupport.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/gensupport.c,v
retrieving revision 1.14
diff -c -p -3 -r1.14 gensupport.c
*** gensupport.c 2001/11/16 23:00:16 1.14
--- gensupport.c 2001/11/20 03:10:37
*************** init_md_reader (filename)
*** 1015,1026 ****
int c;
char *lastsl;
! if (!IS_ABSOLUTE_PATHNAME (filename))
! {
! lastsl = strrchr (filename, '/');
! if (lastsl != NULL)
! base_dir = save_string (filename, lastsl - filename + 1 );
! }
read_rtx_filename = filename;
input_file = fopen (filename, "r");
--- 1015,1023 ----
int c;
char *lastsl;
! lastsl = strrchr (filename, '/');
! if (lastsl != NULL)
! base_dir = save_string (filename, lastsl - filename + 1 );
read_rtx_filename = filename;
input_file = fopen (filename, "r");
Alan Matsuoka
GCC Engineering
Red Hat Canada, Ltd
mailto:alanm@redhat.com Tel: (416) 482-2661 x250 / Fax: (416) 482-6299