Changeset 240

Show
Ignore:
Timestamp:
07/16/06 22:01:34 (6 years ago)
Author:
tg
Message:

it gets even weirder with support for Darwin 7.9.0 ...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/Makefile

    r237 r240  
    102102        fi 
    103103        @mkdir lbin 
    104         @if which gmake >/dev/null 2>&1; then \ 
    105                 ln -s $$(which gmake) lbin/gmake 2>/dev/null ||
    106                     ln -s /usr/bin/make lbin/gmake; \ 
     104        @if which nonexistent 2>&1 | grep '^no '; then \ 
     105                cp scripts/which.mac lbin/which;
     106                chmod 555 lbin/which; \ 
    107107        else \ 
    108                 ln -s $$(which make) lbin/gmake; \ 
     108                ln -s $$(which which) lbin/which; \ 
    109109        fi 
    110         @if ! which md5sum >/dev/null 2>&1; then \ 
     110        @if lbin/which gmake >/dev/null 2>&1; then \ 
     111                ln -s $$(lbin/which gmake) lbin/gmake; \ 
     112        else \ 
     113                ln -s $$(lbin/which make) lbin/gmake; \ 
     114        fi 
     115        @if ! lbin/which md5sum >/dev/null 2>&1; then \ 
    111116                cp scripts/md5sum.bsd lbin/md5sum; \ 
    112117                chmod 555 lbin/md5sum; \ 
     
    114119        @if test x"$$(uname)" = x"MirBSD"; then \ 
    115120                sed -e 's!@@FromOS@@!MirBSD!g' -e 's!@@ToOS@@!OpenBSD!g' \ 
    116                     -e "s!@@PROG@@!$$(which uname)!g" \ 
     121                    -e "s!@@PROG@@!$$(lbin/which uname)!g" \ 
    117122                    <scripts/uname.fake >lbin/uname; \ 
    118123                chmod 555 lbin/uname; \ 
    119124        fi 
    120         @echo "BASH=$$(which bash)" >>lbin/prereq.mk 
     125        @echo "BASH=$$(lbin/which bash)" >>lbin/prereq.mk 
    121126        @echo "GNU_HOST_NAME=$$(${CC} -dumpmachine | \ 
    122127            sed -e 's!mirbsd!openbsd!g')" >>lbin/prereq.mk 
     
    132137        @echo "_PATH=$$PATH" >>lbin/prereq.mk 
    133138        @echo "PATH=$$(pwd)/lbin:$$PATH" >>lbin/prereq.mk 
    134         @echo "SHELL=$$(which bash)" >>lbin/prereq.mk 
     139        @echo "SHELL=$$(lbin/which bash)" >>lbin/prereq.mk 
    135140        @echo "export BASH HOSTCC HOSTCFLAGS LC_ALL MAKE OStype PATH SHELL" \ 
    136141            >>lbin/prereq.mk 
    137142        @env NO_ERROR=${NO_ERROR} bash scripts/scan-tools.sh 
    138         @ln -s $$(which ${CC}) lbin/gcc 
     143        @ln -s $$(lbin/which ${CC}) lbin/gcc 
    139144        @echo '===> Prerequisites checked successfully.' 
    140145        @touch $@