# Makefile for buildroot2
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with the packages to build for the target.
#
##############################################################
-ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
BASE_TARGETS:=uclibc-configured binutils cross_compiler uclibc-target-utils kernel-headers
else
BASE_TARGETS:=uclibc
MAKEOVERRIDES =
endif
-BASE_DIR := $(shell mkdir -p $(O) && cd $(O) && pwd)
+# bash prints the name of the directory on 'cd <dir>' if CDPATH is
+# set, so unset it here to not cause problems. Notice that the export
+# line doesn't affect the environment of $(shell ..) calls, so
+# explictly throw away any output from 'cd' here.
+export CDPATH:=
+BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
DL_DIR=$(call qstrip,$(BR2_DL_DIR))
# define values for prepatched source trees for toolchains
VENDOR_SITE:=$(call qstrip,$(BR2_VENDOR_SITE))
-VENDOR_SUFFIX:=$(call qstrip,$(BR2_VENDOR_SUFFIX))
VENDOR_BINUTILS_RELEASE:=$(call qstrip,$(BR2_VENDOR_BINUTILS_RELEASE))
VENDOR_GCC_RELEASE:=$(call qstrip,$(BR2_VENDOR_GCC_RELEASE))
VENDOR_UCLIBC_RELEASE:=$(call qstrip,$(BR2_VENDOR_UCLIBC_RELEASE))
-VENDOR_GDB_RELEASE:=$(call qstrip,$(BR2_VENDOR_GDB_RELEASE))
VENDOR_PATCH_DIR:=$(call qstrip,$(BR2_VENDOR_PATCH_DIR))
BR2_DEPENDS_DIR=$(BUILD_DIR)/buildroot-config
# We also need the various per-package makefiles, which also add
# each selected package to TARGETS if that package was selected
# in the .config file.
-ifeq ($(BR2_TOOLCHAIN_SOURCE),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
# avoid pulling in external toolchain which is broken for toplvl parallel builds
# Explicit ordering:
include toolchain/dependencies/dependencies.mk
endif
endif
@mkdir -p $(STAGING_DIR)/usr/include
+ @mkdir -p $(STAGING_DIR)/usr/bin
$(BUILD_DIR)/.root:
mkdir -p $(TARGET_DIR)
touch $(STAGING_DIR)/.fakeroot.00000; \
fi
-find $(TARGET_DIR) -type d -name CVS -print0 -o -name .svn -print0 | xargs -0 rm -rf
- -find $(TARGET_DIR) -type f -name .empty -print0 | xargs -0 rm -rf
+ -find $(TARGET_DIR) -type f \( -name .empty -o -name '*~' \) -print0 | xargs -0 rm -rf
touch $@
$(TARGET_DIR): $(BUILD_DIR)/.root
SPIDER=--spider source
ifeq ($(BR2_CONFIG_CACHE),y)
+# drop configure cache if configuration is changed
$(BUILD_DIR)/tgt-config.cache: .config
rm -f $@
touch $@
@echo 'See docs/README and docs/buildroot.html for further details'
@echo
-release: distclean
+release:
OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
- rm -rf ../$$OUT*; cp -al . ../$$OUT; cd ..; \
- tar cfz $$OUT.tar.gz --exclude .svn --exclude .git --exclude \*~ $$OUT; \
- rm -rf $$OUT
+ git archive --format=tar --prefix=$$OUT/ master|gzip -9 >$$OUT.tar.gz
.PHONY: $(noconfig_targets)