From 8bdf7e50eae673ffc7370e52c525176ab04258ac Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 27 Jul 2012 03:55:28 -0400 Subject: Simplify build configuration; use static makefile. * Look up the GNU system type in the build makefile using a to-be-written an opkhelper utility. * Remove the get_config_values function from the config script. * Use a static build makefile. --- diff --git a/.gitignore b/.gitignore index 0010687..122e79e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,5 @@ Session.vim # Generated files -build binutils-*-*-*.pkg/ libbfd-dev-*-*-*.pkg/ diff --git a/build.in b/build index 31a1260..5e80c7a 100644 --- a/build.in +++ b/build @@ -1,8 +1,5 @@ #! /usr/bin/make -f -PKG_TARGET_ARCH = @PKG_TARGET_ARCH@ -PKG_TARGET_ARCH_GNU = @PKG_TARGET_ARCH_GNU@ - CFLAGS = -g -O2 configure: configure.stamp @@ -14,13 +11,14 @@ configure.stamp: # Enable plugins. # Don't expect to find Gettext. cd build && \ + target_arch_gnu=$$(oh-getarchitecture -t gnu $(PKG_TARGET_ARCH)) && \ CFLAGS='$(CFLAGS)' ../src/configure \ --prefix=/usr --with-sysroot=/ \ --program-transform-name='s&^&$(PKG_TARGET_ARCH)-&' \ --enable-shared --disable-multilib \ --enable-plugins --disable-nls \ --build=$(OH_BUILD_ARCH_GNU) --host=$(OH_HOST_ARCH_GNU) \ - --target=$(PKG_TARGET_ARCH_GNU) + --target=$${target_arch_gnu} # Generate all the individual program makefiles. cd build && make configure-host touch $@ diff --git a/config b/config index 4cddfcd..41fdcbd 100755 --- a/config +++ b/config @@ -11,7 +11,6 @@ main() clean ;; *) - get_config_values configure_build ;; esac @@ -24,17 +23,6 @@ msg() printf '\n' } -get_config_values() -{ - if [ -z "${PKG_TARGET_ARCH}" ]; then - msg 'Error: No target architecture specified.' >&2 - exit 1 - fi - - # FIXME: Lookup GNU system type. - export PKG_TARGET_ARCH_GNU=arm-cortex_a8-linux-gnu -} - configure_build() { # Generate a sed script to edit files. @@ -43,11 +31,6 @@ configure_build() _ss="${_ss}s&@PKG_${_name}@&$(eval echo \$\{PKG_${_name}\})&;" done - # Write a build makefile with the configuration values. - sed "${_ss}" build.in >build - chmod a+x build - msg '"build" file generated.' - # Write metadata for - packages. for _pkg in ${TARGET_PKGS}; do mkdir -p "${_pkg}-${PKG_TARGET_ARCH}.pkg" @@ -60,9 +43,6 @@ configure_build() clean() { - # Remove generated build makefile. - rm -f build - # Remove generated metadata for - packages. for _pkg in ${TARGET_PKGS}; do rm -Rf "${_pkg}"-*-*-*.pkg/ -- cgit v0.9.1