Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 2013 Prometheus Team
  2. # Licensed under the Apache License, Version 2.0 (the "License");
  3. # you may not use this file except in compliance with the License.
  4. # You may obtain a copy of the License at
  5. # http://www.apache.org/licenses/LICENSE-2.0
  6. # Unless required by applicable law or agreed to in writing, software
  7. # distributed under the License is distributed on an "AS IS" BASIS,
  8. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. # See the License for the specific language governing permissions and
  10. # limitations under the License.
  11. KEY_ID ?= _DEFINE_ME_
  12. all: cpp go java python ruby
  13. SUFFIXES:
  14. cpp: cpp/metrics.pb.cc cpp/metrics.pb.h
  15. cpp/metrics.pb.cc: metrics.proto
  16. protoc $< --cpp_out=cpp/
  17. cpp/metrics.pb.h: metrics.proto
  18. protoc $< --cpp_out=cpp/
  19. go: go/metrics.pb.go
  20. go/metrics.pb.go: metrics.proto
  21. protoc $< --go_out=go/
  22. java: src/main/java/io/prometheus/client/Metrics.java pom.xml
  23. mvn clean compile package
  24. src/main/java/io/prometheus/client/Metrics.java: metrics.proto
  25. protoc $< --java_out=src/main/java
  26. python: python/prometheus/client/model/metrics_pb2.py
  27. python/prometheus/client/model/metrics_pb2.py: metrics.proto
  28. mkdir -p python/prometheus/client/model
  29. protoc $< --python_out=python/prometheus/client/model
  30. ruby:
  31. $(MAKE) -C ruby build
  32. clean:
  33. -rm -rf cpp/*
  34. -rm -rf go/*
  35. -rm -rf java/*
  36. -rm -rf python/*
  37. -$(MAKE) -C ruby clean
  38. -mvn clean
  39. maven-deploy-snapshot: java
  40. mvn clean deploy -Dgpg.keyname=$(KEY_ID) -DperformRelease=true
  41. maven-deploy-release: java
  42. mvn clean release:clean release:prepare release:perform -Dgpg.keyname=$(KEY_ID) -DperformRelease=true
  43. .PHONY: all clean cpp go java maven-deploy-snapshot maven-deploy-release python ruby