added improved watchdog driver for amazon
[openwrt.git] / include / image.mk
index 5fc87ef..b094428 100644 (file)
@@ -8,6 +8,9 @@
 include $(INCLUDE_DIR)/prereq.mk
 include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/host.mk
+
+override MAKEFLAGS=
+override MAKE:=$(SUBMAKE)
 KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
 
 ifneq ($(CONFIG_BIG_ENDIAN),y)
@@ -35,14 +38,15 @@ endef
 
 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
   ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y)
+    define Image/mkfs/jffs2/sub
+               # FIXME: removing this line will cause strange behaviour in the foreach loop below
+               $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(1) -d $(BUILD_DIR)/root
+               $(call add_jffs2_mark,$(KDIR)/root.jffs2-$(1))
+               $(call Image/Build,jffs2-$(1))
+    endef
     define Image/mkfs/jffs2
                rm -rf $(BUILD_DIR)/root/jffs
-               
-               $(foreach SZ,$(JFFS2_BLOCKSIZE),\
-                       $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e $(patsubst %k,%KiB,$(SZ)) -o $(KDIR)/root.jffs2-$(SZ) -d $(BUILD_DIR)/root; \
-                       $(call add_jffs2_mark,$(KDIR)/root.jffs2-$(SZ)); \
-                       $(call Image/Build,jffs2-$(SZ)) \
-               )
+               $(foreach SZ,$(JFFS2_BLOCKSIZE),$(call Image/mkfs/jffs2/sub,$(SZ)))
     endef
   endif
     
@@ -93,14 +97,14 @@ define BuildImage
 download:
 prepare:
 ifneq ($(IB),1)
-  compile: compile-targets
+  compile: compile-targets FORCE
        $(call Build/Compile)
 else
   compile:
 endif
 
 ifneq ($(IB),1)
-  install: compile install-targets
+  install: compile install-targets FORCE
        $(call Image/Prepare)
        $(call Image/mkfs/prepare)
        $(call Image/BuildKernel)
This page took 0.032489 seconds and 4 git commands to generate.