Bug 53185

Summary: fix out-of-tree build, etc.
Product: Ytstenut Reporter: Simon McVittie <smcv>
Component: ytstenut-glibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: ytstenut
Severity: normal    
Priority: medium CC: olli.salli
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
Whiteboard: review+
i915 platform: i915 features:
Attachments: 1/5] Split out generated sources, headers in build system
2/5] Don't prefix $(srcdir) to everything
3/5] Install headers that belong in a subdirectory to a subdirectory
4/5] This is not C++, hoist declaration to the beginning
5/5] Include config.h as the first thing in every C file

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.