From 63639278e1f8700364de8bc0fc01a0acf5f34804 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 28 Jul 2012 05:46:55 -0400 Subject: Fix some errors in build. --- (limited to 'build') diff --git a/build b/build index ddf22c1..32c412a 100755 --- a/build +++ b/build @@ -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 -- cgit v0.9.1