2005-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / runtime / Makefile.am
index c4ce77a5d6424ce413347436bedc130bc77ee91d..ca2624f99d7b11be888ef0fcf64d626725e770fe 100644 (file)
@@ -17,26 +17,26 @@ etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config
 $(symlinks):
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
+SUPPORT_FILES = $(symlinks) mono-wrapper wrapper-config
+
 # The write check is to foil 'make distcheck'
-all-local: $(symlinks) mono-wrapper wrapper-config
+all-local: $(SUPPORT_FILES)
        if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
        d=`pwd`; cd $(mcs_topdir) && $(MAKE) RUNTIME=$$d/mono-wrapper PROFILES='$(build_profiles)' all-profiles
 
 if INSTALL_2_0
 build_profiles = default net_2_0
-clean_profiles = basic net_1_1_bootstrap default net_2_0_bootstrap net_2_0
 else
 build_profiles = default
-clean_profiles = basic net_1_1_bootstrap default
 endif
 
 # override automake
 install: install-exec install-data
 
 # override automake
-install-exec:
+install-exec: $(SUPPORT_FILES)
        d=`pwd`; \
-       cd $(mcs_topdir) && $(MAKE) prefix='$(exec_prefix)' PROFILES='$(build_profiles)' \
+       cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' \
                                    RUNTIME=$$d/mono-wrapper RUNTIME_HAS_CONSISTENT_GACDIR=yes install-profiles
 
 # override automake
@@ -46,11 +46,11 @@ install-data:
 # override automake
 uninstall:
        d=`pwd`; \
-       cd $(mcs_topdir) && $(MAKE) prefix='$(exec_prefix)' PROFILES='$(build_profiles)' \
+       cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' \
                                    RUNTIME=$$d/mono-wrapper RUNTIME_HAS_CONSISTENT_GACDIR=yes uninstall-profiles
 
 clean-local:
-       d=`pwd`; cd $(mcs_topdir) && $(MAKE) PROFILES='$(clean_profiles)' clean-profiles
+       d=`pwd`; cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' clean-profiles
        -rm -fr $(symlinks) $(tmpinst) .wapi
 
 if INSTALL_2_0
@@ -98,9 +98,16 @@ mcs-compileall: mono-wrapper wrapper-config
 check-local: mcs-compileall mcs-do-test-profiles
        $(MAKE) $(test_select) mcs-do-run-test-profiles
 
-wrapper-config: ../data/config
+CLEANFILES = wrapper-config
+
+wrapper-config: ../data/config Makefile
        d=`cd ../support && pwd`; \
        sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@
+       if test -z "$(libgdiplus_loc)"; then :; else \
+         mv $@ $@t; \
+         sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@; \
+         rm -f $@t; \
+       fi
 
 $(tmpinst)/bin/mono: mono-wrapper wrapper-config
        cp mono-wrapper $@