diff options
author | P. J. McDermott <pjm@nac.net> | 2012-07-27 03:55:28 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-07-27 04:12:19 (EDT) |
commit | 8bdf7e50eae673ffc7370e52c525176ab04258ac (patch) | |
tree | 12fedb8fd0e16f5cacae0677995ede6804648d0d | |
parent | d99325676d18ae090abc609e0e8fdbf01065f45f (diff) |
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.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | build (renamed from build.in) | 6 | ||||
-rwxr-xr-x | config | 20 |
3 files changed, 2 insertions, 25 deletions
@@ -5,6 +5,5 @@ Session.vim # Generated files -build binutils-*-*-*.pkg/ libbfd-dev-*-*-*.pkg/ @@ -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 $@ @@ -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 <pkgbase>-<target> 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 <pkgbase>-<target> packages. for _pkg in ${TARGET_PKGS}; do rm -Rf "${_pkg}"-*-*-*.pkg/ |