Makefile: add a check to bail out early when the path to the openwrt directory contai...
[openwrt/svn-archive/archive.git] / Makefile
index 44b4e944eb9b5a46d68786d8a5473f9455589690..5257a990dcc6c6ab818489759aa8679ca3253ea4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,10 @@ LC_ALL:=C
 LANG:=C
 export TOPDIR LC_ALL LANG
 
+empty:=
+space:= $(empty) $(empty)
+$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt directory must not include any spaces))
+
 world:
 
 include $(TOPDIR)/include/host.mk
@@ -40,11 +44,9 @@ else
 
 $(toolchain/stamp-install): $(tools/stamp-install)
 $(target/stamp-compile): $(toolchain/stamp-install) $(tools/stamp-install) $(BUILD_DIR)/.prepared
-$(package/stamp-cleanup): $(target/stamp-compile)
 $(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
 $(package/stamp-install): $(package/stamp-compile)
-$(package/stamp-rootfs-prepare): $(package/stamp-install)
-$(target/stamp-install): $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare)
+$(target/stamp-install): $(package/stamp-compile) $(package/stamp-install)
 
 printdb:
        @true
@@ -86,7 +88,7 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages
        fi
 
 prepare: .config $(tools/stamp-install) $(toolchain/stamp-install)
-world: prepare $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare) $(target/stamp-install) FORCE
+world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE
        $(_SINGLE)$(SUBMAKE) -r package/index
 
 # update all feeds, re-create index files, install symlinks