[PATCH xserver 7/7] configure.ac: use automake option subdir-objects

Emil Velikov emil.l.velikov at gmail.com
Mon Apr 3 12:27:30 UTC 2017


Hi Mihail,

On 1 April 2017 at 07:52, Mihail Konev <k.mvc at ya.ru> wrote:
> Both fixes "source file is in a subdirectory" autoreconf warnings and
> ensures automake 2.0 (future) compatibility.
>
> Dummy source files that only #include the real one are so that every dir
> has its own source, and, therefore, does not reuse compilation results
> of another (objects are now put where the source is, not the makefile),
> thus retaining the CFLAGS and other settings as before.
>
In a perfect world, the respective files will be distinct, standalone,
components that one reuses at link time.

Including a C file from another C file is a very bad idea.

A marginally better solution is to use LN_S at build time - see
test/Makefile.am for an example.

-Emil


More information about the xorg-devel mailing list