Browse Source

allow HW variable to start with hardware profile, f.e. make TARGET=x86 HW=ibmx40

Waldemar Brodkorb 13 years ago
parent
commit
de0e6feb77
1 changed files with 12 additions and 0 deletions
  1. 12 0
      mk/build.mk

+ 12 - 0
mk/build.mk

@@ -331,6 +331,12 @@ endif
 			|sed -e "s#^config \(.*\)#\1=y#" \
 			>> $(TOPDIR)/.defconfig; \
 	fi
+	@if [ ! -z "$(HW)" ];then \
+		grep -h "^config" target/Config.in.* \
+			|grep -i "$(HW)" \
+			|sed -e "s#^config \(.*\)#\1=y#" \
+			>> $(TOPDIR)/.defconfig; \
+	fi
 ifneq (,$(filter %_qemu,${TARGET}))
 	@echo ADK_LINUX_QEMU=y >> $(TOPDIR)/.defconfig
 endif
@@ -402,6 +408,12 @@ endif
 			|sed -e "s#^config \(.*\)#\1=y#" \
 			>> $(TOPDIR)/all.config; \
 	fi
+	@if [ ! -z "$(HW)" ];then \
+		grep -h "^config" target/Config.in.* \
+			|grep -i "$(HW)" \
+			|sed -e "s#^config \(.*\)#\1=y#" \
+			>> $(TOPDIR)/all.config; \
+	fi
 ifneq (,$(filter %_qemu,${TARGET}))
 	@echo ADK_LINUX_QEMU=y >> $(TOPDIR)/all.config
 endif