-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.am
91 lines (72 loc) · 2.92 KB
/
Makefile.am
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
nobindir=bin
nolibdir=lib/ndesk-options
OPTIONS_SRC = \
src/NDesk.Options/AssemblyInfo.cs \
$(srcdir)/src/NDesk.Options/NDesk.Options/Options.cs
OPTIONS_TEST_SRC = \
$(srcdir)/src/NDesk.Options/Test/NDesk.Options/OptionContextTest.cs \
$(srcdir)/src/NDesk.Options/Test/NDesk.Options/OptionSetTest.cs \
$(srcdir)/src/NDesk.Options/Test/NDesk.Options/OptionTest.cs \
$(srcdir)/src/NDesk.Options/Test/NDesk.Options/Utils.cs
include doc/Makefile.include
EXTRA_DIST = \
$(DOC_EXTRA_DIST) \
$(OPTIONS_TEST_SRC) \
$(srcdir)/src/NDesk.Options/AssemblyInfo.cs.in \
$(srcdir)/src/NDesk.Options/NDesk.Options/Options.cs \
$(srcdir)/ndesk-options.spec.in
assemblydir=$(prefix)/lib/ndesk-options
assembly_DATA = \
$(nolibdir)/NDesk.Options.dll \
$(srcdir)/src/NDesk.Options/NDesk.Options/Options.cs
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lib/pkgconfig/ndesk-options.pc
CSC = $(MCS) $(CSFLAGS)
.PHONY: all check rpm
all: $(nolibdir)/NDesk.Options.dll
dist-hook:
if [ -d $(srcdir)/.git ] ; then \
(cd $(srcdir) && git-log > $(distdir)/ChangeLog) ; \
fi
$(nolibdir)/NDesk.Options.dll: $(OPTIONS_SRC)
-mkdir -p `dirname $@`
$(CSC) -debug+ -d:NDESK_OPTIONS $(OPTIONS_SRC) -langversion:ISO-2 -t:library -out:$@
$(nolibdir)/NDesk.Options_test.dll: $(nolibdir)/NDesk.Options.dll $(OPTIONS_TEST_SRC)
-mkdir -p `dirname $@`
$(CSC) -debug+ -t:library -out:$@ -r:$(nolibdir)/NDesk.Options.dll \
-r:nunit.core.dll -r:nunit.framework.dll -r:nunit.util.dll \
-d:NDESK_OPTIONS $(OPTIONS_TEST_SRC)
$(nolibdir)/NDesk.Options_test_linq.dll: $(OPTIONS_SRC) $(OPTIONS_TEST_SRC)
-mkdir -p `dirname $@`
$(CSC) -debug+ -d:LINQ -t:library -out:$@ \
-r:nunit.core.dll -r:nunit.framework.dll -r:nunit.util.dll \
-d:NDESK_OPTIONS $(OPTIONS_SRC) $(OPTIONS_TEST_SRC)
check: $(nolibdir)/NDesk.Options_test.dll $(nolibdir)/NDesk.Options_test_linq.dll
nunit-console2 $(nolibdir)/NDesk.Options_test.dll
nunit-console2 $(nolibdir)/NDesk.Options_test_linq.dll
rpm:
tgz=$(DIST_ARCHIVES); \
if [ ! -e $(DIST_ARCHIVES) ] ; then tgz=archive/$(DIST_ARCHIVES) ; fi ; \
cp $$tgz /usr/src/packages/SOURCES/$(DIST_ARCHIVES) && \
rpmbuild -bb ndesk-options.spec && \
cp /usr/src/packages/RPMS/noarch/$(distdir)*.rpm archive
bin-zip:
-rm archive/$(distdir).bin.zip
$(MAKE) prefix= DESTDIR=$(distdir).bin install && \
mdoc export-msxdoc -o $(distdir).bin/lib/ndesk-options/NDesk.Options.xml $(srcdir)/doc/en && \
zip -r archive/$(distdir).bin.zip $(distdir).bin && \
rm -Rf $(distdir).bin
prepare-release:
$(MAKE) distcheck
$(MAKE) bin-zip
$(MAKE) doc-html
mv $(DIST_ARCHIVES) archive
CLEANFILES = \
$(DOC_CLEANFILES) \
$(nolibdir)/NDesk.Options.dll \
$(nolibdir)/NDesk.Options.dll.mdb \
$(nolibdir)/NDesk.Options_test.dll \
$(nolibdir)/NDesk.Options_test.dll.mdb \
$(nolibdir)/NDesk.Options_test_linq.dll \
$(nolibdir)/NDesk.Options_test_linq.dll.mdb \
$(nolibdir)/TestResult.xml