OSDN Git Service

Imported GC 6.1 Alpha 3. Finally.
[pf3gnuchains/gcc-fork.git] / boehm-gc / Makefile.in
index 693906c..4460d67 100644 (file)
@@ -65,22 +65,33 @@ target_alias = @target_alias@
 target_triplet = @target@
 AR = @AR@
 AS = @AS@
-BOEHM_GC_CFLAGS = @BOEHM_GC_CFLAGS@
 CC = @CC@
 CPP = @CPP@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXINCLUDES = @CXXINCLUDES@
+DLLTOOL = @DLLTOOL@
 EXEEXT = @EXEEXT@
+EXTRA_TEST_LIBS = @EXTRA_TEST_LIBS@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GC_CFLAGS = @GC_CFLAGS@
 INCLUDES = @INCLUDES@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MY_CFLAGS = @MY_CFLAGS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
+STRIP = @STRIP@
+THREADLIBS = @THREADLIBS@
 VERSION = @VERSION@
 addobjs = @addobjs@
-boehm_gc_basedir = @boehm_gc_basedir@
+gc_basedir = @gc_basedir@
+mkinstalldirs = @mkinstalldirs@
 target_all = @target_all@
 
 AUTOMAKE_OPTIONS = cygnus
@@ -92,41 +103,52 @@ MULTIDIRS =
 MULTISUBDIR = 
 MULTIDO = true
 MULTICLEAN = true
+@USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
 
-tooldir = $(exec_prefix)/$(target_alias)
-toollibdir = $(tooldir)/lib$(MULTISUBDIR)
+toolexeclib_LTLIBRARIES = $(target_all)
+EXTRA_LTLIBRARIES = libgcjgc.la
+libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
+dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c irix_threads.c \
+linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
+obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
+solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
+backgraph.c
 
-toollib_LIBRARIES = $(target_all)
-EXTRA_LIBRARIES = libgcjgc.a
-libgcjgc_a_SOURCES = allchblk.c alloc.c blacklst.c checksums.c \
-config.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
-gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h headers.c        \
-irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c \
-misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c        \
-quick_threads.c real_malloc.c reclaim.c solaris_pthreads.c \
-solaris_threads.c solaris_threads.h stubborn.c typd_mlc.c version.h \
-weakpointer.h
 
-libgcjgc_a_LIBADD = @addobjs@
-libgcjgc_a_DEPENDENCIES = @addobjs@
+# Include THREADLIBS here to ensure that the correct versions of
+# linuxthread semaphore functions get linked:
+libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
+libgcjgc_la_DEPENDENCIES = @addobjs@
+libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
 
-EXTRA_libgcjgc_a_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s        \
-mips_ultrix_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.s \
-sparc_sunos4_mach_dep.s mach_dep.c ecos.cc
+EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s \
+mips_sgi_mach_dep.s mips_ultrix_mach_dep.s powerpc_macosx_mach_dep.s \
+rs6000_mach_dep.s sparc_mach_dep.s sparc_netbsd_mach_dep.s \
+sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
 
 
-AM_CXXFLAGS = @BOEHM_GC_CFLAGS@
+AM_CXXFLAGS = @GC_CFLAGS@
 
-AM_CFLAGS = @BOEHM_GC_CFLAGS@
+AM_CFLAGS = @GC_CFLAGS@
 
 check_PROGRAMS = gctest
-gctest_SOURCES = test.c
-gctest_LDADD = ./libgcjgc.a
+#      Using $< in the above seems to fail with the HP/UX on Itanium make.
 
-all_objs = @addobjs@ $(libgcjgc_a_OBJECTS)
+gctest_OBJECTS = test.o
+gctest_LDADD = ./libgcjgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
+gctest_LDFLAGS = -shared-libgcc
+TESTS_ENVIRONMENT = LD_LIBRARY_PATH=../../$(MULTIBUILDTOP)gcc
+TESTS = gctest
 
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS) 
-LINK = $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
+all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
+
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS) 
+
+LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
@@ -170,49 +192,44 @@ AM_MAKEFLAGS = \
        "DESTDIR=$(DESTDIR)"
 
 
-CONFIG_STATUS_DEPENDENCIES = $(boehm_gc_basedir)/configure.host
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
 
 MAKEOVERRIDES = 
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 CONFIG_CLEAN_FILES = 
-LIBRARIES =  $(toollib_LIBRARIES)
+LTLIBRARIES =  $(toolexeclib_LTLIBRARIES)
 
 
 DEFS = @DEFS@ -I. -I$(srcdir) 
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
-libgcjgc_a_OBJECTS =  allchblk.o alloc.o blacklst.o checksums.o \
-dbg_mlc.o dyn_load.o finalize.o headers.o irix_threads.o \
-linux_threads.o malloc.o mallocx.o mark.o mark_rts.o misc.o new_hblk.o \
-obj_map.o os_dep.o pcr_interface.o ptr_chck.o quick_threads.o \
-real_malloc.o reclaim.o solaris_pthreads.o solaris_threads.o stubborn.o \
-typd_mlc.o
+libgcjgc_la_OBJECTS =  allchblk.lo alloc.lo blacklst.lo checksums.lo \
+dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo headers.lo \
+irix_threads.lo linux_threads.lo malloc.lo mallocx.lo mark.lo \
+mark_rts.lo misc.lo new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo \
+ptr_chck.lo real_malloc.lo reclaim.lo solaris_pthreads.lo \
+solaris_threads.lo specific.lo stubborn.lo typd_mlc.lo backgraph.lo
 check_PROGRAMS =  gctest$(EXEEXT)
-gctest_OBJECTS =  test.o
-gctest_DEPENDENCIES =  ./libgcjgc.a
-gctest_LDFLAGS = 
-CXXFLAGS = @CXXFLAGS@
-CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+gctest_DEPENDENCIES =  ./libgcjgc.la
 CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-DIST_COMMON =  README ChangeLog Makefile.am Makefile.in acinclude.m4 \
-aclocal.m4 configure configure.in
+DIST_COMMON =  ChangeLog Makefile.am Makefile.in acinclude.m4 aclocal.m4 \
+config.guess config.sub configure configure.in install-sh ltconfig \
+ltmain.sh mkinstalldirs
 
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
-SOURCES = $(libgcjgc_a_SOURCES) $(EXTRA_libgcjgc_a_SOURCES) $(gctest_SOURCES)
-OBJECTS = $(libgcjgc_a_OBJECTS) $(gctest_OBJECTS)
+SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES)
+OBJECTS = $(libgcjgc_la_OBJECTS)
 
 all: all-redirect
 .SUFFIXES:
-.SUFFIXES: .S .c .cc .o .s
+.SUFFIXES: .S .c .lo .o .obj .s
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
        cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
 
@@ -228,46 +245,48 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
        cd $(srcdir) && $(AUTOCONF)
 
-mostlyclean-toollibLIBRARIES:
+mostlyclean-toolexeclibLTLIBRARIES:
 
-clean-toollibLIBRARIES:
-       -test -z "$(toollib_LIBRARIES)" || rm -f $(toollib_LIBRARIES)
+clean-toolexeclibLTLIBRARIES:
+       -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
 
-distclean-toollibLIBRARIES:
+distclean-toolexeclibLTLIBRARIES:
 
-maintainer-clean-toollibLIBRARIES:
+maintainer-clean-toolexeclibLTLIBRARIES:
 
-install-toollibLIBRARIES: $(toollib_LIBRARIES)
+install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(toollibdir)
-       @list='$(toollib_LIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(toollibdir)/$$p"; \
-           $(INSTALL_DATA) $$p $(DESTDIR)$(toollibdir)/$$p; \
-         else :; fi; \
-       done
-       @$(POST_INSTALL)
-       @list='$(toollib_LIBRARIES)'; for p in $$list; do \
+       $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
+       @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
-           echo " $(RANLIB) $(DESTDIR)$(toollibdir)/$$p"; \
-           $(RANLIB) $(DESTDIR)$(toollibdir)/$$p; \
+           echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
+           $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
          else :; fi; \
        done
 
-uninstall-toollibLIBRARIES:
+uninstall-toolexeclibLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       list='$(toollib_LIBRARIES)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(toollibdir)/$$p; \
+       list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+         $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
        done
 
 .c.o:
        $(COMPILE) -c $<
 
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+       $(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+       $(COMPILE) -c $<
+
 .S.o:
        $(COMPILE) -c $<
 
 mostlyclean-compile:
        -rm -f *.o core *.core
+       -rm -f *.$(OBJEXT)
 
 clean-compile:
 
@@ -276,10 +295,24 @@ distclean-compile:
 
 maintainer-clean-compile:
 
-libgcjgc.a: $(libgcjgc_a_OBJECTS) $(libgcjgc_a_DEPENDENCIES)
-       -rm -f libgcjgc.a
-       $(AR) cru libgcjgc.a $(libgcjgc_a_OBJECTS) $(libgcjgc_a_LIBADD)
-       $(RANLIB) libgcjgc.a
+.c.lo:
+       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libgcjgc.la: $(libgcjgc_la_OBJECTS) $(libgcjgc_la_DEPENDENCIES)
+       $(LINK)  $(libgcjgc_la_LDFLAGS) $(libgcjgc_la_OBJECTS) $(libgcjgc_la_LIBADD) $(LIBS)
 
 mostlyclean-checkPROGRAMS:
 
@@ -293,8 +326,6 @@ maintainer-clean-checkPROGRAMS:
 gctest$(EXEEXT): $(gctest_OBJECTS) $(gctest_DEPENDENCIES)
        @rm -f gctest$(EXEEXT)
        $(LINK) $(gctest_LDFLAGS) $(gctest_OBJECTS) $(gctest_LDADD) $(LIBS)
-.cc.o:
-       $(CXXCOMPILE) -c $<
 
 tags: TAGS
 
@@ -366,40 +397,66 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          if test -f $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
            || cp -p $$d/$$file $(distdir)/$$file || :; \
          fi; \
        done
+check-TESTS: $(TESTS)
+       @failed=0; all=0; \
+       srcdir=$(srcdir); export srcdir; \
+       for tst in $(TESTS); do \
+         if test -f $$tst; then dir=.; \
+         else dir="$(srcdir)"; fi; \
+         if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+           all=`expr $$all + 1`; \
+           echo "PASS: $$tst"; \
+         elif test $$? -ne 77; then \
+           all=`expr $$all + 1`; \
+           failed=`expr $$failed + 1`; \
+           echo "FAIL: $$tst"; \
+         fi; \
+       done; \
+       if test "$$failed" -eq 0; then \
+         banner="All $$all tests passed"; \
+       else \
+         banner="$$failed of $$all tests failed"; \
+       fi; \
+       dashes=`echo "$$banner" | sed s/./=/g`; \
+       echo "$$dashes"; \
+       echo "$$banner"; \
+       echo "$$dashes"; \
+       test "$$failed" -eq 0
 info-am:
 info: info-am
 dvi-am:
 dvi: dvi-am
 check-am: $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
 check: check-am
 installcheck-am:
 installcheck: installcheck-am
 install-info-am: 
 install-info: install-info-am
-install-exec-am:
+install-exec-am: install-toolexeclibLTLIBRARIES
 install-exec: install-exec-am
 
-install-data-am: install-toollibLIBRARIES
+install-data-am:
 install-data: install-data-am
 
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 install: install-am
-uninstall-am: uninstall-toollibLIBRARIES
+uninstall-am: uninstall-toolexeclibLTLIBRARIES
 uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
+all-am: Makefile $(LTLIBRARIES)
 all-redirect: all-am
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs:
-       $(mkinstalldirs)  $(DESTDIR)$(toollibdir)
+       $(mkinstalldirs)  $(DESTDIR)$(toolexeclibdir)
 
 
 mostlyclean-generic:
@@ -411,63 +468,72 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-mostlyclean-am:  mostlyclean-toollibLIBRARIES mostlyclean-compile \
-               mostlyclean-checkPROGRAMS mostlyclean-tags \
-               mostlyclean-generic
+mostlyclean-am:  mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
+               mostlyclean-libtool mostlyclean-checkPROGRAMS \
+               mostlyclean-tags mostlyclean-generic
 
 mostlyclean: mostlyclean-am
 
-clean-am:  clean-toollibLIBRARIES clean-compile clean-checkPROGRAMS \
-               clean-tags clean-generic mostlyclean-am
+clean-am:  clean-toolexeclibLTLIBRARIES clean-compile clean-libtool \
+               clean-checkPROGRAMS clean-tags clean-generic \
+               mostlyclean-am
 
 clean: clean-am
 
-distclean-am:  distclean-toollibLIBRARIES distclean-compile \
-               distclean-checkPROGRAMS distclean-tags \
-               distclean-generic clean-am
+distclean-am:  distclean-toolexeclibLTLIBRARIES distclean-compile \
+               distclean-libtool distclean-checkPROGRAMS \
+               distclean-tags distclean-generic clean-am
+       -rm -f libtool
 
 distclean: distclean-am
        -rm -f config.status
 
-maintainer-clean-am:  maintainer-clean-toollibLIBRARIES \
-               maintainer-clean-compile maintainer-clean-checkPROGRAMS \
-               maintainer-clean-tags maintainer-clean-generic \
-               distclean-am
+maintainer-clean-am:  maintainer-clean-toolexeclibLTLIBRARIES \
+               maintainer-clean-compile maintainer-clean-libtool \
+               maintainer-clean-checkPROGRAMS maintainer-clean-tags \
+               maintainer-clean-generic distclean-am
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
 
 maintainer-clean: maintainer-clean-am
        -rm -f config.status
 
-.PHONY: mostlyclean-toollibLIBRARIES distclean-toollibLIBRARIES \
-clean-toollibLIBRARIES maintainer-clean-toollibLIBRARIES \
-uninstall-toollibLIBRARIES install-toollibLIBRARIES mostlyclean-compile \
-distclean-compile clean-compile maintainer-clean-compile \
-mostlyclean-checkPROGRAMS distclean-checkPROGRAMS clean-checkPROGRAMS \
+.PHONY: mostlyclean-toolexeclibLTLIBRARIES \
+distclean-toolexeclibLTLIBRARIES clean-toolexeclibLTLIBRARIES \
+maintainer-clean-toolexeclibLTLIBRARIES \
+uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool mostlyclean-checkPROGRAMS \
+distclean-checkPROGRAMS clean-checkPROGRAMS \
 maintainer-clean-checkPROGRAMS tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
+clean-tags maintainer-clean-tags distdir check-TESTS info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-info-am \
+install-info install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
-$(all_objs) : config.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
+# The following hack produces a warning from automake, but we need it in order 
+# to build a file from a subdirectory. FIXME.
+test.o:        tests/test.c
+       $(COMPILE) -c $(srcdir)/tests/test.c
+$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
+include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
 
-.s.o:
-       $(CC) -x assembler-with-cpp $(DEFS) $(INCLUDES) $(CPPFLAGS) $(BOEHM_GC_CFLAGS) \
-       $(MY_CFLAGS) -c $<
+.s.lo:
+       $(LTCOMPILE) -Wp,-P -x assembler-with-cpp -c $<
 
 # Multilib support.
 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
        maintainer-clean-multi
 
-all-recursive: all-multi
-install-recursive: install-multi
-mostlyclean-recursive: mostlyclean-multi
-clean-recursive: clean-multi
-distclean-recursive: distclean-multi
-maintainer-clean-recursive: maintainer-clean-multi
+all-am: all-multi
+install-am: install-multi
+mostlyclean-am: mostlyclean-multi
+clean-am: clean-multi
+distclean-am: distclean-multi
+maintainer-clean-am: maintainer-clean-multi
 
 all-multi:
        $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do