diff options
author | P. J. McDermott <pjm@nac.net> | 2012-07-28 05:46:55 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-07-28 05:55:50 (EDT) |
commit | 63639278e1f8700364de8bc0fc01a0acf5f34804 (patch) | |
tree | 5df110ee3ea3a51ea56138e8442bdb43c4b8ee9f | |
parent | 39433ef468110c40c49f3098c348eeefc79f4995 (diff) |
Fix some errors in build.
-rwxr-xr-x | build | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -5,7 +5,7 @@ CFLAGS = -g -O2 configure: configure.stamp configure.stamp: for target in $(PKG_TARGETS); do \ - mkdir "build-$${target}"; \ + mkdir -p "build-$${target}"; \ done # Generate the main makefile. # Use shared BFD and opcodes libraries for all utilities. @@ -14,18 +14,19 @@ configure.stamp: # Don't expect to find Gettext. for target in $(PKG_TARGETS); do \ cd "build-$${target}" && \ - target_arch_gnu=$$(oh-getarchitecture -t gnu "$${target}" && \ + target_arch_gnu=$$(oh-getarchitecture -t gnu "$${target}") && \ CFLAGS='$(CFLAGS)' ../src/configure \ --prefix=/usr --with-sysroot=/ \ --program-transform-name="s&^&$${target}-&" \ --enable-shared --disable-multilib \ --enable-plugins --disable-nls \ --build=$(OH_BUILD_ARCH_GNU) --host=$(OH_HOST_ARCH_GNU) \ - --target="$${target_arch_gnu}"; \ + --target="$${target_arch_gnu}" && \ + cd ..; \ done # Generate all the individual program makefiles. for target in $(PKG_TARGETS); do \ - cd build && make configure-host; \ + cd "build-$${target}" && make configure-host && cd ..; \ done touch $@ @@ -33,11 +34,11 @@ build: build.stamp build.stamp: configure # Build BFD header files. for target in $(PKG_TARGETS); do \ - cd "build-$${target}/bfd" && make headers; \ + cd "build-$${target}/bfd" && make headers && cd ../..; \ done # Build ALL the things! for target in $(PKG_TARGETS); do \ - cd "build-$${target}" && make CFLAGS='$(CFLAGS)'; \ + cd "build-$${target}" && make CFLAGS='$(CFLAGS)' && cd ..; \ done touch $@ @@ -45,8 +46,9 @@ install: install.stamp install.stamp: build # Install everything. for target in $(PKG_TARGETS); do \ - cd build && \ - make CFLAGS='$(CFLAGS)' prefix="$${PWD}/../dest" install; \ + cd "build-$${target}" && \ + make CFLAGS='$(CFLAGS)' prefix="$${PWD}/../dest/usr" install && \ + cd ..; \ done # Remove static library dependency metadata generated by libtool. rm -f ../dest/usr/lib/*.la |