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