From c30f279353d4123967d792f3b0d37e714613f91e Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 10 Nov 2012 09:54:15 -0500 Subject: Install directly into binary package data dirs. Now we don't need to use oh-installfiles. --- (limited to 'build') diff --git a/build b/build index fe35207..4be17b9 100755 --- a/build +++ b/build @@ -56,7 +56,8 @@ install: build # All of these macro settings are effective thanks to # `patches/01_pass-some-dirs-to-child-makes.patch`. for target in $$(cat ../targets); do \ - oh-autoinstall -B "build-$${target}" CFLAGS='$(CFLAGS)' \ + oh-autoinstall -B "build-$${target}" -d "binutils-$${target}.data" \ + CFLAGS='$(CFLAGS)' \ tooldir='/usr/tool' scriptdir="/usr/lib/$${target}" \ bfdlibdir="/usr/lib/$(OPK_HOST_ARCH)/$${target}" \ bfdincludedir="/usr/include/$(OPK_HOST_ARCH)/$${target}" || \ @@ -65,11 +66,16 @@ install: build # /usr/tool/bin (TOOLBINDIR) contains hard links to tools. A quick look at # the code suggests we don't need them; ld *should* work without them in any # sane configuration. - rm -Rf dest/usr/tool # We don't need a static libiberty. - find dest/usr/lib -name 'libiberty.a' -exec rm -f '{}' ';' # Remove static library dependency metadata generated by libtool. - find dest/usr/lib -name '*.la' -exec rm -f '{}' ';' + for target in $$(cat ../targets); do \ + rm -Rf "binutils-$${target}.data/usr/tool" && \ + find "binutils-$${target}.data/usr/lib" -name 'libiberty.a' \ + -exec rm -f '{}' ';' && \ + find "binutils-$${target}.data/usr/lib" -name '*.la' \ + -exec rm -f '{}' ';' || \ + exit 1; \ + done # Make symbolic links to native utilities. for target in $$(cat ../targets); do \ if [ '$(OPK_HOST_ARCH)' = "$${target}" ]; then \ @@ -79,17 +85,19 @@ install: build fi; \ done # Write GNU ld configuration to point to BFD libraries. - mkdir -p dest/etc/ld.so.conf.d for target in $$(cat ../targets); do \ + mkdir -p "binutils-$${target}.data/etc/ld.so.conf.d" && \ echo '# GNU BFD libraries' \ - >"dest/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}" && \ + >"binutils-$${target}.data/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}" && \ echo "/usr/lib/$(OPK_HOST_ARCH)/$${target}" \ - >>"dest/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}"; \ + >>"binutils-$${target}.data/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}"; \ done # Post-process and install everything. - oh-fixperms - oh-strip - oh-installfiles + for target in $$(cat ../targets); do \ + oh-fixperms -d "binutils-$${target}.data" && \ + oh-strip -d "binutils-$${target}.data" || \ + exit 1; \ + done clean: for target in $$(cat ../targets); do \ -- cgit v0.9.1