Update to reflect upstream repository 'https://github.com:nestlabs/nlbuild-autotools' at tag '1.6.5'.
diff --git a/third_party/nlbuild-autotools/repo/.default-version b/third_party/nlbuild-autotools/repo/.default-version
index 9edc58b..9f05f9f 100644
--- a/third_party/nlbuild-autotools/repo/.default-version
+++ b/third_party/nlbuild-autotools/repo/.default-version
@@ -1 +1 @@
-1.6.4
+1.6.5
diff --git a/third_party/nlbuild-autotools/repo/CHANGES b/third_party/nlbuild-autotools/repo/CHANGES
index ef7857f..516c8f1 100644
--- a/third_party/nlbuild-autotools/repo/CHANGES
+++ b/third_party/nlbuild-autotools/repo/CHANGES
@@ -1,3 +1,10 @@
+1.6.5 (2018-11-19)
+
+        * Addressed an issue in which the failure to make the 'repos-warning'
+          target order-only caused dependent repo paths to be repeatedly
+          and unnecessarily remade which, in turn, caused git operations
+          and the configuration or build to fail.
+
 1.6.4 (2018-11-14)
 
         * Added support for pulling down remote package dependencies using
diff --git a/third_party/nlbuild-autotools/repo/make/post/rules/repos.mak b/third_party/nlbuild-autotools/repo/make/post/rules/repos.mak
index ec76a01..51e4121 100644
--- a/third_party/nlbuild-autotools/repo/make/post/rules/repos.mak
+++ b/third_party/nlbuild-autotools/repo/make/post/rules/repos.mak
@@ -89,7 +89,7 @@
 $(2)_repo_PATH               := $$(call nlGitGetPathForRepoFromNameFromFile,$(1),$(2))
 $(2)_repo_URL                := $$(call nlGitGetURLForRepoFromNameFromFile,$(1),$(2))
 
-$(2)_repo_GIT                := $$(addsuffix $(__REPOS_GIT_SUBMODULE_STEM),$$($(2)_repo_PATH))
+$(2)_repo_GIT                := $$(addsuffix $(__REPOS_GIT_STEM),$$($(2)_repo_PATH))
 $(2)_repo_CACHE              := $(top_srcdir)$(__REPOS_GIT_MODULE_CACHE_STEM)/$$($(2)_repo_PATH)
 
 REPO_NAMES                   += $$($(2)_repo_NAME)
@@ -101,9 +101,9 @@
 # Allow a repo to be made with a path target (e.g., third_party/foo/repo) or
 # with its actual git target (e.g., third_party/foo/repo/.git).
 
-$$($(2)_repo_PATH): $$($(2)_repo_GIT)
+$$($(2)_repo_PATH): | $$($(2)_repo_GIT)
 
-$$($(2)_repo_GIT): $(REPOS_PACKAGE_GIT_PATH) repos-warning
+$$($(2)_repo_GIT): $(REPOS_PACKAGE_GIT_PATH) | repos-warning
 	$(NL_V_AT)case "$(REPOS_PULL_METHOD)" in \
 	    submodule) echo "  SUBMODULE    $$(subst $(__REPOS_GIT_SUBMODULE_STEM),,$$(@))"; \
 		if ! test -f $(__REPOS_GIT_MODULES_PATH); then \
@@ -175,6 +175,7 @@
 		$(RMDIR) -p $(addprefix $(top_srcdir),$(dir $(REPO_PATHS))) 2> /dev/null || true; \
 		$(RM) -r $(REPO_CACHES) 2> /dev/null;; \
 	    clone) $(GIT) -C $(top_srcdir) rm -rf -q --cached $(REPO_PATHS) 2> /dev/null || true; \
+		$(RM) $(REPOS_WARNING_SENTINEL); \
 		$(RM) -r $(addprefix $(top_srcdir)/,$(REPO_PATHS)); \
 		$(RMDIR) -p $(addprefix $(top_srcdir),$(dir $(REPO_PATHS))) 2> /dev/null || true;; \
             *) echo "$(REPOS_CONFIG): Unknown or unsupported pull method '$(REPOS_PULL_METHOD)'.";; \