[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: two build system issues
From: |
Justus Winter |
Subject: |
Re: two build system issues |
Date: |
Sun, 06 Apr 2014 18:28:40 +0200 |
User-agent: |
alot/0.3.4 |
Quoting Ivan Shmakov (2014-04-06 11:15:06)
> >>>>> Justus Winter <4winter@informatik.uni-hamburg.de> writes:
>
> > The second issue is due to me doing an out-of-tree build. That it
> > currently works is more or less by chance I fear. I just came up
> > with a (legit in my opinion) patch that breaks oot builds.
>
> > So what happens here is that demuxer.c includes
> > "../libports/notify_S.h", which is a mig-generated file:
>
> > build/build-deb/libdiskfs$ ls ../libports/notify_S.h
> > ../libports/notify_S.h
>
> > And this file includes "mig-decls.h" (that's the change I made that
> > breaks the build), because that file is in the source tree:
>
> > build/build-deb/libdiskfs$ ls ../libports/mig-decls.h
> > ls: cannot access ../libports/mig-decls.h: No such file or directory
> > build/build-deb/libdiskfs$ ls ../../libports/mig-decls.h
> > ../../libports/mig-decls.h
>
> > :/
>
> > Any help?
>
> Well, shouldn’t CPPFLAGS (or rather AM_CPPFLAGS, when Automake
> is used) include -I$(srcdir) whenever any header files from the
> source directory are to be included?
Yes, you are right, it should and it does :)
So the solution is in fact to qualify the include with the
subdirectory. So instead of doing
#define NOTIFY_IMPORTS \
import "mig-decls.h";
it should read
#define NOTIFY_IMPORTS \
import "libports/mig-decls.h";
Sweet, thanks :)
Justus