OSDN Git Service

Top-level makefile fix for OS agnosticism and set the value of TARGET_ARCH
author"Steven J. Hill" <sjhill@realitydiluted.com>
Sat, 14 May 2005 22:02:36 +0000 (22:02 -0000)
committer"Steven J. Hill" <sjhill@realitydiluted.com>
Sat, 14 May 2005 22:02:36 +0000 (22:02 -0000)
using grep because the '.config' will not get included if we are doing
a 'clean' or other targets. This was preventing the proper cleaning up
target architecture include files.

Makefile
Rules.mak

index 062f6fb..702721f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ noconfig_targets := menuconfig config oldconfig randconfig \
        defconfig allyesconfig allnoconfig clean distclean \
        release tags TAGS
 TOPDIR=./
-include Rules.mak
+-include Rules.mak
 
 DIRS = ldso libc libcrypt libresolv libnsl libutil libm libpthread librt
 ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
index 343c8e6..ed57b7b 100644 (file)
--- a/Rules.mak
+++ b/Rules.mak
@@ -93,7 +93,7 @@ check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1;
        then echo "$(1)"; else echo "$(2)"; fi)
 
 # Make certain these contain a final "/", but no "//"s.
-TARGET_ARCH:=$(strip $(subst ",, $(strip $(TARGET_ARCH))))
+TARGET_ARCH:=$(shell grep -s ^TARGET_ARCH .config | sed -e 's/^TARGET_ARCH=//' -e 's/"//g')
 RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(RUNTIME_PREFIX))))))
 DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(DEVEL_PREFIX))))))
 export RUNTIME_PREFIX DEVEL_PREFIX