yann@1: There are at least three weird glitches in the Makefile: yann@1: - the test operator is a dual-equal sign (==) when it should be a single one (=); yann@1: - the exclude options are not accepted as is by GNU tar; yann@1: - how on earth could KERNEL_SOURCE possibly be equal to DEVEL_PREFIX ??? yann@1: yann@1: We (Cedric DUVAL and I, Yann E. MORIN) are not quite sure why it is that way. yann@1: We're not quite sure either on how to solve this. yann@1: yann@1: What we need is to built a toolchain; in no way we need to install the linux headers. yann@1: ==> systematically exclude them from the [s]tar command. yann@1: yann@1: This patch is inspired by the svn repository of uClibc as of 20060209. yann@1: diff -dur /home/ymorin/dev/uClibc-0.9.28/Makefile uClibc-0.9.28/Makefile yann@1: --- /home/ymorin/dev/uClibc-0.9.28/Makefile 2005-08-18 00:49:49.000000000 +0200 yann@1: +++ uClibc-0.9.28/Makefile 2006-02-09 17:06:58.000000000 +0100 yann@1: @@ -158,12 +158,17 @@ yann@1: $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib yann@1: $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include yann@1: -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/ yann@1: - if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \ yann@1: - extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \ yann@1: - else \ yann@1: - extra_exclude="" ; \ yann@1: - fi ; \ yann@1: - tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \ yann@1: +# if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \ yann@1: +# extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \ yann@1: +# else \ yann@1: +# extra_exclude="" ; \ yann@1: +# fi ; \ yann@1: +# tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \ yann@1: +# | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX) yann@1: + printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \ yann@1: + ls -1d include/linux include/asm* >> tar_exclude ; \ yann@1: + tar -chf - -X tar_exclude include \ yann@1: | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX) yann@1: + rm -f tar_exclude yann@1: ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y) yann@1: # Remove floating point related headers since float support is disabled.