summaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc/uclibc.mk
diff options
context:
space:
mode:
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>2008-10-07 07:20:32 +0000
committerHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>2008-10-07 07:20:32 +0000
commit8e71cdd87f70eced2fe735c2b4179e6207d5fd0b (patch)
treec07fc0a4fa61cdc43f7539d6329f460ed34daa95 /toolchain/uClibc/uclibc.mk
parent599d3243f1f0df4c9d444c26e79168960e54a1f8 (diff)
downloadbuildroot-novena-8e71cdd87f70eced2fe735c2b4179e6207d5fd0b.tar.gz
buildroot-novena-8e71cdd87f70eced2fe735c2b4179e6207d5fd0b.zip
uclibc: add kconfig option and make stuff for installing the uClibc test suite
This patch adds the possibility to install the uClibc test suite to the target file system. This is useful if you need to debug or test your uClibc. The option is defaulted to no, and is not needed for a normal running Linux system. The test suite is installed to /root/uClibc Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Diffstat (limited to 'toolchain/uClibc/uclibc.mk')
-rw-r--r--toolchain/uClibc/uclibc.mk33
1 files changed, 29 insertions, 4 deletions
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index e39e157c6..1043b0e52 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -549,6 +549,9 @@ endif
touch -c $@
UCLIBC_TARGETS=$(TARGET_DIR)/lib/libc.so.0
+ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y)
+UCLIBC_TARGETS+=uclibc-test
+endif
endif
uclibc: $(cross_compiler) $(STAGING_DIR)/usr/lib/libc.a $(UCLIBC_TARGETS)
@@ -568,11 +571,11 @@ uclibc-configured: kernel-headers $(UCLIBC_DIR)/.configured
uclibc-configured-source: uclibc-source
-uclibc-clean:
+uclibc-clean: uclibc-test-clean
-$(MAKE1) -C $(UCLIBC_DIR) clean
rm -f $(UCLIBC_DIR)/.config
-uclibc-dirclean:
+uclibc-dirclean: uclibc-test-dirclean
rm -rf $(UCLIBC_DIR)
uclibc-target-utils:
@@ -580,6 +583,28 @@ uclibc-target-utils:
uclibc-target-utils-source: $(DL_DIR)/$(UCLIBC_SOURCE)
+$(UCLIBC_DIR)/test/unistd/errno:
+ $(MAKE) -C $(UCLIBC_DIR)/test \
+ ARCH_CFLAGS=-I$(STAGING_DIR)/include \
+ UCLIBC_ONLY=1 TEST_INSTALLED_UCLIBC=1 compile
+
+$(TARGET_DIR)/root/uClibc/test/unistd/errno: $(UCLIBC_DIR)/test/unistd/errno
+ mkdir -p $(TARGET_DIR)/root/uClibc
+ cp -rdpf $(UCLIBC_DIR)/test $(TARGET_DIR)/root/uClibc
+ $(INSTALL) $(UCLIBC_DIR)/Rules.mak $(TARGET_DIR)/root/uClibc
+ $(INSTALL) $(UCLIBC_DIR)/.config $(TARGET_DIR)/root/uClibc
+
+uclibc-test: uclibc $(TARGET_DIR)/root/uClibc/test/unistd/errno
+
+uclibc-test-source: uclibc-source
+
+uclibc-test-clean:
+ -$(MAKE) -C $(UCLIBC_DIR)/test clean
+ rm -rf $(TARGET_DIR)/root/uClibc
+
+uclibc-test-dirclean:
+ rm -rf $(TARGET_DIR)/root/uClibc
+
#############################################################
#
# uClibc for the target just needs its header files
@@ -615,11 +640,11 @@ endif
uclibc_target: cross_compiler uclibc $(TARGET_DIR)/usr/lib/libc.a $(TARGET_DIR)/usr/bin/ldd
-uclibc_target-clean:
+uclibc_target-clean: uclibc-test-clean
rm -rf $(TARGET_DIR)/usr/include \
$(TARGET_DIR)/usr/lib/libc.a $(TARGET_DIR)/usr/bin/ldd
-uclibc_target-dirclean:
+uclibc_target-dirclean: uclibc-test-dirclean
rm -rf $(TARGET_DIR)/usr/include
endif