clean up a few things in image build makefiles and fix unnecessary grub rebuilds
authorFelix Fietkau <nbd@openwrt.org>
Sun, 25 Feb 2007 18:20:34 +0000 (18:20 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 25 Feb 2007 18:20:34 +0000 (18:20 +0000)
SVN-Revision: 6360

target/Makefile
target/linux/brcm-2.4/image/Makefile
target/linux/brcm63xx-2.6/image/Makefile
target/linux/magicbox-2.6/image/Makefile
target/linux/rdc-2.6/image/Makefile
target/linux/x86-2.6/image/grub/Makefile

index 3f97b9a14da72ca3b04075d2b52c6a64d3b7a8f1..724ac4450d4bff3999b881da8fbbf20beb16b8ac 100644 (file)
@@ -20,7 +20,7 @@ IMAGE_DIR:=linux/$(BOARD)-$(KERNEL)/image
 download: $(patsubst %,%-download,$(TARGETS-y))
 prepare: linux-prepare
 compile: linux-compile image_compile
-install: image_clean linux-install image_install 
+install: linux-install image_install 
 
 ifeq ($(CONFIG_SDK),y)
 install: sdk_install
index 91cf60ce30d9e2aefd24f3a2ba07f79f26ba3694..41bd1c89cd3a289720b2aa8a97eba5716f6a5c18 100644 (file)
@@ -7,21 +7,18 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-define Build/Compile
-       rm -f $(KDIR)/loader.gz
-       $(MAKE) -C lzma-loader \
-               BUILD_DIR="$(KDIR)" \
-               TARGET="$(KDIR)" \
-               install
-       echo -ne "\\x00" >> $(KDIR)/loader.gz
-endef
-
 define Build/Clean
        $(MAKE) -C lzma-loader clean
 endef
 
 define Image/Prepare
        cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
+       rm -f $(KDIR)/loader.gz
+       $(MAKE) -C lzma-loader \
+               BUILD_DIR="$(KDIR)" \
+               TARGET="$(KDIR)" \
+               clean install
+       echo -ne "\\x00" >> $(KDIR)/loader.gz
 endef
 
 ifneq ($(KERNEL),2.4)
index 5c16f0541c6d034b9396653fcb4d49a3c701e04e..51c658a0937ae4fc26a9e0ca4048107cfdf2abf2 100644 (file)
@@ -23,7 +23,7 @@ endef
 
 define Image/Prepare
        cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
-       $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) compile
+       $(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean compile
 endef
 
 define Image/Build
index 77ff88f52140c8b1912143e3cfd131c73db90d36..fe68f35d5e9b69f350251f2170a8b089e8be0c2f 100644 (file)
@@ -7,9 +7,6 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-define Build/Clean
-endef
-
 define Image/Prepare
        cp $(LINUX_DIR)/arch/ppc/boot/images/uImage $(KDIR)/uImage
 endef
index 078e754e1083fc27dbd154ded312a4f74c70c65f..f8398baadb98c2e1109c14ed564c0799c05b81b1 100644 (file)
@@ -7,9 +7,6 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-define Build/Clean
-endef
-
 define Image/Prepare
        $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $(KDIR)/bzImage
 endef
index 365b327622a022217d3944095833206da5162f9f..d37803012c8956227e2614f5ed08b596ad726b3b 100644 (file)
@@ -23,34 +23,19 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/grub-$(PKG_VERSION)
 include $(INCLUDE_DIR)/package.mk
 
 ifeq ($(HOST_ARCH),x86_64)
-  define Build/Configure
-       (cd $(PKG_BUILD_DIR); \
-               LDFLAGS="-static" \
-               ./configure \
-               --target=$(GNU_TARGET_NAME) \
-               --host=$(GNU_TARGET_NAME) \
-               --build=$(GNU_HOST_NAME) \
-               --program-prefix="" \
-               --program-suffix="" \
-               --prefix=/usr \
-               --exec-prefix=/usr \
-               --bindir=/usr/bin \
-               --sbindir=/usr/sbin \
-               --libexecdir=/usr/lib \
-               --sysconfdir=/etc \
-               --datadir=/usr/share \
-               --localstatedir=/var \
-               --mandir=/usr/man \
-               --infodir=/usr/info \
-               $(DISABLE_NLS) \
-               --disable-auto-linux-mem-opt \
-       )
-  endef
+CONFIGURE_FLAGS:= \
+       --target=$(GNU_TARGET_NAME) \
+       --host=$(GNU_TARGET_NAME) \
+       --build=$(GNU_HOST_NAME)
 else
-  define Build/Configure
+CONFIGURE_FLAGS:=
+endif
+
+define Build/Configure
        (cd $(PKG_BUILD_DIR); \
                LDFLAGS="-static" \
                ./configure \
+               $(CONFIGURE_FLAGS) \
                --program-prefix="" \
                --program-suffix="" \
                --prefix=/usr \
@@ -66,8 +51,7 @@ else
                $(DISABLE_NLS) \
                --disable-auto-linux-mem-opt \
        )
-  endef
-endif
+endef
 
 #
 # ./configure detects whether the host compiler supports