diff --git a/build/protobuf.py b/build/protobuf.py index b499fc43..3d1f75b1 100644 --- a/build/protobuf.py +++ b/build/protobuf.py @@ -11,7 +11,7 @@ ) from build.c import cxxlibrary from types import SimpleNamespace -import build.pkg +from build.pkg import package emit( """ @@ -22,6 +22,7 @@ """ ) +lib = package(name="protobuf_lib", package="protobuf") @Rule def proto(self, name, srcs: Targets = None, deps: Targets = None): @@ -67,6 +68,6 @@ def protocc(self, name, srcs: Targets = None, deps: Targets = None): cxxlibrary( replaces=self, srcs=[r], - deps=targetswithtraitsof(deps, "cheaders"), + deps=targetswithtraitsof(deps, "cheaders") + [lib], hdrs=headers, ) diff --git a/scripts/encodedecodetest.sh b/scripts/encodedecodetest.sh index 8bb152c2..8d5bb9ea 100755 --- a/scripts/encodedecodetest.sh +++ b/scripts/encodedecodetest.sh @@ -21,7 +21,7 @@ if [ ! -s $destfile ]; then exit 1 fi -truncate $srcfile -r $destfile +truncate -r $destfile $srcfile if ! cmp $srcfile $destfile; then echo "Comparison failed!" >&2 exit 1