From 6155ed8b499c10bdd1f38bcb25866218bc388b7c Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Tue, 21 Aug 2018 15:01:07 -0700 Subject: Re-add amalgamation rules and remove google protobuf from Travis. --- .travis.yml | 1 - Makefile | 14 ++++++++++++++ travis.sh | 16 ++-------------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 053b130..56ab91c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ env: - UPB_TRAVIS_BUILD=bare - UPB_TRAVIS_BUILD=barejit - UPB_TRAVIS_BUILD=core32 - - UPB_TRAVIS_BUILD=withprotobuf - UPB_TRAVIS_BUILD=lua - UPB_TRAVIS_BUILD=ndebug - UPB_TRAVIS_BUILD=coverage diff --git a/Makefile b/Makefile index 1bf5a39..f78c950 100644 --- a/Makefile +++ b/Makefile @@ -437,3 +437,17 @@ upb/bindings/lua/upb/table_c.so: upb/bindings/lua/upb/table.c lib/libupb_pic.a upb/bindings/lua/upb/pb_c.so: upb/bindings/lua/upb/pb.c $(LUA_LIB_DEPS) $(E) CC upb/bindings/lua/upb/pb.c $(Q) $(CC) $(OPT) $(CSTD) $(WARNFLAGS) $(CPPFLAGS) $(CFLAGS) -fpic -shared -o $@ $^ $(LUA_LDFLAGS) + +# Amalgamated source (upb.c/upb.h) ############################################ + +AMALGAMATE_SRCS=$(upb_SRCS) $(upb_descriptor_SRCS) $(upb_pb_SRCS) $(upb_json_SRCS) + +amalgamate: upb.c upb.h + +upb.c upb.h: $(AMALGAMATE_SRCS) + $(E) AMALGAMATE $@ + $(Q) ./tools/amalgamate.py "" "" $^ + +amalgamated: upb.c upb.h + $(E) CC upb.c + $(Q) $(CC) -o upb.o -c upb.c $(WARNFLAGS) diff --git a/travis.sh b/travis.sh index 413015a..e8323df 100755 --- a/travis.sh +++ b/travis.sh @@ -23,17 +23,6 @@ barejit_script() { make test } -# Build with Google protobuf support and tests (with JIT). -withprotobuf_install() { - sudo apt-get update -qq - sudo apt-get install libprotobuf-dev - install_protoc -} -withprotobuf_script() { - make -j12 tests googlepbtests WITH_JIT=yes - make test -} - # Build with strict warnings. warnings_install() { : @@ -103,7 +92,7 @@ ndebug_install() { ndebug_script() { # Override of USER_CPPFLAGS removes -UNDEBUG. export USER_CPPFLAGS="`pkg-config lua5.2 --cflags` -g -fomit-frame-pointer" - make -j12 tests googlepbtests testlua WITH_JIT=yes + make -j12 tests testlua WITH_JIT=yes make test } @@ -127,7 +116,7 @@ coverage_install() { } coverage_script() { export USER_CPPFLAGS="--coverage -O0 `pkg-config lua5.2 --cflags`" - make -j12 tests googlepbtests testlua WITH_JIT=yes + make -j12 tests testlua WITH_JIT=yes make test } coverage_after_success() { @@ -152,7 +141,6 @@ if [ "$1" == "local" ]; then run_config "bare" run_config "barejit" run_config "core32" - run_config "withprotobuf" run_config "lua" run_config "ndebug" run_config "genfiles" -- cgit v1.2.3