/Makefile.obsolete

http://github.com/jacksonh/manos · Unknown · 109 lines · 85 code · 24 blank · 0 comment · 0 complexity · f009b09e2d34e448a0dfe769f7f6ee4a MD5 · raw file

  1. $(if $(wildcard config.make),,$(error You need to run './configure' before running 'make'.))
  2. include config.make
  3. conf=Debug
  4. SLN=src/Manos.sln
  5. VERBOSITY=normal
  6. version=0.1.1
  7. install_bin_dir = $(prefix)/lib/manos/
  8. install_data_dir = $(prefix)/share/manos/
  9. install_docs_dir = $(prefix)/share/manos/docs/
  10. install_script_dir = $(prefix)/bin/
  11. install_man_dir = $(prefix)/share/man/man1/
  12. install_pc_dir = $(pkg_config_path)/
  13. archivedir = build/archive
  14. distdir = manos-$(version)
  15. XBUILD_ARGS=/verbosity:$(VERBOSITY) /nologo
  16. srcdir_abs=$(shell pwd)
  17. LOCAL_CONFIG=$(srcdir_abs)/../../local-config
  18. ifeq ($(strip $(wildcard "${LOCAL_CONFIG}/monodevelop.pc")),)
  19. XBUILD=PKG_CONFIG_PATH="${LOCAL_CONFIG}:${PKG_CONFIG_PATH}" xbuild $(XBUILD_ARGS)
  20. else
  21. XBUILD=xbuild $(XBUILD_ARGS)
  22. endif
  23. NUNIT_CONSOLE = nunit-console4
  24. define MANOS_EXEC_SCRIPT
  25. #!/bin/bash
  26. exec mono $$MONO_OPTIONS "$(install_prefix)/lib/manos/manostool.exe" "$$@"
  27. endef
  28. export MANOS_EXEC_SCRIPT
  29. define MANOS_PC_SCRIPT
  30. Name: Manos
  31. Description: Manos
  32. Version: $(version)
  33. Libraries: $(install_prefix)/lib/manos/Manos.dll $(install_prefix)/lib/manos/Manos.dll.mdb
  34. Requires:
  35. Libs: -r:$(install_prefix)/lib/manos/Manos.dll
  36. endef
  37. export MANOS_PC_SCRIPT
  38. all:
  39. @test -f config.make || (echo "You need to run ./configure." && exit 1)
  40. $(XBUILD) $(SLN) /property:Configuration=$(conf)
  41. run-tests: all
  42. $(NUNIT_CONSOLE) build/Manos.Tests.dll
  43. update-docs: all
  44. mdoc update -o ./docs/api/en ./build/Manos.dll
  45. clean:
  46. $(XBUILD) $(SLN) /property:Configuration=$(conf) /t:Clean
  47. rm -rf build/*
  48. install: install-bin install-data install-docs install-script install-man install-pkg-config
  49. install-data:
  50. test -d $(install_data_dir) || install -d $(install_data_dir)
  51. cp -rf ./data/* "$(install_data_dir)"
  52. install-docs:
  53. test -d $(install_docs_dir) || install -d $(install_docs_dir)
  54. cp -rf ./docs/* $(install_docs_dir)
  55. install-bin: all
  56. test -d $(install_bin_dir) || install -d $(install_bin_dir)
  57. cp -rf ./build/* $(install_bin_dir)
  58. install-script:
  59. test -d $(install_script_dir) || install -d $(install_script_dir)
  60. echo "$$MANOS_EXEC_SCRIPT" > $(install_script_dir)manos
  61. chmod +x $(install_script_dir)manos
  62. install-man:
  63. test -d $(install_man_dir) || install -d $(install_man_dir)
  64. cp -rf ./man/* $(install_man_dir)
  65. install-pkg-config:
  66. test -d $(install_pc_dir) || install -d $(install_pc_dir)
  67. echo "$$MANOS_PC_SCRIPT" > $(install_pc_dir)manos.pc
  68. uninstall:
  69. echo "not implemented"
  70. # rm -rf "$(installdir)"
  71. dist: clean update-docs
  72. rm -rf $(archivedir)
  73. mkdir $(archivedir)
  74. git archive master | tar -x -C $(archivedir)
  75. rm -rf $(distdir)
  76. mkdir $(distdir)
  77. cp -rf $(archivedir)/src $(archivedir)/data $(archivedir)/man $(archivedir)/docs $(distdir)
  78. cp -rf configure Makefile $(distdir)
  79. tar cjvf manos-$(version).tar.bz2 manos-$(version)
  80. release: dist
  81. cp manos-$(version).tar.bz2 release/.
  82. cd release && rpmbuild -ba manos.spec
  83. gem: all
  84. cp release/manos.gemspec build/.
  85. cd build && gem build manos.gemspec