Makefile 954 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. manifests = python.manifest python-local.manifest
  2. all debug: $(manifests)
  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. distclean: clean
  24. rm -rf $(PYTHON_SRC) python-local
  25. clean: clean-manifests
  26. clean-manifests:
  27. rm -rf $(manifests)