This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Patch for readline
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: Patch for readline
- From: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Date: Sun, 15 Jul 2001 15:27:44 -0700
- Cc: gdb-patches at sourceware dot cygnus dot com
- References: <20010715121010.A20272@lucon.org>
On Sun, Jul 15, 2001 at 12:10:10PM -0700, H . J . Lu wrote:
> When you configure gdb with --prefix=/usr, readline will compile with
> -I/usr/include, which is very bad with gcc and cross compile. Here is
> a patch.
>
>
> H.J.
> ----
> 2001-07-15 H.J. Lu (hjl@gnu.org)
>
> * Makefile.in (INCLUDES): Never add -I/usr/include.
>
> --- readline/Makefile.in.include Sun Jul 15 11:38:10 2001
> +++ readline/Makefile.in Sun Jul 15 11:42:30 2001
> @@ -63,7 +63,10 @@ LOCAL_DEFS = @LOCAL_DEFS@
> TERMCAP_LIB = @TERMCAP_LIB@
>
> # For libraries which include headers from other libraries.
> -INCLUDES = -I. -I$(srcdir) -I$(includedir)
> +INCLUDES = -I. -I$(srcdir) \
> + `if test "$(includedir)" != "/usr/include"; then \
> + echo -I$(includedir); \
> + else true; fi`
>
> CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
Is -I$(includedir) ever actually right? I've always considered it to
be where include files should be installed, not referenced from.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer