aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--package/Makefile.in42
-rw-r--r--project/Makefile.in44
3 files changed, 57 insertions, 45 deletions
diff --git a/Makefile b/Makefile
index 9a52b0b8d7..2cbb7275d8 100644
--- a/Makefile
+++ b/Makefile
@@ -150,8 +150,6 @@ LIBTGTEXT=.so
endif
PREFERRED_LIB_FLAGS:=--enable-static --enable-shared
-BR2_DEPENDS_DIR=$(BASE_DIR)/package/config/buildroot-config/
-
##############################################################
#
# The list of stuff to build for the target toolchain
@@ -165,7 +163,11 @@ BASE_TARGETS:=uclibc
endif
TARGETS:=
+# setup uor pathes
include project/Makefile.in
+
+BR2_DEPENDS_DIR=$(PROJECT_BUILD_DIR)/buildroot-config
+
include toolchain/Makefile.in
include package/Makefile.in
@@ -211,7 +213,12 @@ TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
# all targets depend on the crosscompiler and it's prerequisites
$(TARGETS): $(BASE_TARGETS)
+$(BR2_DEPENDS_DIR): .config
+ rm -rf $@
+ cp -dpRf $(CONFIG)/buildroot-config $@
+
dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
+ $(BR2_DEPENDS_DIR) \
$(BINARIES_DIR) $(PROJECT_BUILD_DIR)
$(BASE_TARGETS): dirs
@@ -223,6 +230,7 @@ world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS)
$(BASE_TARGETS) $(TARGETS) \
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
+ $(BR2_DEPENDS_DIR) \
$(BINARIES_DIR) $(PROJECT_BUILD_DIR)
#############################################################
@@ -260,7 +268,7 @@ $(PROJECT_BUILD_DIR)/.root:
-find $(TARGET_DIR) -type d -name .svn | xargs rm -rf
touch $@
-$(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
+$(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
erase-fakeroots:
rm -f $(PROJECT_BUILD_DIR)/.fakeroot*
@@ -310,11 +318,13 @@ HOSTCFLAGS=$(CFLAGS_FOR_BUILD)
export HOSTCFLAGS
$(CONFIG)/conf:
+ @mkdir -p $(CONFIG)/buildroot-config
$(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf
-@if [ ! -f .config ] ; then \
cp $(CONFIG_DEFCONFIG) .config; \
fi
$(CONFIG)/mconf:
+ @mkdir -p $(CONFIG)/buildroot-config
$(MAKE) CC="$(HOSTCC)" -C $(CONFIG) conf mconf
-@if [ ! -f .config ] ; then \
cp $(CONFIG_DEFCONFIG) .config; \
diff --git a/package/Makefile.in b/package/Makefile.in
index 44a32d8c9f..8f0aefe651 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -9,20 +9,6 @@ HOSTMAKE :=$(shell $(CONFIG_SHELL) -c "which $(HOSTMAKE)" || type -p $(HOSTMAKE
MAKE1:=$(HOSTMAKE) MAKE="$(firstword $(HOSTMAKE)) -j1"
MAKE:=$(HOSTMAKE) -j$(BR2_JLEVEL)
-# Strip off the annoying quoting
-ARCH:=$(strip $(subst ",, $(BR2_ARCH)))
-#"))
-WGET:=$(strip $(subst ",, $(BR2_WGET))) $(SPIDER)
-#"))
-SVN:=$(strip $(subst ",, $(BR2_SVN)))
-#"))
-ZCAT:=$(strip $(subst ",, $(BR2_ZCAT)))
-#"))
-BZCAT:=$(strip $(subst ",, $(BR2_BZCAT)))
-#"))
-TAR_OPTIONS=$(subst ",, $(BR2_TAR_OPTIONS)) -xf
-#")
-
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) \
@@ -72,34 +58,6 @@ endif
#########################################################################
-BASE_DIR:=$(shell pwd)
-
-TOPDIR_PREFIX:=$(strip $(subst ",, $(BR2_TOPDIR_PREFIX)))_
-#"))
-TOPDIR_SUFFIX:=_$(strip $(subst ",, $(BR2_TOPDIR_SUFFIX)))
-#"))
-ifeq ($(TOPDIR_PREFIX),_)
-TOPDIR_PREFIX:=
-endif
-ifeq ($(TOPDIR_SUFFIX),_)
-TOPDIR_SUFFIX:=
-endif
-
-DL_DIR=$(strip $(subst ",, $(BR2_DL_DIR)))
-#"))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(BASE_DIR)/dl
-endif
-#PATCH_DIR=$(BASE_DIR)/sources/patches
-
-# All non-configurable packages should be built in BUILD_DIR
-BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
-
-GNU_TARGET_SUFFIX:=-$(strip $(subst ",, $(BR2_GNU_TARGET_SUFFIX)))
-#"))
-
-STAGING_DIR:=$(strip $(subst ",, $(BR2_STAGING_DIR)))
-#"))
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
diff --git a/project/Makefile.in b/project/Makefile.in
index 2e8ee1b22d..3c73bb93d3 100644
--- a/project/Makefile.in
+++ b/project/Makefile.in
@@ -5,6 +5,50 @@ TARGET_HOSTNAME:=$(strip $(subst ",,$(BR2_HOSTNAME)))
BANNER:=$(strip $(subst ",,$(BR2_BANNER)))
#"))
+
+# Strip off the annoying quoting
+ARCH:=$(strip $(subst ",, $(BR2_ARCH)))
+#"))
+WGET:=$(strip $(subst ",, $(BR2_WGET))) $(SPIDER)
+#"))
+SVN:=$(strip $(subst ",, $(BR2_SVN)))
+#"))
+ZCAT:=$(strip $(subst ",, $(BR2_ZCAT)))
+#"))
+BZCAT:=$(strip $(subst ",, $(BR2_BZCAT)))
+#"))
+TAR_OPTIONS=$(subst ",, $(BR2_TAR_OPTIONS)) -xf
+#")
+
+
+BASE_DIR:=$(shell pwd)
+
+TOPDIR_PREFIX:=$(strip $(subst ",, $(BR2_TOPDIR_PREFIX)))_
+#"))
+TOPDIR_SUFFIX:=_$(strip $(subst ",, $(BR2_TOPDIR_SUFFIX)))
+#"))
+ifeq ($(TOPDIR_PREFIX),_)
+TOPDIR_PREFIX:=
+endif
+ifeq ($(TOPDIR_SUFFIX),_)
+TOPDIR_SUFFIX:=
+endif
+
+DL_DIR=$(strip $(subst ",, $(BR2_DL_DIR)))
+#"))
+ifeq ($(DL_DIR),)
+DL_DIR:=$(BASE_DIR)/dl
+endif
+
+# All non-configurable packages should be built in BUILD_DIR
+BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
+
+GNU_TARGET_SUFFIX:=-$(strip $(subst ",, $(BR2_GNU_TARGET_SUFFIX)))
+#"))
+
+STAGING_DIR:=$(strip $(subst ",, $(BR2_STAGING_DIR)))
+#"))
+
# All configurable packages (like Busybox,Linux etc) should be built
# in PROJECT_BUILD_DIR
PROJECT_BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)project_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)/$(PROJECT)