Bug 53185 - fix out-of-tree build, etc.
Summary: fix out-of-tree build, etc.
Status: RESOLVED FIXED
Alias: None
Product: Ytstenut
Classification: Unclassified
Component: ytstenut-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: ytstenut
URL:
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-08-06 18:51 UTC by Simon McVittie
Modified: 2012-08-07 09:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
1/5] Split out generated sources, headers in build system (2.78 KB, patch)
2012-08-06 18:52 UTC, Simon McVittie
Details | Splinter Review
2/5] Don't prefix $(srcdir) to everything (9.11 KB, patch)
2012-08-06 18:52 UTC, Simon McVittie
Details | Splinter Review
3/5] Install headers that belong in a subdirectory to a subdirectory (876 bytes, patch)
2012-08-06 18:53 UTC, Simon McVittie
Details | Splinter Review
4/5] This is not C++, hoist declaration to the beginning (1.14 KB, patch)
2012-08-06 18:53 UTC, Simon McVittie
Details | Splinter Review
5/5] Include config.h as the first thing in every C file (24.90 KB, patch)
2012-08-06 18:53 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2012-08-06 18:51:57 UTC
Various build badgering.
Comment 1 Simon McVittie 2012-08-06 18:52:16 UTC
Created attachment 65196 [details] [review]
1/5] Split out generated sources, headers in build system

In addition to fixing out-of-tree build by not prepending $(srcdir)
to these files, this means they aren't distributed in the tarball.
Comment 2 Simon McVittie 2012-08-06 18:52:33 UTC
Created attachment 65197 [details] [review]
2/5] Don't prefix $(srcdir) to everything

When compiling, GNU make knows how to do this without extra magic. The
only time we need to use $(srcdir) explicitly is when we pass files
from the $(srcdir) as explicit arguments to something.
Comment 3 Simon McVittie 2012-08-06 18:53:06 UTC
Created attachment 65198 [details] [review]
3/5] Install headers that belong in a subdirectory to a  subdirectory

For instance, the video-profile headers should go in video-profile/.

---

This fixes use of an installed ytstenut-1. I assume everyone had just been using it uninstalled...
Comment 4 Simon McVittie 2012-08-06 18:53:21 UTC
Created attachment 65199 [details] [review]
4/5] This is not C++, hoist declaration to the beginning
Comment 5 Simon McVittie 2012-08-06 18:53:38 UTC
Created attachment 65200 [details] [review]
5/5] Include config.h as the first thing in every C file

This is Autoconf best-practice, and in particular, is necessary to avoid
compiler warnings when using the GLib and telepathy-glib deprecation
macros.
Comment 6 Olli Salli 2012-08-06 19:22:58 UTC
Not worrying about this "header library" and "sources library" weirdness in the buildsys too much, looks good.
Comment 7 Simon McVittie 2012-08-07 09:08:03 UTC
Merged, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.