Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. manifest = python$(if $(LOCAL),-local,).manifest
  2. target = benchmarks
  3. exec_target = $(manifest)
  4. clean-extra = clean-local
  5. level = ../../
  6. include ../../Makefile
  7. local:
  8. make LOCAL=1
  9. PYTHON_SRC = Python-2.7.9
  10. PYTHON_INSTALL = $(PYTHON_SRC)/build
  11. $(PYTHON_INSTALL)/bin/python: $(PYTHON_SRC)/Makefile
  12. cd $(PYTHON_SRC) && $(MAKE)
  13. cd $(PYTHON_SRC) && $(MAKE) install
  14. $(PYTHON_SRC)/Makefile: $(PYTHON_SRC)/configure
  15. cd $(PYTHON_SRC) && \
  16. ./configure --prefix=$(shell readlink -f $(PYTHON_INSTALL))
  17. $(PYTHON_SRC)/configure: $(PYTHON_SRC).tgz
  18. tar -xzf $<
  19. test_targets = testsamplebash
  20. test: all $(test_targets)
  21. python.manifest: python.manifest.template
  22. $(MAKE) -C .. python/$@ appdir=python/
  23. python-local.manifest: python-local.manifest.template $(PYTHON_INSTALL)/bin/python
  24. $(MAKE) -C .. python/$@ appdir=python/ \
  25. extra_rules="-e 's:\\\$$\$$(PYTHONDIR):$(shell readlink -f $(PYTHON_INSTALL))/:g'"
  26. benchmarks: benchmarks.tar.gz
  27. tar -xzf $<
  28. BENCHMARK = all,-rietveld,-spitfire,-tornado_http
  29. test-graphene: benchmarks
  30. cd benchmarks && ./perf.py -b $(BENCHMARK) --csv ../results.csv /usr/bin/python $(PWD)/python.manifest
  31. distclean: clean
  32. rm -rf $(PYTHON_SRC) benchmarks
  33. clean-local:
  34. ifneq ($(LOCAL),1)
  35. make clean LOCAL=1
  36. endif