changeset 25964:2a98301789cd

(setwins): generalized a little. (compile, bootstrap-compile, autoloads-with-other-emacs): use it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 10 Oct 1999 01:32:09 +0000
parents cc89cf824a72
children a31ee90585ca
files lisp/Makefile
diffstat 1 files changed, 12 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/Makefile	Sun Oct 10 01:22:34 1999 +0000
+++ b/lisp/Makefile	Sun Oct 10 01:32:09 1999 +0000
@@ -52,7 +52,7 @@
 
 # Common command to find subdirectories
 
-setwins=subdirs=`find . -type d -print`; \
+setwins=subdirs=`find $$wd -type d -print`; \
 	for file in $$subdirs; do \
 	   case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
 		*) wins="$$wins $$file" ;; \
@@ -62,28 +62,28 @@
 doit:
 
 custom-deps: doit
-	$(setwins); \
+	wd=.; $(setwins); \
 	echo Directories: $$wins; \
 	$(emacs) -l cus-dep -f custom-make-dependencies $$wins
 
 finder-data: doit
-	$(setwins); \
+	wd=.; $(setwins); \
 	echo Directories: $$wins; \
 	$(emacs) -l finder -f finder-compile-keywords-make-dist $$wins
 
 autoloads: doit
-	$(setwins); \
+	wd=.; $(setwins); \
 	echo Directories: $$wins; \
 	$(emacs) -f batch-update-autoloads $$wins
 
 update-subdirs: doit
-	$(setwins); \
+	wd=.; $(setwins); \
 	for file in $$wins; do \
 	   ../update-subdirs $$file; \
 	done;
 
 updates: doit
-	$(setwins); \
+	wd=.; $(setwins); \
 	for file in $$wins; do \
 	   ../update-subdirs $$file; \
 	done; \
@@ -112,14 +112,8 @@
 compile: doit
 	wd=`pwd`;						\
 	find $$wd -name "*.elc" -print | xargs chmod +w;	\
-	subdirs=`find $$wd -type d -print`; 			\
-	for dir in $$subdirs; do 				\
-	   case $$dir in 					\
-	     */Old | */RCS | */CVS | */=* ) ;; 			\
-	     *) loadpath="$$loadpath \"$$dir\"" ;; 		\
-	   esac; 						\
-        done; 							\
-	loadpath="(setq load-path '($$loadpath))";		\
+	$(setwins)						\
+	loadpath="(setq load-path '($$wins))";			\
 	dont_compile=`echo $(DONTCOMPILE)`;			\
 	for el in $(EL); do					\
 	  compile_it=y;						\
@@ -142,14 +136,8 @@
 bootstrap-compile: doit
 	wd=`pwd`;						\
 	find $$wd -name "*.elc" -print | xargs rm -f            \
-	subdirs=`find $$wd -type d -print`; 			\
-	for dir in $$subdirs; do 				\
-	   case $$dir in 					\
-	     */Old | */RCS | */CVS | */=* ) ;; 			\
-	     *) loadpath="$$loadpath \"$$dir\"" ;; 		\
-	   esac; 						\
-        done; 							\
-	loadpath="(setq load-path '($$loadpath))";		\
+	$(setwins)						\
+	loadpath="(setq load-path '($$wins))";			\
 	dont_compile=`echo $(DONTCOMPILE)`;			\
 	for el in $(EL); do					\
 	  compile_it=y;						\
@@ -178,14 +166,10 @@
 # autoload.el reads and writes loaddefs.el in its `source-directory'.
 # If that's different from the current directory tree, we can't build
 # loaddefs.el.
+#   Can't this rule be used in place of `autoload'? -sm
 
 autoloads-with-other-emacs: doit
-	subdirs=`find . -type d -print`;			\
-	for file in $$subdirs; do				\
-	   case $$file in */Old | */RCS | */CVS | */=* ) ;;	\
-		*) wins="$$wins $$file" ;;			\
-	   esac;						\
-        done;							\
+	wd=.; $(setwins);						\
 	echo Directories: $$wins;				\
 	$(emacs) --eval '(setq source-directory ".")'		\
 		-f batch-update-autoloads $$wins