Browse Source

remove cleandir comment, add postconfig logic to inform user about rebuild

Waldemar Brodkorb 10 years ago
parent
commit
5614f148dc
2 changed files with 19 additions and 4 deletions
  1. 0 3
      Config.in
  2. 19 1
      mk/build.mk

+ 0 - 3
Config.in

@@ -25,9 +25,6 @@ source "target/config/Config.in.qemu"
 source "target/config/Config.in.kernelversion"
 source "target/config/Config.in.toolchain"
 
-comment "changes made below do not require make cleandir after reconfiguration"
-depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_SYSTEM
-
 menu "Target configuration"
 depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_SYSTEM
 source "target/config/Config.in.qemuopts"

+ 19 - 1
mk/build.mk

@@ -103,6 +103,7 @@ POSTCONFIG=		-@\
 	if [ -f .config.old ];then \
 		$(ADK_TOPDIR)/adk/tools/pkgrebuild;\
 		rebuild=0; \
+		cleandir=0; \
 		if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \
 			touch .rebuild.busybox;\
 			rebuild=1;\
@@ -130,10 +131,27 @@ POSTCONFIG=		-@\
 			rebuild=1;\
 		fi; \
 		if [ "$$(grep ^ADK_KERNEL_VERSION .config|md5sum)" != "$$(grep ^ADK_KERNEL_VERSION .config.old|md5sum)" ];then \
-			echo "You should rebuild with 'make cleandir'";\
+			cleandir=1;\
+			rebuild=1;\
 		fi; \
 		if [ "$$(grep ^ADK_KERNEL_ADDON .config|md5sum)" != "$$(grep ^ADK_KERNEL_ADDON .config.old|md5sum)" ];then \
 			echo "You should rebuild the kernel with 'make cleankernel'";\
+			rebuild=1;\
+		fi; \
+		if [ "$$(grep ^ADK_TARGET_USE .config|md5sum)" != "$$(grep ^ADK_TARGET_USE .config.old|md5sum)" ];then \
+			cleandir=1;\
+			rebuild=1;\
+		fi; \
+		if [ "$$(grep ^ADK_TARGET_ARCH .config|md5sum)" != "$$(grep ^ADK_TARGET_ARCH .config.old|md5sum)" ];then \
+			cleandir=1;\
+			rebuild=1;\
+		fi; \
+		if [ "$$(grep ^ADK_TARGET_SYSTEM .config|md5sum)" != "$$(grep ^ADK_TARGET_SYSTEM .config.old|md5sum)" ];then \
+			cleandir=1;\
+			rebuild=1;\
+		fi; \
+		if [ $$cleandir -eq 1 ];then \
+			echo "You should rebuild with 'make cleandir'";\
 		fi; \
 		if [ $$rebuild -eq 1 ];then \
 			cp .config .config.old;\