From 6b4ac03ebef0dcd36699c34444ddce7a246c06aa Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 6 Nov 2013 12:56:48 -0500 Subject: [PATCH] Guard against possible accidental matches with parent dirs in Makefiles * lisp/Makefile.in (setwins_almost, setwins_for_subdirs): Avoid accidental matches. * test/automated/Makefile.in (setwins): Avoid accidental matches. --- lisp/ChangeLog | 5 +++++ lisp/Makefile.in | 4 ++-- test/ChangeLog | 4 ++++ test/automated/Makefile.in | 5 ++--- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 619bca2076b..be01a0cdc29 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-11-06 Glenn Morris + + * Makefile.in (setwins_almost, setwins_for_subdirs): + Avoid accidental matches. + 2013-11-06 Stefan Monnier * menu-bar.el (popup-menu): Use key-binding. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 9dd5a40de02..d00330c3a9b 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -117,14 +117,14 @@ setwins=for file in `find . -type d -print`; do \ # Find all subdirectories except `obsolete' and `term'. setwins_almost=for file in `find ${srcdir} -type d -print`; do \ - case $$file in */obsolete | */term ) ;; \ + case $$file in ${srcdir}*/obsolete | ${srcdir}*/term ) ;; \ *) wins="$$wins$${wins:+ }$$file" ;; \ esac; \ done # Find all subdirectories in which we might want to create subdirs.el. setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \ - case $$file in */cedet* ) ;; \ + case $$file in ${srcdir}*/cedet* ) ;; \ *) wins="$$wins$${wins:+ }$$file" ;; \ esac; \ done diff --git a/test/ChangeLog b/test/ChangeLog index e032af46af0..281ce981b5e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2013-11-06 Glenn Morris + + * automated/Makefile.in (setwins): Avoid accidental matches. + 2013-11-06 Michael Albinus * automated/tramp-tests.el (tramp-test07-file-exists-p): diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in index 63cffd9f828..617768995f1 100644 --- a/test/automated/Makefile.in +++ b/test/automated/Makefile.in @@ -39,9 +39,8 @@ emacs = unset EMACSLOADPATH; \ LC_ALL=C EMACS_TEST_DIRECTORY=$(srcdir) "$(EMACS)" $(EMACSOPT) # Common command to find subdirectories -setwins=subdirs=`find $(srcdir) -type d -print`; \ - for file in $$subdirs; do \ - case $$file in */data* | */flymake* ) ;; \ +setwins=for file in `find $(srcdir) -type d -print`; do \ + case $$file in $(srcdir)*/data* | $(srcdir)*/flymake* ) ;; \ *) wins="$$wins$${wins:+ }$$file" ;; \ esac; \ done -- 2.39.2