* roottypes.cs: Rename from tree.cs.
[mono.git] / scripts / Makefile.am
1 bin_SCRIPTS = \
2         $(scripts_1_0)          \
3         $(scripts_1_0_umask)    \
4         $(scripts_2_0)          \
5         $(scripts_service)      \
6         $(scripts_nunit)        \
7         $(scripts_rpmhelpers)
8
9 scripts_1_0 = \
10         al                      \
11         caspol                  \
12         cert2spc                \
13         certmgr                 \
14         chktrust                \
15         cilc                    \
16         disco                   \
17         dtd2xsd                 \
18         dtd2rng                 \
19         gacutil                 \
20         genxs                   \
21         ilasm                   \
22         macpack                 \
23         mbas                    \
24         mcs                     \
25         mjs                     \
26         mkbundle                \
27         monop                   \
28         mono-shlib-cop          \
29         mono-xmltool            \
30         mozroots                \
31         permview                \
32         prj2make                \
33         resgen                  \
34         secutil                 \
35         setreg                  \
36         signcode                \
37         soapsuds                \
38         sqlsharp                \
39         wsdl                    \
40         xsd
41
42 scripts_1_0_umask = \
43         makecert                \
44         sn
45
46 scripts_2_0 = \
47         gmcs                    \
48         ilasm2                  \
49         monop2                  \
50         resgen2                 \
51         wsdl2                   \
52         xbuild
53
54 scripts_service = mono-service mono-service2
55 scripts_nunit = nunit-console nunit-console2
56 scripts_rpmhelpers = mono-find-provides mono-find-requires
57
58 pkgconfigdir = $(libdir)/pkgconfig
59 pkgconfig_DATA= mono-nunit.pc
60
61 CLEANFILES = $(scripts_1_0) $(scripts_1_0_umask) $(scripts_2_0) gmcs mono-service mono-service2
62 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
63
64 EXTRA_DIST =                   \
65         script.in              \
66         script_umask.in        \
67         mono-service.in        \
68         mono-nunit.pc.in       \
69         mono-find-provides.in  \
70         mono-find-requires.in
71
72 if USE_JIT
73 mono_interp = mono
74 else
75 mono_interp = mint
76 endif
77
78 if PLATFORM_WIN32
79 plat_bindir = $(shell cygpath -m $(libdir))
80 mono_instdir = $(shell cygpath -m $(libdir))/mono
81 else
82 plat_bindir = $(bindir)
83 mono_instdir = $(prefix)/lib/mono
84 endif
85
86 REWRITE_COMMON = sed \
87         -e 's,@''bindir@,$(bindir),g'                           \
88         -e 's,@''plat_bindir@,$(plat_bindir),g'                 \
89         -e 's,@''mono_instdir@,$(mono_instdir),g'               \
90         -e 's,@''gtkdir@,$(gtkdir),g'
91
92 REWRITE = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp),g'
93 REWRITE_DEBUG = $(REWRITE_COMMON) -e 's,@''mono_interp@,$(mono_interp) --debug,g'
94
95 REWRITE1 = $(REWRITE) -e 's,@''framework_version@,1.0,g'
96 REWRITE2 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
97 REWRITE1_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,1.0,g'
98 REWRITE2_DEBUG = $(REWRITE_DEBUG) -e 's,@''framework_version@,2.0,g'
99
100 mono-service: mono-service.in Makefile
101         $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
102         mv $@.tmp $@
103
104 mono-service2: mono-service.in Makefile
105         $(REWRITE2) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
106         mv $@.tmp $@
107
108 nunit-console: script.in Makefile
109         $(REWRITE1_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/script.in > $@.tmp
110         mv $@.tmp $@
111
112 nunit-console2: script.in Makefile
113         $(REWRITE2_DEBUG) -e 's,@''exe_name@,nunit-console,g' $(srcdir)/script.in > $@.tmp
114         mv $@.tmp $@
115
116 $(scripts_1_0): script.in Makefile
117         $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/script.in > $@.tmp
118         mv $@.tmp $@
119
120 $(scripts_1_0_umask): script_umask.in Makefile
121         $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/script_umask.in > $@.tmp
122         mv $@.tmp $@
123
124 $(scripts_2_0): script.in Makefile
125         n=`echo $@ | sed 's,2$$,,'`; \
126         $(REWRITE2) -e "s,@""exe_name@,$$n,g" $(srcdir)/script.in > $@.tmp
127         mv $@.tmp $@