summaryrefslogtreecommitdiffstats
path: root/rules/image-toolchain-tgz.make
diff options
context:
space:
mode:
Diffstat (limited to 'rules/image-toolchain-tgz.make')
-rw-r--r--rules/image-toolchain-tgz.make36
1 files changed, 36 insertions, 0 deletions
diff --git a/rules/image-toolchain-tgz.make b/rules/image-toolchain-tgz.make
new file mode 100644
index 0000000..a80c808
--- /dev/null
+++ b/rules/image-toolchain-tgz.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_TOOLCHAIN_TGZ) += image-toolchain-tgz
+
+#
+# Paths and names
+#
+IMAGE_TOOLCHAIN_TGZ_VERSION := $(shell ./scripts/setlocalversion ./.tarball-version)
+IMAGE_TOOLCHAIN_TGZ_IMAGE := $(PTXDIST_WORKSPACE)/dist/oselas.toolchain-$(IMAGE_TOOLCHAIN_TGZ_VERSION)-$(subst _,-,$(PTXCONF_PLATFORM)).tar.xz
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+$(IMAGE_TOOLCHAIN_TGZ_IMAGE): $(STATEDIR)/world.cleanup
+ @$(call targetinfo)
+ @mkdir -p $(dir $@)
+ @echo 'tar -C "$(PTX_AUTOBUILD_DESTDIR)$(PTXCONF_PREFIX)" \
+ --exclude=gcc-first \
+ -cJf "$(@)" \
+ "${PTXCONF_PROJECT}/$(PTXCONF_GNU_TARGET)/$(PTXCONF_PREFIX_TCID)"' \
+ | fakeroot
+ @$(call finish)
+
+# vim: syntax=make