Makefile 1.2 KB

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