X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/960b21b516f519374168ee3703c8dd034c147843..f4fd451258c5c7d10ea3b7a9d75d8c4fd9677c1e:/target/linux/imagebuilder/Makefile diff --git a/target/linux/imagebuilder/Makefile b/target/linux/imagebuilder/Makefile index 8da50bdd7..2c1ab1712 100644 --- a/target/linux/imagebuilder/Makefile +++ b/target/linux/imagebuilder/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# default: clean all TOPDIR:=${shell pwd} @@ -21,12 +27,12 @@ endef include ./kernel.mk -clean: +clean: FORCE @rm -rf $(LINUX_BUILD_DIR)/root* @rm -rf $(BIN_DIR) all: -build: +build: FORCE echo echo '### BUILDING IMAGE FROM lists/$(LIST).$(BOARD)-$(KERNEL)' echo @@ -36,7 +42,14 @@ build: mkdir -p $(LINUX_BUILD_DIR)/root echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf $(IPKG_KERNEL) install $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk - for package in `cat lists/$(LIST).$(BOARD)-$(KERNEL)`; do \ + for package in `grep -v '^#' lists/$(LIST).$(BOARD)-$(KERNEL)`; do \ $(IPKG_KERNEL) install `ls packages/$${package}_*`; \ done + if [ -d ./files ]; then \ + $(CP) --remove-destination ./files/* $(LINUX_BUILD_DIR)/root; \ + fi + if [ -d ./files.$(LIST) ]; then \ + $(CP) --remove-destination ./files.$(LIST)/* $(LINUX_BUILD_DIR)/root; \ + fi + find $(LINUX_BUILD_DIR)/root -name '.svn' || 'CVS' | xargs rm -rf $(MAKE) -S -C image KERNEL="$(KERNEL)" BOARD="$(BOARD)" BIN_DIR="$(BIN_DIR)/$(LIST)" install