2004-10-07 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / runtime / Makefile.am
index 2538bb4598370908861ca62b6daffd2ab8c1cf48..09c89564fb0cce41592ab7b49392287e84b5c6fa 100644 (file)
@@ -8,34 +8,64 @@ mcs_topdir=$(top_srcdir)/../mcs
 
 monobins_DATA = \
        monoresgen.exe                          \
+       monoresgen.exe.mdb                      \
        secutil.exe                             \
+       secutil.exe.mdb                 \
        ilasm.exe                               \
+       ilasm.exe.mdb                           \
        cilc.exe                                \
+       cilc.exe.mdb                            \
        xsd.exe                                 \
+       xsd.exe.mdb                             \
        wsdl.exe                                \
+       wsdl.exe.mdb                            \
+       wsdl2.exe                               \
+       wsdl2.exe.mdb                           \
        genxs.exe                               \
+       genxs.exe.mdb                           \
        al.exe                                  \
+       al.exe.mdb                              \
        disco.exe                               \
+       disco.exe.mdb                           \
        sqlsharp.exe                            \
+       sqlsharp.exe.mdb                        \
        signcode.exe                            \
+       signcode.exe.mdb                        \
        chktrust.exe                            \
+       chktrust.exe.mdb                        \
        soapsuds.exe                            \
+       soapsuds.exe.mdb                        \
        monop.exe                               \
+       monop.exe.mdb                           \
+       mono-find-provides.exe                  \
+       mono-find-provides.exe.mdb              \
+       mono-find-requires.exe          \
+       mono-find-requires.exe.mdb              \
        setreg.exe                              \
+       setreg.exe.mdb                  \
        cert2spc.exe                            \
+       cert2spc.exe.mdb                        \
        certmgr.exe                             \
+       certmgr.exe.mdb                 \
        MakeCert.exe                            \
+       MakeCert.exe.mdb                        \
        gacutil.exe                             \
-       sn.exe
+       gacutil.exe.mdb                 \
+       sn.exe                                  \
+       sn.exe.mdb
 
-fx11_DATA = \
-       mcs.exe                                 \
+monoone_DATA = \
+       mcs.exe                         \
+       mcs.exe.mdb                             \
+       mcs.exe.config                  \
        mbas.exe
 
-fx20_DATA = \
-       gmcs.exe
+if ! PLATFORM_WIN32
+gmcs_exe = gmcs.exe gmcs.exe.config gmcs.exe.mdb
+endif
+monotwo_DATA = $(gmcs_exe)
 
-EXTRA_DIST= $(monobins_DATA) $(fx11_DATA) $(fx20_DATA)
+EXTRA_DIST= $(monobins_DATA) $(monoone_DATA) $(monotwo_DATA)
 
 MAINTAINERCLEANFILES = $(EXTRA_DIST)
 
@@ -44,59 +74,38 @@ MAINTAINERCLEANFILES = $(EXTRA_DIST)
 #
 if PLATFORM_WIN32
 monobinsdir = $(libdir)
-fx11dir = $(libdir)
-fx20dir = $(libdir)
+monoonedir = $(libdir)
+monotwodir = $(libdir)
 else
 monobinsdir = $(bindir)
-fx11dir = $(libdir)/mono/1.1/
-fx20dir = $(libdir)/mono/2.0/
+monoonedir = $(libdir)/mono/1.0/
+monotwodir = $(libdir)/mono/2.0/
 endif
 
-$(fx11_DATA):
-       if test -f $(mcs_topdir)/mcs/mcs.exe; then f=$(mcs_topdir)/mcs/mcs.exe; else f=$(fx11dir)/mcs.exe; fi; \
-       echo "cp -f $$f $(srcdir)"; \
-       cp -f $$f $(srcdir)
-       if test -f $(mcs_topdir)/mcs/mbas.exe; then f=$(mcs_topdir)/mcs/mbas.exe; else f=$(fx11dir)/mbas.exe; fi; \
-       echo "cp -f $$f $(srcdir)"; \
-       cp -f $$f $(srcdir)
-
-$(fx20_DATA):
-       if test -f $(mcs_topdir)/gmcs/gmcs.exe; then f=$(mcs_topdir)/gmcs/gmcs.exe; else f=$(fx20dir)/gmcs.exe; fi; \
-       echo "cp -f $$f $(srcdir)"; \
-       cp -f $$f $(srcdir)
-
-$(monobins_DATA):
-       @case "$@" in \
-       monoresgen.exe)          d=monoresgen                   ;; \
-       ilasm.exe)               d=ilasm                        ;; \
-       cilc.exe)                d=tools/cilc                   ;; \
-       xsd.exe)                 d=tools/mono-xsd               ;; \
-       wsdl.exe)                d=tools/wsdl                   ;; \
-       genxs.exe)               d=tools/genxs                  ;; \
-       al.exe)                  d=tools/al                     ;; \
-       disco.exe)               d=tools/disco                  ;; \
-       soapsuds.exe)            d=tools/soapsuds               ;; \
-       sqlsharp.exe)            d=tools/SqlSharp               ;; \
-       chktrust.exe)            d=tools/security               ;; \
-       signcode.exe)            d=tools/security               ;; \
-       MakeCert.exe)            d=tools/security               ;; \
-       cert2spc.exe)            d=tools/security               ;; \
-       certmgr.exe)             d=tools/security               ;; \
-       secutil.exe)             d=tools/security               ;; \
-       setreg.exe)              d=tools/security               ;; \
-       sn.exe)                  d=tools/security               ;; \
-       monop.exe)               d=tools/monop                  ;; \
-       browsercaps-updater.exe) d=tools/browsercaps-updater    ;; \
-       gacutil.exe)             d=tools/gacutil                ;; \
-       gmcs.exe)                d=gmcs                         ;; \
+$(monoone_DATA) $(monotwo_DATA) $(monobins_DATA):
+       @name=`echo "$@" | sed 's,\.exe.*$$,,'`; \
+       case $$name in \
+       mcs | mbas | monoresgen | gmcs | ilasm)         d=$$name                                         ;; \
+       cilc | genxs | al | disco | soapsuds | monop | browsercaps-updater | gacutil)   d=tools/$$name   ;; \
+       chktrust | signcode | MakeCert | cert2spc | certmgr | secutil | setreg | sn)    d=tools/security ;; \
+       mono-find-provides | mono-find-requires)        d=tools/mono-rpm-helpers/$$name                  ;; \
+       xsd)                                            d=tools/mono-xsd                                 ;; \
+       wsdl*)                                          d=tools/wsdl                                     ;; \
+       sqlsharp)                                       d=tools/SqlSharp                                 ;; \
        esac; \
-       f=$(mcs_topdir)/$$d/$@; \
-       if test -f $$f; then :; else f=$(monobinsdir)/$@; fi ; \
-       echo "cp -f $$f $(srcdir)"; \
-       cp -f $$f $(srcdir)
+       echo "test -f $(top_srcdir)/../mcs/$$d/$@" ; \
+       test -f $(top_srcdir)/../mcs/$$d/$@ || exit 1 ; \
+       echo "rm -f $(srcdir)/$@" ; \
+       rm -f $(srcdir)/$@ ; \
+       echo "cd $(srcdir) && $(LN_S) ../../mcs/$$d/$@ $@" ; \
+       cd $(srcdir) && $(LN_S) ../../mcs/$$d/$@ $@
 
 copy_dlls:
        cp /nt/mono/mcs/class/*/*.dll .
 
 push_dlls:
        scp -o "Protocol 1" *.dll *.exe snapshot@mono-cvs.ximian.com:dlls
+
+cleanassemblies:
+       find -name \*.dll -exec rm -vf {} \;
+       find -name \*.exe -exec rm -vf {} \;