Makefile 816 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. manifests = R.manifest R-local.manifest
  2. all debug: $(manifests)
  3. R_SRC = R-3.1.2
  4. R_INSTALL = $(R_SRC)/build
  5. local: R-local
  6. R-local: $(R_INSTALL)/lib/R/bin/exec/R
  7. cp -f $< $@
  8. $(R_INSTALL)/lib/R/bin/exec/R: $(R_SRC)/Makefile
  9. cd $(R_SRC) && $(MAKE)
  10. cd $(R_SRC) && $(MAKE) install
  11. $(R_SRC)/Makefile: $(R_SRC)/configure
  12. cd $(R_SRC) && \
  13. ./configure --prefix=$(shell readlink -f $(R_INSTALL))
  14. $(R_SRC)/configure: $(R_SRC).tar.gz
  15. tar -xzf $<
  16. test_targets =
  17. test: all $(test_targets)
  18. R.manifest: R.manifest.template
  19. $(MAKE) -C .. r/$@ appdir=r/
  20. R-local.manifest: R-local.manifest.template
  21. $(MAKE) -C .. r/$@ appdir=r/ \
  22. extra_rules="-e 's:\\\$$\$$(RDIR):$(shell readlink -f $(R_INSTALL)/lib/R):g'"
  23. distclean: clean
  24. rm -rf $(R_SRC) R-local
  25. clean: clean-manifests
  26. clean-manifests:
  27. rm -rf $(manifests)