bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using headers that install in other subdirs.


From: Jeff Bailey
Subject: Using headers that install in other subdirs.
Date: Sun, 15 Dec 2002 17:34:32 -0800
User-agent: Mutt/1.3.28i

I'm trying to figure out what the best solution to a problem I'm having
with moving the Hurd sources to using Automake:

I think this is the best simplification I can come up with:

a.h:
  #include <hurd/b.h>

b.h:
  /* Whatever you happen to want in here */

main.c:
  #include "a.h"
  /* Program continue on from here... */

Makefile.am:
  hurdincludedir = ${includdir}/hurd
  hurdinclude_HEADERS = a.h b.h
  bin_PROGRAMS = main

The problem here is that a.h then finds the installed b.h, not the local
b.h (or fails if there isn't one installed).  The reason we need to do
it this way is that "a.h" is a generated RPC stub that gets installed.

I can't find any information on the Right Way to solve this - and I
can't seem to find other projects that need to chain header files like
this and where the header files aren't located directly in
compiler-searched directories.  Currently the Hurd sources set a bunch
of variables and then generate stub header files in $(top_builddir)/hurd
based on those, but it seems like there must be a better way.

Tks,
Jeff Bailey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]