3 monodir=$(top_builddir)
4 mono=$(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),mono)
7 PLATFORM_PATH_SEPARATOR=;
9 PLATFORM_PATH_SEPARATOR=:
12 # This is needed for automake dependency generation
13 libgc_libs=$(monodir)/libgc/libmonogc.la
14 libgc_static_libs=$(monodir)/libgc/libmonogc-static.la
17 $(monodir)/mono/metadata/libmonoruntime.la \
18 $(monodir)/mono/io-layer/libwapi.la \
19 $(monodir)/mono/utils/libmonoutils.la \
20 $(GLIB_LIBS) $(LIBICONV) \
24 $(monodir)/mono/metadata/libmonoruntimesgen.la \
25 $(monodir)/mono/sgen/libmonosgen.la \
26 $(monodir)/mono/io-layer/libwapi.la \
27 $(monodir)/mono/utils/libmonoutils.la \
28 $(GLIB_LIBS) $(LIBICONV)
31 $(monodir)/mono/metadata/libmonoruntime-static.la \
32 $(monodir)/mono/io-layer/libwapi.la \
33 $(monodir)/mono/utils/libmonoutils.la \
34 $(GLIB_LIBS) $(LIBICONV) \
38 $(monodir)/mono/metadata/libmonoruntimesgen-static.la \
39 $(monodir)/mono/sgen/libmonosgen-static.la \
40 $(monodir)/mono/io-layer/libwapi.la \
41 $(monodir)/mono/utils/libmonoutils.la \
42 $(GLIB_LIBS) $(LIBICONV)
44 CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
46 RUNTIME_EXECUTABLE = $(if $(BOEHM),$(top_builddir)/mono/mini/mono-boehm,$(top_builddir)/runtime/mono-wrapper)
48 MINI_RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME_EXECUTABLE)
49 RUNTIME_AOTCHECK = MONO_PATH="$(CLASS)$(PLATFORM_PATH_SEPARATOR)." $(RUNTIME_EXECUTABLE)
51 MCS = $(MINI_RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162
52 ILASM = $(MINI_RUNTIME) $(CLASS)/ilasm.exe
58 $(PLATFORM_CFLAGS) $(ARCH_CFLAGS) $(SHARED_CFLAGS)
60 AM_CXXFLAGS = $(LLVM_CXXFLAGS) $(GLIB_CFLAGS)
64 # The mingw math.h has "extern inline" functions that dont appear in libs, so
65 # optimisation is required to actually inline them
69 # hack for automake to have the same source file in a library and a bin
70 genmdesc_CFLAGS = $(AM_CFLAGS)
72 monoldflags=$(export_ldflags)
73 monobinldflags=$(export_ldflags) $(extra_runtime_ldflags)
76 libmonoldflags=-no-undefined -avoid-version -Wl,--kill-at $(monoldflags)
79 libmonoldflags= -avoid-version $(monoldflags)
81 libmonoldflags=$(monoldflags) -version-info 1:0:0
86 sgen_binaries = mono-sgen
87 sgen_libraries = libmonosgen-2.0.la
88 sgen_static_libraries = libmini-static.la $(sgen_static_libs)
92 boehm_libraries = libmonoboehm-2.0.la
93 boehm_static_libraries = libmini-static.la $(boehm_static_libs)
94 boehm_binaries = mono-boehm
98 mono_bin_suffix = sgen
101 mono_bin_suffix = boehm
102 libmono_suffix = boehm
105 if DISABLE_EXECUTABLES
107 mono: mono-$(mono_bin_suffix)
110 mono.exe: mono-$(mono_bin_suffix).exe
114 (cd $(DESTDIR)$(bindir) && ln -sf mono-$(mono_bin_suffix) mono)
115 (cd $(DESTDIR)$(libdir); shopt -s nullglob 2>/dev/null; for i in libmono$(libmono_suffix)*; do ln -sf $$i `echo $$i | sed s/$(libmono_suffix)//` ; done)
118 if DISABLE_EXECUTABLES
121 bin_PROGRAMS = $(boehm_binaries) $(sgen_binaries) monow
123 bin_PROGRAMS = $(boehm_binaries) $(sgen_binaries)
127 if DISABLE_EXECUTABLES
128 noinst_PROGRAMS = genmdesc
130 noinst_PROGRAMS = genmdesc mono
133 if DISABLE_EXECUTABLES
134 shared_libraries = $(boehm_libraries) $(sgen_libraries)
137 shared_libraries = $(boehm_libraries) $(sgen_libraries)
141 lib_LTLIBRARIES = $(shared_libraries)
144 mini_common_lib = libmini.la
149 if DISABLE_EXECUTABLES
150 noinst_LTLIBRARIES = $(mini_common_lib)
152 noinst_LTLIBRARIES = $(mini_common_lib) libmini-static.la
156 lib_LTLIBRARIES += libmono-llvm.la
157 libmono_llvm_la_SOURCES = mini-llvm.c mini-llvm-cpp.cpp llvm-jit.cpp
158 libmono_llvm_la_LIBADD = $(GLIB_LIBS) $(LLVM_LIBS) $(LLVM_LDFLAGS)
160 libmono_llvm_la_LDFLAGS=-Wl,-undefined -Wl,suppress -Wl,-flat_namespace
162 libmono_llvm_la_LIBADD += $(top_builddir)/mono/mini/libmonoboehm-$(API_VER).la $(boehm_libs)
166 mono_boehm_SOURCES = \
169 mono_CFLAGS = $(AM_CFLAGS)
171 mono_boehm_CFLAGS = $(AM_CFLAGS)
173 AM_CPPFLAGS = $(LIBGC_CPPFLAGS)
175 mono_sgen_SOURCES = \
181 mono_sgen_CFLAGS = $(AM_CFLAGS)
183 # We build this after libmono was built so it contains the date when the final
186 if DISABLE_EXECUTABLES
187 buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime.la
189 buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime-static.la
191 @echo "const char *build_date = \"`date`\";" > buildver-boehm.h
192 mono_boehm-main.$(OBJEXT): buildver-boehm.h
195 if DISABLE_EXECUTABLES
196 buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen.la $(monodir)/mono/sgen/libmonosgen.la
198 buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen-static.la $(monodir)/mono/sgen/libmonosgen-static.la
200 @echo "const char *build_date = \"`date`\";" > buildver-sgen.h
201 mono_sgen-main-sgen.$(OBJEXT): buildver-sgen.h
202 main-sgen.$(OBJEXT): buildver-sgen.h
205 LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.$(OBJEXT)
207 MONO_DTRACE_OBJECT = mono-dtrace.$(OBJEXT)
213 LIBMONO_DTRACE_OBJECT =
217 # Link libmono into mono statically
218 # This leads to higher performance, especially with TLS
219 MONO_LIB=$(boehm_static_libraries)
220 MONO_SGEN_LIB=$(sgen_static_libraries)
222 MONO_LIB=libmonoboehm-2.0.la
223 MONO_SGEN_LIB=libmonosgen-2.0.la
229 LLVMMONOF=$(LLVM_LIBS) $(LLVM_LDFLAGS)
238 $(MONO_DTRACE_OBJECT)
240 mono_boehm_LDFLAGS = \
241 $(static_flags) -export-dynamic $(monobinldflags) $(monobin_platform_ldflags)
249 $(MONO_DTRACE_OBJECT)
251 mono_sgen_LDFLAGS = $(static_flags) -export-dynamic $(monobinldflags) $(monobin_platform_ldflags)
254 libmonoldflags += -no-undefined
259 # mono_LDADD = $(mono_sgen_LDADD)
260 # mono_LDFLAGS = $(mono_sgen_LDFLAGS)
267 mono-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d mini.lo $(monodir)/mono/metadata/libmonoruntime-static.la
268 DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
269 $@ $(top_srcdir)/data/mono.d $(monodir)/mono/metadata/libmonoruntime-static.la mini.lo
271 .libs/mono-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d mini.lo $(monodir)/mono/metadata/libmonoruntime.la
272 DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
273 --pic $@ $(top_srcdir)/data/mono.d $(monodir)/mono/metadata/libmonoruntime.la mini.lo
277 # Create monow.exe, linked for the 'windows' subsystem
280 monow_LDADD = $(mono_boehm_LDADD)
281 monow_LDFLAGS = $(mono_boehm_LDFLAGS) -mwindows
282 monow_SOURCES = $(mono_boehm_SOURCES)
284 monow_LDADD = $(mono_sgen_LDADD)
285 monow_LDFLAGS = $(mono_sgen_LDFLAGS) -mwindows
286 monow_SOURCES = $(mono_sgen_SOURCES)
295 ../metadata/opcodes.c
297 # Don't link this against libmonoruntime to speed up rebuilds
299 $(monodir)/mono/utils/libmonoutils.la -lm \
308 mini-x86-gsharedvt.c \
309 tramp-x86-gsharedvt.c
316 mini-amd64-gsharedvt.c \
317 mini-amd64-gsharedvt.h \
318 tramp-amd64-gsharedvt.c
333 mini-arm-gsharedvt.c \
334 tramp-arm-gsharedvt.c
390 llvm_runtime_sources = \
393 if ENABLE_LLVM_RUNTIME
394 llvm_runtime_sources = \
425 local-propagation.c \
435 mini-exceptions-native-unwinder.c \
438 mini-generic-sharing.c \
439 mini-generic-sharing-gsharedvt.c \
444 mini-native-types.c \
460 mini-cross-helpers.c \
474 devirtualization.cs \
478 generics-variant-types.il\
484 regtests=basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe iltests.exe devirtualization.exe generics.exe basic-simd.exe
486 test_sources += nacl.cs
491 arch_sources = $(x86_sources)
497 arch_sources = $(amd64_sources)
498 arch_built=cpu-amd64.h
499 arch_define=__x86_64__
500 ARCH_FULLAOT_EXCLUDE=--exclude DYNCALL
504 arch_sources = $(ppc_sources)
510 arch_sources = $(ppc_sources)
511 arch_built=cpu-ppc64.h
512 arch_define=__ppc64__
516 arch_sources = $(mips_sources)
517 arch_built=cpu-mips.h
522 # pick up arm_dpimacros.h
523 ARCH_CFLAGS = -I../arch/arm
524 arch_sources = $(arm_sources)
530 arch_sources = $(arm64_sources)
531 arch_built=cpu-arm64.h
532 arch_define=__aarch64__
536 arch_sources = $(sparc_sources)
537 arch_built=cpu-sparc.h
538 arch_define=__sparc__
542 arch_sources = $(sparc_sources)
543 arch_built=cpu-sparc.h
544 arch_define=__sparc__
548 arch_sources = $(s390x_sources)
549 arch_built=cpu-s390x.h
554 arch_sources = $(ia64_sources)
555 arch_built = cpu-ia64.h
560 os_sources = $(windows_sources)
561 monobin_platform_ldflags=
565 os_sources = $(posix_sources)
566 monobin_platform_ldflags=
570 os_sources = $(darwin_sources) $(posix_sources)
571 #monobin_platform_ldflags=-sectcreate __TEXT __info_plist $(top_srcdir)/mono/mini/Info.plist -framework CoreFoundation -framework Foundation
572 monobin_platform_ldflags=-framework CoreFoundation -framework Foundation
575 libmini_la_SOURCES = $(common_sources) $(llvm_sources) $(llvm_runtime_sources) $(arch_sources) $(os_sources)
576 libmini_la_CFLAGS = $(mono_CFLAGS)
578 libmonoboehm_2_0_la_SOURCES =
579 libmonoboehm_2_0_la_CFLAGS = $(mono_boehm_CFLAGS)
580 libmonoboehm_2_0_la_LIBADD = libmini.la $(boehm_libs) $(LIBMONO_DTRACE_OBJECT) $(LLVMMONOF)
581 libmonoboehm_2_0_la_LDFLAGS = $(libmonoldflags)
583 libmonosgen_2_0_la_SOURCES =
584 libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS)
585 libmonosgen_2_0_la_LIBADD = libmini.la $(sgen_libs) $(LIBMONO_DTRACE_OBJECT) $(LLVMMONOF)
586 libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags)
589 # This library is shared between mono and mono-sgen, since the code in mini/ doesn't contain
590 # compile time dependencies on boehm/sgen.
592 libmini_static_la_SOURCES = $(libmini_la_SOURCES)
593 libmini_static_la_CFLAGS = $(AM_CFLAGS)
594 libmini_static_la_LDFLAGS = -static
595 libmini_static_la_LIBADD = $(MONO_DTRACE_OBJECT)
597 libmonoincludedir = $(includedir)/mono-$(API_VER)/mono/jit
599 libmonoinclude_HEADERS = jit.h
601 CSFLAGS = -unsafe -nowarn:0219,0169,0414,0649
603 basic-simd.exe: basic-simd.cs TestDriver.dll
604 $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:Mono.Simd.dll
606 nacl.exe: nacl.cs TestDriver.dll
607 $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:Mono.Simd.dll
609 generics.exe: generics.cs TestDriver.dll generics-variant-types.dll
610 $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:generics-variant-types.dll
612 %.exe: %.cs TestDriver.dll
613 $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll
616 $(ILASM) -output=$@ $<
618 TestDriver.dll: $(srcdir)/TestDriver.cs
619 $(MCS) -out:$@ -target:library $<
621 generics-variant-types.dll: generics-variant-types.il
622 $(ILASM) -dll -output=$@ $<
630 # we don't always use the perl impl because it's an additional
631 # build dependency for the poor windows users
632 # $(arch_define) is the preprocessor symbol that enables all the opcodes
633 # for the specific platform in mini-ops.h
635 GENMDESC_PRG=perl $(srcdir)/genmdesc.pl $(arch_define) $(srcdir) $(GENMDESC_OPTS)
636 else !CROSS_COMPILING
638 GENMDESC_PRG=perl $(srcdir)/genmdesc.pl $(arch_define) $(srcdir) $(GENMDESC_OPTS)
640 GENMDESC_PRG=./genmdesc $(GENMDESC_OPTS)
642 endif !CROSS_COMPILING
644 cpu-x86.h: cpu-x86.md genmdesc$(EXEEXT)
645 $(GENMDESC_PRG) cpu-x86.h x86_desc $(srcdir)/cpu-x86.md
647 cpu-amd64.h: cpu-amd64.md genmdesc$(EXEEXT)
648 $(GENMDESC_PRG) cpu-amd64.h amd64_desc $(srcdir)/cpu-amd64.md
650 cpu-ppc.h: cpu-ppc.md genmdesc$(EXEEXT)
651 $(GENMDESC_PRG) cpu-ppc.h ppcg4 $(srcdir)/cpu-ppc.md
653 cpu-ppc64.h: cpu-ppc64.md genmdesc$(EXEEXT)
654 $(GENMDESC_PRG) cpu-ppc64.h ppc64_cpu_desc $(srcdir)/cpu-ppc64.md
656 cpu-arm.h: cpu-arm.md genmdesc$(EXEEXT)
657 $(GENMDESC_PRG) cpu-arm.h arm_cpu_desc $(srcdir)/cpu-arm.md
659 cpu-arm64.h: cpu-arm64.md genmdesc$(EXEEXT)
660 $(GENMDESC_PRG) cpu-arm64.h arm64_cpu_desc $(srcdir)/cpu-arm64.md
662 cpu-sparc.h: cpu-sparc.md genmdesc$(EXEEXT)
663 $(GENMDESC_PRG) cpu-sparc.h sparc_desc $(srcdir)/cpu-sparc.md
665 cpu-s390x.h: cpu-s390x.md genmdesc$(EXEEXT)
666 $(GENMDESC_PRG) cpu-s390x.h s390x_cpu_desc $(srcdir)/cpu-s390x.md
668 cpu-ia64.h: cpu-ia64.md genmdesc$(EXEEXT)
669 $(GENMDESC_PRG) cpu-ia64.h ia64_desc $(srcdir)/cpu-ia64.md
671 cpu-mips.h: cpu-mips.md genmdesc$(EXEEXT)
672 $(GENMDESC_PRG) cpu-mips.h mips_desc $(srcdir)/cpu-mips.md
675 $(MINI_RUNTIME) -v -v --ncompile 1 --compile Test:$(mtest) test.exe
677 # ensure the tests are actually correct
678 checktests: $(regtests)
679 for i in $(regtests); do $(MINI_RUNTIME) $$i; done
681 rcheck: mono $(regtests)
683 for i in $(regtests); do echo "running test $$i"; $(MINI_RUNTIME) $$i --exclude 'NaClDisable' || exit 1; done
685 -($(MINI_RUNTIME) --regression $(regtests); echo $$? > regressionexitcode.out) | $(srcdir)/emitnunit.pl
686 exit $$(cat regressionexitcode.out)
689 rcheck2: mono $(regtests)
690 $(MINI_RUNTIME) --regression $(regtests)
695 check-seq-points: mono $(regtests)
696 rm -f TestResult-op_il_seq_point.xml
697 for i in $(regtests); do $(srcdir)/test_op_il_seq_point.sh $$i || ($(srcdir)/test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
698 for i in $(regtests); do $(srcdir)/test_op_il_seq_point.sh $$i --aot || ($(srcdir)/test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
699 $(srcdir)/test_op_il_seq_point_headerfooter.sh
702 gctest: mono gc-test.exe
703 MONO_DEBUG_OPTIONS=clear-nursery-at-gc $(MINI_RUNTIME) --regression gc-test.exe
705 LLVM_AOT_RUNTIME_OPTS=$(if $(LLVM),--llvm,)
706 GSHAREDVT_RUNTIME_OPTS=$(if $(GSHAREDVT),-O=gsharedvt,)
708 aotcheck: mono $(regtests)
709 rm -rf *.exe.so *.exe.dylib *.exe.dylib.dSYM
710 $(MINI_RUNTIME) $(LLVM_AOT_RUNTIME_OPTS) --aot $(regtests) || exit 1
711 for i in $(regtests); do $(RUNTIME_AOTCHECK) --regression $$i || exit 1; done
712 rm -rf *.exe.so *.exe.dylib *.exe.dylib.dSYM
715 $(MAKE) aotcheck LLVM=1
718 $(MAKE) fullaotcheck GSHAREDVT=1
720 fullaot_regtests = $(regtests) aot-tests.exe $(if $(GSHAREDVT),gshared.exe)
727 System.Configuration.dll \
728 System.Security.dll \
733 # This currently only works on amd64/arm
734 fullaotcheck: $(mono) $(fullaot_regtests)
737 $(MAKE) fullaot-libs AOT_FLAGS=full GSHAREDVT=$(GSHAREDVT)
738 cp $(regtests) $(fullaot_regtests) generics-variant-types.dll TestDriver.dll fullaot-tmp/
739 MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper $(LLVM_AOT_RUNTIME_OPTS) $(GSHAREDVT_RUNTIME_OPTS) --aot=full fullaot-tmp/{generics-variant-types.dll,TestDriver.dll,*.exe} || exit 1
740 ln -s $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),$$PWD/mono) fullaot-tmp/
741 for i in $(fullaot_regtests); do echo $$i; MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper --full-aot fullaot-tmp/$$i --exclude '!FULLAOT' $(ARCH_FULLAOT_EXCLUDE) || exit 1; done
743 # This can run in parallel
744 fullaot-libs: $(patsubst %,fullaot-tmp/%.dylib,$(FULLAOT_LIBS))
746 fullaot-tmp/%.dylib: $(CLASS)/%
747 cp $(CLASS)/$* fullaot-tmp/
748 mkdir fullaot-tmp/$*-tmp
749 MONO_PATH="fullaot-tmp/$(PLATFORM_PATH_SEPARATOR)$(CLASS)" $(top_builddir)/runtime/mono-wrapper $(if $(GSHAREDVT),-O=gsharedvt) --aot=$(AOT_FLAGS),temp-path=fullaot-tmp/$*-tmp fullaot-tmp/$*
750 rm -rf fullaot-tmp/$*-tmp
753 $(MAKE) fullaotcheck LLVM=1
755 llvmonly_regtests = $(fullaot_regtests) gshared.exe
757 llvmonlycheck: mono $(llvmonly_regtests)
760 $(MAKE) fullaot-libs AOT_FLAGS=llvmonly
761 cp $(llvmonly_regtests) generics-variant-types.dll TestDriver.dll fullaot-tmp/
762 MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper --aot=llvmonly fullaot-tmp/{generics-variant-types.dll,TestDriver.dll,*.exe} || exit 1
763 ln -s $$PWD/mono fullaot-tmp/
764 for i in $(llvmonly_regtests); do echo $$i; MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper --llvmonly fullaot-tmp/$$i --exclude '!BITCODE' || exit 1; done
767 MONO_GC_PARAMS=stack-mark=precise MONO_GC_DEBUG=clear-at-gc ./mono-sgen gc-test.exe
770 time env $(MINI_RUNTIME) --ncompile $(count) --compile Test:$(mtest) test.exe
773 time $(monodir)/mono/jit/mono --ncompile $(count) --compile Test:$(mtest) test.exe
775 stat1: mono bench.exe
776 $(MINI_RUNTIME) --verbose --statfile stats.pl --regression bench.exe
777 perl viewstat.pl stats.pl
779 stat2: mono basic.exe
780 $(MINI_RUNTIME) --verbose --statfile stats.pl --regression basic.exe
781 perl viewstat.pl -e stats.pl
783 stat3: mono bench.exe
784 $(MINI_RUNTIME) --statfile stats.pl --ncompile 1000 --compile Tests:test_0_many_nested_loops bench.exe
785 perl viewstat.pl stats.pl
790 check-local: rcheck check-seq-points
793 rm -f mono a.out gmon.out *.o buildver-boehm.h buildver-sgen.h test.exe regressionexitcode.out TestResult-op_il_seq_point.xml*
795 pkgconfigdir = $(libdir)/pkgconfig
797 BUILT_SOURCES = version.h $(arch_built)
799 CLEANFILES= $(BUILT_SOURCES) *.exe *.dll
800 EXTRA_DIST = TestDriver.cs \
804 $(x86_sources) cpu-x86.md \
805 $(amd64_sources) cpu-amd64.md \
806 $(ppc_sources) cpu-ppc.md cpu-ppc64.md \
807 $(arm_sources) cpu-arm.md \
808 $(arm64_sources) cpu-arm64.md \
809 $(mips_sources) cpu-mips.md \
810 $(sparc_sources) cpu-sparc.md \
811 $(s390x_sources) cpu-s390x.md \
812 $(ia64_sources) cpu-ia64.md \
814 $(darwin_sources) Info.plist \
816 test_op_il_seq_point.sh \
817 test_op_il_seq_point_headerfooter.sh \
821 if test -d $(top_srcdir)/.git; then \
823 LANG=C; export LANG; \
824 branch=`git branch | grep '^\*' | sed 's/(detached from .*/explicit/' | cut -d ' ' -f 2`; \
825 version=`git log --no-color --first-parent -n1 --pretty=format:%h`; \
826 echo "#define FULL_VERSION \"$$branch/$$version\""; \
829 echo "#define FULL_VERSION \"tarball\""; \
832 # Utility target for patching libtool to speed up linking
834 sed -e 's,if (for obj in $$oldobjs,if (for obj in "",g' < ../../libtool > 2; mv 2 ../../libtool
835 chmod a+x ../../libtool
837 # Utility target for patching libtool to get rid of the 'ranlib: file <file> has no symbols" warnings
839 sed -e 's/old_archive_cmds=.*/old_archive_cmds="libtool -no_warning_for_no_symbols -static -o \\$$oldlib \\$$oldobjs"/g' < ../../libtool > 2; mv 2 ../../libtool
840 chmod a+x ../../libtool
842 # Utility target to patch automake to generate the same format silent output as the old mono silent build did
844 src="@echo \" '. \$$name . ' ' x (8 - length (\$$name)) . '\""; dst="@echo \"'. \$$name . ' ' x (7 - length (\$$name)) .'\""; sed -e "s/$$src/$$dst/g" < $$EXE > 2 && cp 2 $$EXE && rm -f 2
847 etags -o TAGS `find .. -name "*.h" -o -name "*.c"`
849 if HAS_EXTENSION_MODULE
851 Makefile.am: Makefile.am.in