2004-12-03 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / scripts / Makefile.am
index 3c3a00acf887005daf7aab127b584608d8ad929a..3b7e3f423141210aac3600aacef04f9ca3ad0d23 100644 (file)
@@ -1,28 +1,69 @@
-EXTRA_DIST = mcs.in mbas.in ilasm.in cilc.in
+EXTRA_DIST = script.in script2.in
 
-bin_SCRIPTS = mcs mbas ilasm cilc
+bin2dir = $(bindir)
 
-CLEANFILES = mcs mbas ilasm cilc
+bin_SCRIPTS = \
+       al                      \
+       cert2spc                \
+       certmgr                 \
+       chktrust                \
+       cilc                    \
+       disco                   \
+       gacutil                 \
+       genxs                   \
+       ilasm                   \
+       makecert                \
+       mbas                    \
+       mcs                     \
+       mkbundle                \
+       mono-find-provides      \
+       mono-find-requires      \
+       monop                   \
+       monoresgen              \
+       resgen                  \
+       secutil                 \
+       setreg                  \
+       signcode                \
+       sn                      \
+       soapsuds                \
+       sqlsharp                \
+       wsdl                    \
+       xsd
 
-if X86
+bin2_SCRIPTS = gmcs wsdl2
+
+CLEANFILES = $(bin_SCRIPTS) $(bin2_SCRIPTS)
+
+if USE_JIT
 MONO_INTERP = mono
 else
 MONO_INTERP = mint
 endif
 
-mcs: mcs.in
-       sed -e 's^\@bindir\@^$(bindir)^g' -e 's^\@mono_interp\@^$(MONO_INTERP)^g' < $(srcdir)/mcs.in > mcs.tmp \
-       && mv mcs.tmp mcs 
+if PLATFORM_WIN32
+plat_bindir = $(shell cygpath -m $(libdir))
+mono_one_instdir = $(shell cygpath -m $(libdir))/mono/1.0
+mono_two_instdir = $(shell cygpath -m $(libdir))/mono/2.0
+else
+plat_bindir = $(bindir)
+mono_one_instdir = $(libdir)/mono/1.0
+mono_two_instdir = $(libdir)/mono/2.0
+endif
 
+REWRITE = sed \
+       -e 's,@''bindir@,$(bindir),g'                           \
+       -e 's,@''plat_bindir@,$(plat_bindir),g'                 \
+       -e 's,@''mono_one_instdir@,$(mono_one_instdir),g'       \
+       -e 's,@''mono_two_instdir@,$(mono_two_instdir),g'       \
+       -e 's,@''gtkdir@,$(gtkdir),g'                           \
+       -e 's,@''exe_file@,$@.exe,g'                            \
+       -e 's,@''mono_interp@,$(MONO_INTERP),g'
 
-mbas: mbas.in
-       sed -e 's^\@bindir\@^$(bindir)^g' -e 's^\@mono_interp\@^$(MONO_INTERP)^g' < $(srcdir)/mbas.in > mbas.tmp \
-       && mv mbas.tmp mbas 
+$(bin_SCRIPTS): script.in Makefile.am
+       $(REWRITE) $(srcdir)/script.in > $@.tmp
+       mv $@.tmp $@
 
-ilasm: ilasm.in
-       sed -e 's^\@bindir\@^$(bindir)^g' -e 's^\@mono_interp\@^$(MONO_INTERP)^g' < $(srcdir)/ilasm.in > ilasm.tmp \
-       && mv ilasm.tmp ilasm
+$(bin2_SCRIPTS): script2.in Makefile.am
+       $(REWRITE) $(srcdir)/script2.in > $@.tmp
+       mv $@.tmp $@
 
-cilc: cilc.in
-       sed -e 's^\@bindir\@^$(bindir)^g' -e 's^\@mono_interp\@^$(MONO_INTERP)^g' < $(srcdir)/cilc.in > cilc.tmp \
-       && mv cilc.tmp cilc