diff mbox

[ovs-dev,1/2] libX.pc: use the correct output directory

Message ID 1484593587-20385-2-git-send-email-aconole@redhat.com
State Superseded
Headers show

Commit Message

Aaron Conole Jan. 16, 2017, 7:06 p.m. UTC
When the ovsdb library pkgconfig changes were introduced, they placed
generated output in the src directory.  This is incorrect, however, as
the output files should actually be placed in the build directory.  It
is only seen when running `make distcheck` after enabling shared
libraries (ex: `./configure --enable-shared`).

Fixes: commit e72e07a97e95 ("lib: Add support for pkgconfig for libovsdb.")
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
RFC to patch:
  Introduce this after catching the error while doing some testing.

 lib/automake.mk     | 4 ++--
 ofproto/automake.mk | 2 +-
 ovsdb/automake.mk   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Ben Pfaff Jan. 18, 2017, 9:45 p.m. UTC | #1
On Mon, Jan 16, 2017 at 02:06:26PM -0500, Aaron Conole wrote:
> When the ovsdb library pkgconfig changes were introduced, they placed
> generated output in the src directory.  This is incorrect, however, as
> the output files should actually be placed in the build directory.  It
> is only seen when running `make distcheck` after enabling shared
> libraries (ex: `./configure --enable-shared`).
> 
> Fixes: commit e72e07a97e95 ("lib: Add support for pkgconfig for libovsdb.")
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
> RFC to patch:
>   Introduce this after catching the error while doing some testing.

This seems like an improvement, but is the $(builddir)/ prefix actually
necessary?  It's unusual for this to be required.

Thanks,

Ben.
Aaron Conole Jan. 19, 2017, 2:37 p.m. UTC | #2
Ben Pfaff <blp@ovn.org> writes:

> On Mon, Jan 16, 2017 at 02:06:26PM -0500, Aaron Conole wrote:
>> When the ovsdb library pkgconfig changes were introduced, they placed
>> generated output in the src directory.  This is incorrect, however, as
>> the output files should actually be placed in the build directory.  It
>> is only seen when running `make distcheck` after enabling shared
>> libraries (ex: `./configure --enable-shared`).
>> 
>> Fixes: commit e72e07a97e95 ("lib: Add support for pkgconfig for libovsdb.")
>> Signed-off-by: Aaron Conole <aconole@redhat.com>
>> ---
>> RFC to patch:
>>   Introduce this after catching the error while doing some testing.
>
> This seems like an improvement, but is the $(builddir)/ prefix actually
> necessary?  It's unusual for this to be required.

Spot on - I should have realized it.  I'll spin a new patch and submit.

Thanks, Ben!

-Aaron
diff mbox

Patch

diff --git a/lib/automake.mk b/lib/automake.mk
index 88344a3..3f7c57e 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -429,8 +429,8 @@  lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
 endif
 
 pkgconfig_DATA += \
-	$(srcdir)/lib/libopenvswitch.pc \
-	$(srcdir)/lib/libsflow.pc
+	$(builddir)/lib/libopenvswitch.pc \
+	$(builddir)/lib/libsflow.pc
 
 EXTRA_DIST += \
 	lib/dh1024.pem \
diff --git a/ofproto/automake.mk b/ofproto/automake.mk
index 5a83a60..90f8d0f 100644
--- a/ofproto/automake.mk
+++ b/ofproto/automake.mk
@@ -60,7 +60,7 @@  ofproto_libofproto_la_LIBADD += ${PTHREAD_LIBS}
 endif
 
 pkgconfig_DATA += \
-	$(srcdir)/ofproto/libofproto.pc
+	$(builddir)/ofproto/libofproto.pc
 
 # Distribute this generated file in order not to require Python at
 # build time if ofproto/ipfix.xml is not modified.
diff --git a/ovsdb/automake.mk b/ovsdb/automake.mk
index 099ed3c..90dde56 100644
--- a/ovsdb/automake.mk
+++ b/ovsdb/automake.mk
@@ -40,7 +40,7 @@  ovsdb_libovsdb_la_CFLAGS = $(AM_CFLAGS)
 ovsdb_libovsdb_la_CPPFLAGS = $(AM_CPPFLAGS)
 
 pkgconfig_DATA += \
-	$(srcdir)/ovsdb/libovsdb.pc
+	$(builddir)/ovsdb/libovsdb.pc
 
 MAN_FRAGMENTS += \
 	ovsdb/remote-active.man \