From 70b648ec106a87b2ef9933832b18257221959d48 Mon Sep 17 00:00:00 2001
From: P. J. McDermott <pjm@nac.net>
Date: Fri, 26 Apr 2013 17:38:53 -0400
Subject: build: Mv oh-autoinstalls to native/cross targets.

---
(limited to 'build')

diff --git a/build b/build
index b7216bd..154cf36 100755
--- a/build
+++ b/build
@@ -83,6 +83,13 @@ build: $(build_targets)
 	touch $@
 
 $(install_targets): build
+	if [ "x$(target)" = 'x$(OPK_HOST_ARCH)' ]; then \
+		$(MAKE) -f ../build "installnative-$(target)"; \
+	else \
+		$(MAKE) -f ../build "installcross-$(target)"; \
+	fi
+
+$(installnative_targets):
 	# The -T option is necessary because otherwise:
 	#   * oh-autoinstall checks for an "install" target by running make with
 	#     the -n option,
@@ -101,13 +108,6 @@ $(install_targets): build
 		fincludedir="$${libsubdir}/finclude" \
 		toolexeclibdir="/usr/lib/$(target)" \
 		MULTIOSDIR=
-	if [ "x$(target)" = 'x$(OPK_HOST_ARCH)' ]; then \
-		$(MAKE) -f ../build "installnative-$(target)"; \
-	else \
-		$(MAKE) -f ../build "installcross-$(target)"; \
-	fi
-
-$(installnative_targets):
 	# Change the target architecture prefix of files in /usr/bin.
 	rm -f $(destdir)/usr/bin/*-gcc-$(base_version).*
 	for f in c++ g++ gcc gcc-ar gcc-nm gcc-ranlib; do \
@@ -230,6 +230,16 @@ $(installnative_targets):
 	oh-installfiles -d "$(destdir)"
 
 $(installcross_targets):
+	libsubdir="/usr/lib/$(target)/gcc-$(base_version)" && \
+	oh-autoinstall -B "$(builddir)" -d "$(destdir)" -T install-gcc -- \
+		gxx_include_dir=/usr/include/c++-4.7 \
+		host_installdir=/usr/include/$(target)/c++-4.7/bits \
+		libsubdir="$${libsubdir}" \
+		libexecsubdir="$${libsubdir}" \
+		libsubincludedir="$${libsubdir}/include" \
+		fincludedir="$${libsubdir}/finclude" \
+		toolexeclibdir="/usr/lib/$(target)" \
+		MULTIOSDIR=
 	# Change the target architecture prefix of files in /usr/bin.
 	rm -f $(destdir)/usr/bin/*-gcc-$(base_version).*
 	for f in c++ g++ gcc gcc-ar gcc-nm gcc-ranlib; do \
--
cgit v0.9.1