2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / scripts / Makefile.am
1 EXTRA_DIST = script.in script2.in
2
3 bin2dir = $(bindir)
4
5 bin_SCRIPTS = \
6         al                      \
7         cert2spc                \
8         certmgr                 \
9         chktrust                \
10         cilc                    \
11         disco                   \
12         dtd2xsd                 \
13         gacutil                 \
14         genxs                   \
15         ilasm                   \
16         makecert                \
17         mbas                    \
18         mcs                     \
19         mkbundle                \
20         mono-find-provides      \
21         mono-find-requires      \
22         monop                   \
23         monoresgen              \
24         resgen                  \
25         secutil                 \
26         setreg                  \
27         signcode                \
28         sn                      \
29         soapsuds                \
30         sqlsharp                \
31         wsdl                    \
32         xsd
33
34 bin2_SCRIPTS = gmcs wsdl2
35
36 CLEANFILES = $(bin_SCRIPTS) $(bin2_SCRIPTS)
37
38 if USE_JIT
39 MONO_INTERP = mono
40 else
41 MONO_INTERP = mint
42 endif
43
44 if PLATFORM_WIN32
45 plat_bindir = $(shell cygpath -m $(libdir))
46 mono_one_instdir = $(shell cygpath -m $(libdir))/mono/1.0
47 mono_two_instdir = $(shell cygpath -m $(libdir))/mono/2.0
48 else
49 plat_bindir = $(bindir)
50 mono_one_instdir = $(libdir)/mono/1.0
51 mono_two_instdir = $(libdir)/mono/2.0
52 endif
53
54 REWRITE = sed \
55         -e 's,@''bindir@,$(bindir),g'                           \
56         -e 's,@''plat_bindir@,$(plat_bindir),g'                 \
57         -e 's,@''mono_one_instdir@,$(mono_one_instdir),g'       \
58         -e 's,@''mono_two_instdir@,$(mono_two_instdir),g'       \
59         -e 's,@''gtkdir@,$(gtkdir),g'                           \
60         -e 's,@''exe_file@,$@.exe,g'                            \
61         -e 's,@''mono_interp@,$(MONO_INTERP),g'
62
63 $(bin_SCRIPTS): script.in Makefile.am
64         $(REWRITE) $(srcdir)/script.in > $@.tmp
65         mv $@.tmp $@
66
67 $(bin2_SCRIPTS): script2.in Makefile.am
68         $(REWRITE) $(srcdir)/script2.in > $@.tmp
69         mv $@.tmp $@
70