Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. PYTHON_SRC = Python-2.7.9
  2. PYTHON_INSTALL = $(PYTHON_SRC)/build
  3. manifests = python.manifest
  4. target = benchmarks
  5. exec_target = $(manifests)
  6. extra_rules = -e 's:\$$(PYTHONDIR):$(PYTHON_INSTALL)/:g'
  7. clean-extra += clean-tmp
  8. level = ../../
  9. include ../../Makefile
  10. $(PYTHON_INSTALL)/bin/python: $(PYTHON_SRC)/Makefile
  11. cd $(PYTHON_SRC) && $(MAKE)
  12. cd $(PYTHON_SRC) && $(MAKE) install
  13. $(PYTHON_SRC)/Makefile: $(PYTHON_SRC)/configure
  14. cd $(PYTHON_SRC) && \
  15. ./configure --prefix=$(shell readlink -f $(PYTHON_INSTALL))
  16. $(PYTHON_SRC)/configure: $(PYTHON_SRC).tgz
  17. tar -xzf $<
  18. benchmarks: benchmarks.tar.gz
  19. tar -xzf $<
  20. regression:
  21. @echo "\n\nBuilding Python..."
  22. @$(MAKE) >> /dev/null 2>&1
  23. @echo "\n\nRun helloworld.py:"
  24. ./python.manifest scripts/helloworld.py > OUTPUT
  25. grep -q "Hello World" OUTPUT
  26. @rm OUTPUT
  27. @echo "\n\nRun fibonacci.py:"
  28. ./python.manifest scripts/fibonacci.py > OUTPUT
  29. grep -q "fib2 55" OUTPUT
  30. @rm OUTPUT
  31. @echo "\n\nRun a HTTP server in the background"
  32. python scripts/dummy-web-server.py 8000
  33. @echo "\n\nRun test-http.py:"
  34. ./python.manifest scripts/test-http.py 127.0.0.1 8000 > OUTPUT
  35. wget -q http://127.0.0.1:8000/ -O OUTPUT2
  36. diff -q OUTPUT1 OUTPUT2
  37. @rm OUTPUT OUTPUT2
  38. BENCHMARK = all,-rietveld,-spitfire,-tornado_http
  39. clean-tmp:
  40. rm -f python.manifest.sgx
  41. distclean: clean
  42. rm -rf $(PYTHON_SRC) benchmarks