Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 75372b8088c20474497b79ec6cf1e99f2d17f56d Mon Sep 17 00:00:00 2001 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2 | From: Ismo Puustinen <ismo.puustinen@intel.com> |
| 3 | Date: Mon, 3 Apr 2017 13:23:38 +0300 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | Subject: [PATCH] buildsystem: do not assume building in source tree. |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | |
| 6 | Use $(top_srcdir) as reference for include paths and buildtime scripts. |
| 7 | Otherwise compilation outside of project root directory will fail |
| 8 | because header and script paths are wrong. |
| 9 | |
| 10 | To reproduce: mkdir b; cd b; ../configure; make |
| 11 | |
| 12 | Upstream-status: Accepted [https://git.linuxtv.org//v4l-utils.git/commit/?id=bd98c9a99bffc8d44c54859345e4dfee0ada4275] |
| 13 | |
| 14 | Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 15 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | --- |
| 17 | utils/cec-compliance/Makefile.am | 2 +- |
| 18 | utils/cec-ctl/Makefile.am | 2 +- |
| 19 | utils/cec-follower/Makefile.am | 4 ++-- |
| 20 | utils/qv4l2/Makefile.am | 2 +- |
| 21 | utils/v4l2-compliance/Makefile.am | 2 +- |
| 22 | utils/v4l2-ctl/Makefile.am | 2 +- |
| 23 | 6 files changed, 7 insertions(+), 7 deletions(-) |
| 24 | |
| 25 | diff --git a/utils/cec-compliance/Makefile.am b/utils/cec-compliance/Makefile.am |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 26 | index f05fe6c..f7d1535 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 27 | --- a/utils/cec-compliance/Makefile.am |
| 28 | +++ b/utils/cec-compliance/Makefile.am |
| 29 | @@ -7,7 +7,7 @@ cec_compliance_LDFLAGS = -lrt |
| 30 | cec-compliance.cpp: cec-table.h |
| 31 | |
| 32 | cec-table.h: ../cec-ctl/msg2ctl.pl ../../include/linux/cec.h ../../include/linux/cec-funcs.h |
| 33 | - ../cec-ctl/msg2ctl.pl 2 ../../include/linux/cec.h ../../include/linux/cec-funcs.h >$@ |
| 34 | + $(top_srcdir)/utils/cec-ctl/msg2ctl.pl 2 $(top_srcdir)/include/linux/cec.h $(top_srcdir)/include/linux/cec-funcs.h >$@ |
| 35 | |
| 36 | cec-compliance.cpp: version.h |
| 37 | |
| 38 | diff --git a/utils/cec-ctl/Makefile.am b/utils/cec-ctl/Makefile.am |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 39 | index 4a6eae5..570a070 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 40 | --- a/utils/cec-ctl/Makefile.am |
| 41 | +++ b/utils/cec-ctl/Makefile.am |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | @@ -6,7 +6,7 @@ cec_ctl_SOURCES = cec-ctl.cpp |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 43 | cec-ctl.cpp: cec-ctl-gen.h |
| 44 | |
| 45 | cec-ctl-gen.h: msg2ctl.pl ../../include/linux/cec.h ../../include/linux/cec-funcs.h |
| 46 | - ./msg2ctl.pl 0 ../../include/linux/cec.h ../../include/linux/cec-funcs.h >$@ |
| 47 | + $(top_srcdir)/utils/cec-ctl/msg2ctl.pl 0 $(top_srcdir)/include/linux/cec.h $(top_srcdir)/include/linux/cec-funcs.h >$@ |
| 48 | |
| 49 | clean-local: |
| 50 | -rm -vf cec-ctl-gen.h |
| 51 | diff --git a/utils/cec-follower/Makefile.am b/utils/cec-follower/Makefile.am |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 52 | index d8ad292..e3553eb 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 53 | --- a/utils/cec-follower/Makefile.am |
| 54 | +++ b/utils/cec-follower/Makefile.am |
| 55 | @@ -7,12 +7,12 @@ cec_follower_LDFLAGS = -lrt |
| 56 | cec-log.cpp: cec-log.h |
| 57 | |
| 58 | cec-log.h: ../cec-ctl/msg2ctl.pl ../../include/linux/cec.h ../../include/linux/cec-funcs.h |
| 59 | - ../cec-ctl/msg2ctl.pl 1 ../../include/linux/cec.h ../../include/linux/cec-funcs.h >$@ |
| 60 | + $(top_srcdir)/utils/cec-ctl/msg2ctl.pl 1 $(top_srcdir)/include/linux/cec.h $(top_srcdir)/include/linux/cec-funcs.h >$@ |
| 61 | |
| 62 | cec-follower.cpp: cec-table.h version.h |
| 63 | |
| 64 | cec-table.h: ../cec-ctl/msg2ctl.pl ../../include/linux/cec.h ../../include/linux/cec-funcs.h |
| 65 | - ../cec-ctl/msg2ctl.pl 2 ../../include/linux/cec.h ../../include/linux/cec-funcs.h >$@ |
| 66 | + $(top_srcdir)/utils/cec-ctl/msg2ctl.pl 2 $(top_srcdir)/include/linux/cec.h $(top_srcdir)/include/linux/cec-funcs.h >$@ |
| 67 | |
| 68 | version.h: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 69 | @if git show-ref -s HEAD >/dev/null 2>&1; then \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 70 | diff --git a/utils/qv4l2/Makefile.am b/utils/qv4l2/Makefile.am |
| 71 | index fd58486..ccd1a2a 100644 |
| 72 | --- a/utils/qv4l2/Makefile.am |
| 73 | +++ b/utils/qv4l2/Makefile.am |
| 74 | @@ -8,7 +8,7 @@ qv4l2_SOURCES = qv4l2.cpp general-tab.cpp ctrl-tab.cpp vbi-tab.cpp capture-win.c |
| 75 | nodist_qv4l2_SOURCES = moc_qv4l2.cpp moc_general-tab.cpp moc_capture-win.cpp moc_vbi-tab.cpp qrc_qv4l2.cpp |
| 76 | qv4l2_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la \ |
| 77 | ../libv4l2util/libv4l2util.la ../libmedia_dev/libmedia_dev.la |
| 78 | -qv4l2_CPPFLAGS = -I../common |
| 79 | +qv4l2_CPPFLAGS = -I$(top_srcdir)/utils/common |
| 80 | |
| 81 | if WITH_QTGL |
| 82 | qv4l2_CPPFLAGS += $(QTGL_CFLAGS) |
| 83 | diff --git a/utils/v4l2-compliance/Makefile.am b/utils/v4l2-compliance/Makefile.am |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 84 | index c2b5919..fb8d12e 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 85 | --- a/utils/v4l2-compliance/Makefile.am |
| 86 | +++ b/utils/v4l2-compliance/Makefile.am |
| 87 | @@ -5,7 +5,7 @@ DEFS := |
| 88 | v4l2_compliance_SOURCES = v4l2-compliance.cpp v4l2-test-debug.cpp v4l2-test-input-output.cpp \ |
| 89 | v4l2-test-controls.cpp v4l2-test-io-config.cpp v4l2-test-formats.cpp v4l2-test-buffers.cpp \ |
| 90 | v4l2-test-codecs.cpp v4l2-test-colors.cpp v4l2-compliance.h |
| 91 | -v4l2_compliance_CPPFLAGS = -I../common |
| 92 | +v4l2_compliance_CPPFLAGS = -I$(top_srcdir)/utils/common |
| 93 | |
| 94 | if WITH_V4L2_COMPLIANCE_LIBV4L |
| 95 | v4l2_compliance_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la -lrt -lpthread |
| 96 | diff --git a/utils/v4l2-ctl/Makefile.am b/utils/v4l2-ctl/Makefile.am |
| 97 | index 955647d..825e53f 100644 |
| 98 | --- a/utils/v4l2-ctl/Makefile.am |
| 99 | +++ b/utils/v4l2-ctl/Makefile.am |
| 100 | @@ -7,7 +7,7 @@ v4l2_ctl_SOURCES = v4l2-ctl.cpp v4l2-ctl.h v4l2-ctl-common.cpp v4l2-ctl-tuner.cp |
| 101 | v4l2-ctl-overlay.cpp v4l2-ctl-vbi.cpp v4l2-ctl-selection.cpp v4l2-ctl-misc.cpp \ |
| 102 | v4l2-ctl-streaming.cpp v4l2-ctl-sdr.cpp v4l2-ctl-edid.cpp v4l2-ctl-modes.cpp \ |
| 103 | v4l2-tpg-colors.c v4l2-tpg-core.c v4l-stream.c |
| 104 | -v4l2_ctl_CPPFLAGS = -I../common |
| 105 | +v4l2_ctl_CPPFLAGS = -I$(top_srcdir)/utils/common |
| 106 | |
| 107 | if WITH_V4L2_CTL_LIBV4L |
| 108 | v4l2_ctl_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la -lrt -lpthread |