mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 13:31:02 +08:00
fix VPATH builds
this commit fixes VPATH builds where the build tree is separate from the source tree. this will allow us to run "make distcheck".
This commit is contained in:
parent
3128296851
commit
43b94a4bc4
14
Makefile.am
14
Makefile.am
@ -13,7 +13,9 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-include $(top_builddir)/config.h \
|
||||
-I${top_srcdir}/protobuf-c
|
||||
-I${top_srcdir}/protobuf-c \
|
||||
-I${top_builddir} \
|
||||
-I${top_srcdir}
|
||||
AM_CFLAGS = ${my_CFLAGS}
|
||||
AM_LDFLAGS =
|
||||
|
||||
@ -42,10 +44,6 @@ protobuf_c_libprotobuf_c_la_LDFLAGS = $(AM_LDFLAGS) \
|
||||
-export-symbols-regex "^(protobuf_c_[a-z].*)" \
|
||||
-no-undefined
|
||||
|
||||
install-exec-hook:
|
||||
rm -f $(DESTDIR)$(libdir)/libprotobuf-c.la
|
||||
rm -f $(DESTDIR)$(libdir)/libprotobuf-c-rpc.la
|
||||
|
||||
pkgconfig_DATA += protobuf-c/libprotobuf-c.pc
|
||||
CLEANFILES += protobuf-c/libprotobuf-c.pc
|
||||
EXTRA_DIST += protobuf-c/libprotobuf-c.pc.in
|
||||
@ -168,13 +166,13 @@ t_generated_code2_cxx_generate_packed_data_LDADD = \
|
||||
$(protobuf_LIBS)
|
||||
|
||||
t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-c$(EXEEXT) $(top_srcdir)/t/test.proto
|
||||
$(AM_V_GEN)$(top_builddir)/protoc-c/protoc-c$(EXEEXT) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto
|
||||
$(AM_V_GEN)$(top_builddir)/protoc-c/protoc-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto
|
||||
|
||||
t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-c$(EXEEXT) $(top_srcdir)/t/test-full.proto
|
||||
$(AM_V_GEN)$(top_builddir)/protoc-c/protoc-c$(EXEEXT) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
|
||||
$(AM_V_GEN)$(top_builddir)/protoc-c/protoc-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
|
||||
|
||||
t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto
|
||||
$(AM_V_GEN)@PROTOC@ --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
|
||||
$(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
|
||||
|
||||
t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
|
||||
$(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "../test.pb-c.h"
|
||||
#include "t/test.pb-c.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* these are tested against eachother to make sure the c and c++ agree. */
|
||||
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#include "../test-full.pb.h"
|
||||
#include "t/test-full.pb.h"
|
||||
#include <limits.h>
|
||||
# if defined(_MSC_VER)
|
||||
/* On windows, in ms visual studio, define the types ourselves */
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "../test-full.pb-c.h"
|
||||
#include "test-full-cxx-output.inc"
|
||||
#include "t/test-full.pb-c.h"
|
||||
#include "t/generated-code2/test-full-cxx-output.inc"
|
||||
|
||||
#define TEST_ENUM_SMALL_TYPE_NAME Foo__TestEnumSmall
|
||||
#define TEST_ENUM_SMALL(shortname) FOO__TEST_ENUM_SMALL__##shortname
|
||||
|
Loading…
x
Reference in New Issue
Block a user