Changeset 73

Show
Ignore:
Timestamp:
06/16/06 22:53:08 (3 years ago)
Author:
tg
Message:

* instead of using a $(VARS_TO_PASS) write the variables into a

*.mk include file, so that people can cd to some package direc-
tory and invoke gmake directly

* fake OpenBSD as uname for MirBSD, so that we get a little further

in the build process there (stops at linux requiring bash now)

Tested with a full build (standard config) on Linux.
Invoking gmake in a subdirectory *not* tested, but
that didn't work before at all, so it's not a problem.

Files:

Legend:

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

    r67 r73  
    3131 
    3232GMAKE?=         $(PWD)/lbin/gmake 
    33 GMAKE_INV=      PATH=$(PWD)/lbin:$(PATH) ${GMAKE} --no-print-directory \ 
    34                 -f $(PWD)/build.mk ${VARS_TO_PASS} 
    35  
    36 VARS_TO_PASS=   HOSTCC='${CC}' MAKE='${GMAKE}' LC_ALL=C \ 
    37                 HOSTCFLAGS="$$(set +x; x=$$(echo \ 
    38                     'f:\n\techo P:$${CFLAGS}\n.include <bsd.prog.mk>' | \ 
    39                     ${MAKE} -f - f EXPERIMENTAL=yes 2>/dev/null | grep '^P:' \ 
    40                     2>/dev/null | sed 's/^P://'); echo $${x:--O2 ${CFLAGS}})" 
     33GMAKE_INV=      ${GMAKE} --no-print-directory -f $(PWD)/build.mk 
    4134 
    4235all: prereq 
     
    9992                chmod 555 lbin/md5sum; \ 
    10093        fi 
     94        @if test x"$$(uname)" = x"MirBSD"; then \ 
     95                sed -e 's!@@FromOS@@!MirBSD!g' -e 's!@@ToOS@@!OpenBSD!g' \ 
     96                    -e "s!@@PROG@@!$$(which uname)!g" \ 
     97                    <scripts/uname.fake >lbin/uname; \ 
     98                chmod 555 lbin/uname; \ 
     99        fi 
     100        @echo 'HOSTCC=${CC}' >>lbin/prereq.mk 
     101        @x="$$(echo 'f:\n\techo P:$${CFLAGS}\n.include <bsd.prog.mk>' | \ 
     102            ${MAKE} -f - f EXPERIMENTAL=yes 2>/dev/null | grep '^P:' \ 
     103            2>/dev/null | sed 's/^P://')"; \ 
     104            echo "HOSTCFLAGS=$${x:--O2 ${CFLAGS}}" | sed 's/ *$$//' \ 
     105            >>lbin/prereq.mk 
     106        @echo 'LC_ALL=C' >>lbin/prereq.mk 
     107        @echo 'MAKE=${GMAKE}' >>lbin/prereq.mk 
     108        @echo "OStype=$$(env NOFAKE=yes uname)" >>lbin/prereq.mk 
     109        @echo "PATH=$$(pwd)/lbin:$$PATH" >>lbin/prereq.mk 
     110        @echo "export HOSTCC HOSTCFLAGS LC_ALL MAKE OStype PATH" \ 
     111            >>lbin/prereq.mk 
    101112        @touch $@ 
  • trunk/freewrt/build.mk

    r62 r73  
    118118else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) 
    119119 
     120include $(TOPDIR)/lbin/prereq.mk 
     121 
    120122all: menuconfig 
    121123 
  • trunk/freewrt/rules.mk

    r61 r73  
     1include $(TOPDIR)/lbin/prereq.mk 
    12include $(TOPDIR)/.config 
    23#SHELL=/bin/bash