2005-09-22 Chris Toshok <toshok@ximian.com>
[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         xbuild                  \
39         wsdl2
40
41 scripts_rpmhelpers = mono-find-provides mono-find-requires
42
43 pkgconfigdir = $(libdir)/pkgconfig
44 pkgconfig_DATA= mono-nunit.pc
45
46 CLEANFILES = $(scripts_1_0) $(scripts_2_0) gmcs mono-service
47 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
48
49 EXTRA_DIST =                   \
50         script.in              \
51         mono-service.in        \
52         mono-nunit.pc.in       \
53         mono-find-provides.in  \
54         mono-find-requires.in
55
56 if USE_JIT
57 mono_interp = mono
58 else
59 mono_interp = mint
60 endif
61
62 if PLATFORM_WIN32
63 plat_bindir = $(shell cygpath -m $(libdir))
64 mono_instdir = $(shell cygpath -m $(libdir))/mono
65 else
66 plat_bindir = $(bindir)
67 mono_instdir = $(prefix)/lib/mono
68 endif
69
70 REWRITE = sed \
71         -e 's,@''bindir@,$(bindir),g'                           \
72         -e 's,@''plat_bindir@,$(plat_bindir),g'                 \
73         -e 's,@''mono_instdir@,$(mono_instdir),g'               \
74         -e 's,@''gtkdir@,$(gtkdir),g'                           \
75         -e 's,@''mono_interp@,$(mono_interp),g'
76
77 REWRITE1 = $(REWRITE) -e 's,@''framework_version@,1.0,g'
78 REWRITE2 = $(REWRITE) -e 's,@''framework_version@,2.0,g'
79
80 mono-service: mono-service.in Makefile
81         $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
82         mv $@.tmp $@
83
84 $(scripts_1_0): script.in Makefile
85         $(REWRITE1) -e 's,@''exe_name@,$@,g' $(srcdir)/script.in > $@.tmp
86         mv $@.tmp $@
87
88 gmcs: script.in Makefile
89         $(REWRITE2) -e 's,@''exe_name@,$@,g' $(srcdir)/script.in > $@.tmp
90         mv $@.tmp $@
91
92 $(scripts_2_0): script.in Makefile
93         n=`echo $@ | sed 's,2$$,,'`; \
94         $(REWRITE2) -e "s,@""exe_name@,$$n,g" $(srcdir)/script.in > $@.tmp
95         mv $@.tmp $@