diff options
author | P. J. McDermott <pjm@nac.net> | 2012-11-10 09:54:15 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-11-10 09:54:15 (EST) |
commit | c30f279353d4123967d792f3b0d37e714613f91e (patch) | |
tree | 04e0759a9690abacc85dd784a3d2a1418240dd03 /build | |
parent | e3263174b615bf1260f0a30fb31031890b156a27 (diff) |
Install directly into binary package data dirs.
Now we don't need to use oh-installfiles.
Diffstat (limited to 'build')
-rwxr-xr-x | build | 28 |
1 files changed, 18 insertions, 10 deletions
@@ -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 \ |