1 # hack to prevent 'check' from depending on 'all'
2 AUTOMAKE_OPTIONS = cygnus
6 noinst_SCRIPTS = mono-wrapper monodis-wrapper semdel-wrapper
9 symlinks = etc/mono/1.0/machine.config etc/mono/2.0/machine.config etc/mono/2.0/web.config etc/mono/browscap.ini
11 etc/mono/1.0/machine.config: $(top_srcdir)/data/net_1_1/machine.config
12 etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config
13 etc/mono/2.0/web.config: $(top_srcdir)/data/net_2_0/web.config
14 etc/mono/browscap.ini: $(top_srcdir)/data/browscap.ini
17 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
19 SUPPORT_FILES = $(symlinks) mono-wrapper etc/mono/config
23 build_profiles = default net_2_0 net_2_1
25 build_profiles = default net_2_0
28 build_profiles = default
33 # The write check is to foil 'make distcheck'
34 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
35 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
36 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
39 install: install-exec install-data
42 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
43 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
51 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
53 ## semdel-wrapper will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
55 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' clean-profiles
57 -rm -fr $(etctmp) $(tmpinst) .wapi
61 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/bin/ilasm $(tmpinst)/bin/gmcs
63 # now a misnomer, but it'll go away soon enough.
67 test_select = ONLY_CENTUM_TESTS=yes
71 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' test-profiles
73 mcs-do-run-test-profiles: test-support-files
74 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' run-test-profiles
77 cur_dir_cmd = cygpath -w -a .
78 PLATFORM_PATH_SEPARATOR = ;
81 PLATFORM_PATH_SEPARATOR = :
84 # Use --compile-all as a poor man's PEVerify to detect invalid IL
85 mcs-compileall: mono-wrapper etc/mono/config
86 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
87 for profile in $(build_profiles); do \
88 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; export MONO_PATH; \
89 for i in $(mcs_topdir)/class/lib/$$profile/*.dll $(mcs_topdir)/class/lib/$$profile/*.exe; do \
90 if ./mono-wrapper --compile-all $$i; then \
91 echo $$i verified OK; \
93 echo $$i verification failed; ok=false; \
97 check-local: mcs-compileall mcs-do-test-profiles
98 $(MAKE) $(test_select) mcs-do-run-test-profiles
100 CLEANFILES = etc/mono/config
102 # depend on $(symlinks) to ensure 'etc/mono' directory exists
103 etc/mono/config: ../data/config Makefile $(symlinks)
104 d=`cd ../support && pwd`; \
105 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
106 if test -z "$(libgdiplus_loc)"; then :; else \
107 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
111 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
112 $(mkinstalldirs) $(tmpinst)/bin
115 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
116 echo '#! /bin/sh' > $@ ; \
117 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
118 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/default/mcs.exe"'" "$$@"' >> $@ ; \
121 $(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
122 echo '#! /bin/sh' > $@ ; \
123 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
124 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/gmcs/gmcs.exe"'" "$$@"' >> $@ ; \
127 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
128 echo '#! /bin/sh' > $@ ; \
129 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
130 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
133 test-support-files: $(TEST_SUPPORT_FILES)
136 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
137 MYDISTFILES = $(DIST_COMMON)
138 distdir: $(MYDISTFILES)
141 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
142 cp -p $$file $(distdir) ; done
143 find $(distdir) -type f -exec chmod a+r {} ';'