Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. CFLAGS = -Xcc -ISources/BoringSSL/include
  2. all:
  3. swift build -v $(CFLAGS)
  4. cp .build/debug/protoc-gen-swift .
  5. cp .build/debug/protoc-gen-swiftgrpc .
  6. project:
  7. swift package generate-xcodeproj
  8. test: all
  9. swift test -v $(CFLAGS)
  10. test-echo: all
  11. cp .build/debug/Echo .
  12. ./Echo serve & /bin/echo $$! > echo.pid
  13. ./Echo get | tee test.out
  14. ./Echo expand | tee -a test.out
  15. ./Echo collect | tee -a test.out
  16. ./Echo update | tee -a test.out
  17. kill -9 `cat echo.pid`
  18. diff -u test.out Sources/EchoExample/test.gold
  19. test-examples:
  20. cd Examples/Echo/PackageManager; make test
  21. cd Examples/Simple/PackageManager; make
  22. test-plugin:
  23. protoc Examples/Echo/echo.proto --proto_path=Examples/Echo --plugin=.build/debug/protoc-gen-swiftgrpc --swiftgrpc_out=/tmp --swiftgrpc_opt=TestStubs=true
  24. diff /tmp/echo.grpc.swift Examples/Echo/Generated/echo.grpc.swift
  25. clean:
  26. rm -rf Packages
  27. rm -rf .build
  28. rm -rf SwiftGRPC.xcodeproj
  29. rm -rf Package.pins Package.resolved
  30. rm -rf protoc-gen-swift protoc-gen-swiftgrpc
  31. cd Examples/Echo/PackageManager; make clean
  32. cd Examples/Simple/PackageManager; make clean