diff options
| author | Rod Whitby <rod@whitby.id.au> | 2005-07-30 05:27:45 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-07-30 05:27:45 +0000 |
| commit | 113ede2350b8179e06be8f1cf54832f3ea83d359 (patch) | |
| tree | fdc6c93f04d5e4c999d88922f9ceae0bf90583c9 /openslug | |
| parent | a95903817361c50782014172034cc09978819904 (diff) | |
Migrated unslung and openslug to the new setup - type 'make setup-unslung setup-openslug' to upgrade.
Diffstat (limited to 'openslug')
| -rw-r--r-- | openslug/.mt-ignore | 4 | ||||
| -rw-r--r-- | openslug/Makefile | 90 |
2 files changed, 49 insertions, 45 deletions
diff --git a/openslug/.mt-ignore b/openslug/.mt-ignore deleted file mode 100644 index dd5df82133..0000000000 --- a/openslug/.mt-ignore +++ /dev/null @@ -1,4 +0,0 @@ -downloads -openslug-source.tar.gz -setup-env -tmp diff --git a/openslug/Makefile b/openslug/Makefile index 657ed278f5..88a143970a 100644 --- a/openslug/Makefile +++ b/openslug/Makefile @@ -1,49 +1,57 @@ -# Makefile for OpenSlug +# Makefile for UcSlugC # Licensed under the GPL v2 or later +# -openslug-firmware: setup-env conf/local.conf - . ./setup-env ; bitbake openslug-packages - -# This does the same thing but with a clean environment -# The HOME setting prevents user environment settings -# from changing the build. CCACHE_DIR is necessary to -# prevent ccache (if installed) attempting to use a -# .cache in the home directory. -openslug-firmware-safe: setup-env conf/local.conf - env -i CCACHE_DISABLE=1 CCACHE_DIR="`pwd`/tmp/ccache" HOME=/dev/null \ - sh -c '. ./setup-env; bitbake openslug-packages' - -setup-env: - [ -e bitbake ] || ln -s ../bitbake . - [ -e downloads ] || ln -s ../downloads . - [ -e openembedded ] || ln -s ../openembedded . - echo 'OEROOT='`pwd` > setup-env - echo 'OESYS=$$OEROOT/bitbake/' >> setup-env - echo 'OEBUILD=$$OEROOT' >> setup-env - echo 'PKGDIR=$$OEROOT/openembedded/' >> setup-env - echo 'export PYTHONPATH=$$OESYS/lib' >>setup-env - echo 'export BBPATH=$$OEBUILD:$$PKGDIR:$$OESYS' >> setup-env - echo 'export PATH=$$OESYS/bin/:$$PATH' >> setup-env - echo 'export LD_LIBRARY_PATH=' >> setup-env - echo 'export LANG=C' >> setup-env - echo 'unset LC_CTYPE' >> setup-env - echo 'unset CC' >> setup-env - echo 'unset CXX' >> setup-env - echo 'unset MFLAGS' >> setup-env - echo 'unset MAKEFLAGS' >> setup-env - echo 'alias bb=bitbake' >> setup-env - echo 'echo Environment set up for OpenSlug development.' >> setup-env - -conf/local.conf: - sed -e "s|%%%OEROOT%%%|`pwd`|" conf/local.conf.template > conf/local.conf +BUILD_DIRS = downloads +REQUIRED_DIRS = bitbake openembedded +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} + +# This rule clobbers the environment (note that ccache uses '$HOME' by +# default, so the cache will end up there). +firmware-safe: + env -i HOME="$${HOME}" PATH="$${PATH}" $(MAKE) firmware + +# topdir.conf is re-created automatically if the directory is +# moved - this will cause a full bitbake reparse +.PHONY: create-topdir +create-topdir: conf/topdir.conf + . conf/topdir.conf && test "`pwd`" = "$$TOPDIR" || echo "TOPDIR='`pwd`'" > conf/topdir.conf + +conf/topdir.conf: + echo "TOPDIR='`pwd`'" >$@ + +# rules for directories - if a symlink exists and the target does not +# exist something will go wrong in the build, therefore cause a failure +# here by the mkdir. +$(BUILD_DIRS): + test -d $@ || if test -d ../$@; then ln -s ../$@ .; else mkdir $@; fi + +# these directories must already exist - either in TOPDIR (here) or in .. +$(REQUIRED_DIRS): + test -d $@ || if test -d ../$@; then ln -s ../$@ .; else exit 1; fi + +.PHONY: clobber clobber: rm -rf tmp -openslug-source: - tar zcf openslug-source.tar.gz --exclude=MT Makefile bitbake conf openembedded +.PHONY: source +source: $(REQUIRED_DIRS) + 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 +# target above does the right thing +.PHONY: distclean: clobber - rm -rf setup-env conf/local.conf bitbake downloads openembedded - -# End of Makefile + rm -rf conf/topdir.conf conf/local.conf $(BUILD_DIRS) + +# This target is mainly for testing - it is intended to put the disto directory +# back to its original state, it will destroy a source-tarball system (because +# it removes directories from the tarball). +.PHONY: +really-clean: distclean + rm -rf $(REQUIRED_DIRS) $${DISTRO}-source.tar.gz |
