Changeset b84b14f in freewrt


Ignore:
Timestamp:
Jun 16, 2006, 10:53:08 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
bd55056
Parents:
cb49195
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.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@73 afb5a338-a214-0410-bd46-81f09a774fd1

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rcb49195 rb84b14f  
    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 $@
  • build.mk

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

    rcb49195 rb84b14f  
     1include $(TOPDIR)/lbin/prereq.mk
    12include $(TOPDIR)/.config
    23#SHELL=/bin/bash
Note: See TracChangeset for help on using the changeset viewer.