OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / libgcc / Makefile.in
index f0b5a0e..bcd9284 100644 (file)
@@ -394,6 +394,9 @@ endif
 
 LIB2ADD += enable-execute-stack.c
 
+# While emutls.c has nothing to do with EH, it is in LIB2ADDEH*
+# instead of LIB2ADD because that's the way to be sure on some targets
+# (e.g. *-*-darwin*) only one copy of it is linked.
 LIB2ADDEH += $(srcdir)/emutls.c
 LIB2ADDEHSTATIC += $(srcdir)/emutls.c
 LIB2ADDEHSHARED += $(srcdir)/emutls.c
@@ -999,13 +1002,25 @@ $(libgcc-objects) $(libgcc-s-objects) $(libgcc-eh-objects) \
        $(libunwind-objects) $(libunwind-s-objects) \
        $(EXTRA_PARTS): libgcc_tm.h
 
-install-unwind_h:
+# Copy unwind.h to the place where gcc will look for it at build-time
+install-unwind_h-forbuild:
        dest=$(gcc_objdir)/include/tmp$$$$-unwind.h; \
        cp unwind.h $$dest; \
        chmod a+r $$dest; \
        sh $(srcdir)/../move-if-change $$dest $(gcc_objdir)/include/unwind.h
 
-all: install-unwind_h
+# Copy unwind.h to the place where gcc will look at run-time, once installed
+#
+# This is redundant with the internal copy above when using a regular toplevel
+# "install" target, because gcc's install will copy to the destination as well.
+#
+# This is however useful for "install-no-fixincludes" case, when only the gcc
+# internal headers are copied by gcc's install.
+install-unwind_h:
+       $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
+       $(INSTALL_DATA) unwind.h $(DESTDIR)$(libsubdir)/include
+
+all: install-unwind_h-forbuild
 
 # Documentation targets (empty).
 .PHONY: info html dvi pdf install-info install-html install-pdf
@@ -1064,12 +1079,13 @@ install-leaf: $(install-shared) $(install-libunwind)
          esac;                                                 \
        done
 
-install: install-leaf
+install: install-leaf install-unwind_h
        @: $(MAKE) ; $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
 install-strip: install
 
 .PHONY: install install-shared install-libunwind install-strip
+.PHONY: install-unwind_h install-unwind_h-forbuild
 
 # Don't export variables to the environment, in order to not confuse
 # configure.