svn path=/branches/mono-1-1-9/mcs/; revision=51207
[mono.git] / scripts / Makefile.am
1 bin_SCRIPTS = $(scripts_1_0) $(scripts_2_0) gmcs mono-service $(scripts_rpmhelpers)
2
3 scripts_1_0 = \
4         al                      \
5         caspol                  \
6         cert2spc                \
7         certmgr                 \
8         chktrust                \
9         cilc                    \
10         disco                   \
11         dtd2xsd                 \
12         gacutil                 \
13         genxs                   \
14         ilasm                   \
15         makecert                \
16         macpack                 \
17         mbas                    \
18         mcs                     \
19         mjs                     \
20         mkbundle                \
21         monop                   \
22         mono-shlib-cop          \
23         nunit-console           \
24         permview                \
25         prj2make                \
26         resgen                  \
27         secutil                 \
28         setreg                  \
29         signcode                \
30         sn                      \
31         soapsuds                \
32         sqlsharp                \
33         wsdl                    \
34         xsd
35
36 scripts_2_0 = \
37         monop2                  \
38         wsdl2
39
40 scripts_rpmhelpers = mono-find-provides mono-find-requires
41
42 pkgconfigdir = $(libdir)/pkgconfig
43 pkgconfig_DATA= mono-nunit.pc
44
45 CLEANFILES = $(scripts_1_0) $(scripts_2_0) gmcs mono-service
46 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
47
48 EXTRA_DIST =                   \
49         script.in              \
50         mono-service.in        \
51         mono-nunit.pc.in       \
52         mono-find-provides.in  \
53         mono-find-requires.in
54
55 if USE_JIT
56 mono_interp = mono
57 else
58 mono_interp = mint
59 endif
60
61 if PLATFORM_WIN32
62 plat_bindir = $(shell cygpath -m $(libdir))
63 mono_instdir = $(shell cygpath -m $(libdir))/mono
64 else
65 plat_bindir = $(bindir)
66 mono_instdir = $(prefix)/lib/mono
67 endif
68
69 REWRITE = sed \
70         -e 's,@''bindir@,$(bindir),g'                           \
71         -e 's,@''plat_bindir@,$(plat_bindir),g'                 \
72         -e 's,@''mono_instdir@,$(mono_instdir),g'               \
73         -e 's,@''gtkdir@,$(gtkdir),g'                           \
74         -e 's,@''mono_interp@,$(mono_interp),g'
75
76 REWRITE1 = $(REWRITE) -e 's,@''framework_version@,1.0,g'
77 REWRITE2 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
78
79 mono-service: mono-service.in Makefile
80         $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
81         mv $@.tmp $@
82
83 $(scripts_1_0): script.in Makefile
84         $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/script.in > $@.tmp
85         mv $@.tmp $@
86
87 gmcs: script.in Makefile
88         $(REWRITE2) -e 's,@''exe_name@,$@,g' $(srcdir)/script.in > $@.tmp
89         mv $@.tmp $@
90
91 $(scripts_2_0): script.in Makefile
92         n=`echo $@ | sed 's,2$$,,'`; \
93         $(REWRITE2) -e "s,@""exe_name@,$$n,g" $(srcdir)/script.in > $@.tmp
94         mv $@.tmp $@