PageRenderTime 34ms CodeModel.GetById 23ms app.highlight 9ms RepoModel.GetById 0ms app.codeStats 1ms

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