Fix the annoying base-files autorebuild bug. When checking file mtimes in directories...
authorFelix Fietkau <nbd@openwrt.org>
Fri, 12 Jan 2007 11:09:05 +0000 (11:09 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 12 Jan 2007 11:09:05 +0000 (11:09 +0000)
SVN-Revision: 6084

include/package.mk
package/base-files/Makefile
scripts/timestamp.pl

index 1b69cf25d6adca8bb79d3f570a203c208e0daf81..ffab228aae783abdf10a875146e5ff1c24b85a33 100644 (file)
@@ -21,7 +21,7 @@ define Build/DefaultTargets
   ifeq ($(DUMP),)
     ifeq ($(CONFIG_AUTOREBUILD),y)
       _INFO:=
-      ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR))
+      ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(PKG_FILE_DEPEND)),$(PKG_BUILD_DIR))
         _INFO+=$(subst $(TOPDIR)/,,$(PKG_BUILD_DIR))
         $(PKG_BUILD_DIR)/.prepared: package-clean
       endif
index 14917f683be991d802608a77048489171534eb8c..33e6522e7ecf3416284f4f38e55c644f7db4b755 100644 (file)
@@ -13,6 +13,7 @@ PKG_NAME:=base-files
 PKG_RELEASE:=8
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
+PKG_FILE_DEPEND:=$(PLATFORM_DIR)
 
 REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
 ifeq ($(REV),)
index a3aa50cb0dffe23fbdcbf9f26da58d0328bcbe28..a4c5cae0150822434544dd8412d6db9b5db9ee0a 100755 (executable)
@@ -17,9 +17,8 @@ sub get_ts($$) {
        while (<FIND>) {
                chomp;
                my $file = $_;
-               open FILE, "<$file";
-               my @stat = stat FILE;
-               close FILE;
+               next if -l $file;
+               my @stat = stat $file;
                if ($stat[9] > $ts) {
                        $ts = $stat[9];
                        $fn = $file;