summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/openembedded.mk19
-rw-r--r--common/setup-env9
2 files changed, 19 insertions, 9 deletions
diff --git a/common/openembedded.mk b/common/openembedded.mk
index 88a143970a..c7eaa8e5fb 100644
--- a/common/openembedded.mk
+++ b/common/openembedded.mk
@@ -1,6 +1,17 @@
-# Makefile for UcSlugC
+#!/bin/make
+# Makefile for OpenEmbedded builds
# Licensed under the GPL v2 or later
#
+# conf/auto.conf must exist in the same directory as the Makefile (i.e.
+# the directory where Makefile is used - it may be a symbolic link to
+# this file). conf/auto.conf defines:
+#
+# DISTRO - the OpenEmbedded 'distro' to build
+# MACHINE - the OpenEmbedded build target machine
+# MAKE_TARGET - the target to pass to bitbake
+#
+# All of these values are (should be, must be) quoted in double quotes
+include conf/auto.conf
BUILD_DIRS = downloads
REQUIRED_DIRS = bitbake openembedded
@@ -8,7 +19,7 @@ FIRMWARE_DEPS = create-topdir $(BUILD_DIRS) $(REQUIRED_DIRS)
# The default rule is to build the firmware in an unprotected environment.
firmware: $(FIRMWARE_DEPS)
- . ./setup-env; exec bitbake $${MAKE_TARGET}
+ . ./setup-env; exec bitbake $(MAKE_TARGET)
# This rule clobbers the environment (note that ccache uses '$HOME' by
# default, so the cache will end up there).
@@ -40,7 +51,7 @@ clobber:
.PHONY: source
source: $(REQUIRED_DIRS)
- tar zcf $${DISTRO}.tar.gz --exclude=MT Makefile setup-env conf/site.conf conf/auto.conf \
+ tar zcf $(DISTRO).tar.gz --exclude=MT Makefile setup-env conf/site.conf conf/auto.conf \
conf/local.conf.sample $(REQUIRED_DIRS:=/.)
# This target probably isn't important any longer, because the -source
@@ -54,4 +65,4 @@ distclean: clobber
# it removes directories from the tarball).
.PHONY:
really-clean: distclean
- rm -rf $(REQUIRED_DIRS) $${DISTRO}-source.tar.gz
+ rm -rf $(REQUIRED_DIRS) $(DISTRO)-source.tar.gz
diff --git a/common/setup-env b/common/setup-env
index 46151e5774..a1e0d3fbd5 100644
--- a/common/setup-env
+++ b/common/setup-env
@@ -12,10 +12,6 @@ test -n "$TOPDIR" -a -d "$TOPDIR" || {
exit 1
}
-. ./conf/auto.conf
-export DISTRO
-export MAKE_TARGET
-
#
# the following must match the definitions in common/conf/site.conf
export PYTHONPATH="${TOPDIR}/bitbake/lib"
@@ -31,10 +27,13 @@ unset CC
unset CXX
unset MFLAGS
unset MAKEFLAGS
+unset DISTRO
+unset MACHINE
+unset MAKE_TARGET
#
# make bb into a 'safe' bitbake
alias bb-safe="env -i \
- HOME='${TOPDIR}/home' \
+ HOME='${HOME}' \
PYTHONPATH='${PYTHONPATH}' \
BBPATH='${BBPATH}' \
PATH='${PATH}' \