aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2015-06-04 21:02:26 -0400
committerGlenn Morris2015-06-04 21:02:26 -0400
commit0382a9346547e886445d4fecd920710c61d52e0c (patch)
treea0a3c044c41b9e2ea3978e24c3d6ece9b5759668
parent09cefee10c63731e5a7f4af3db9ac0359fe5b4b4 (diff)
downloademacs-0382a9346547e886445d4fecd920710c61d52e0c.tar.gz
emacs-0382a9346547e886445d4fecd920710c61d52e0c.zip
* lisp/Makefile.in: Replace shell fragments in variables with $(shell).
(SUBDIRS_REL, SUBDIRS_ABS, SUBDIRS_ALMOST, SUBDIRS_FINDER) (SUBDIRS_SUBDIRS): New variables. (setwins, setwins_almost, setwins_finder, setwins_for_subdirs): Remove. ($(lisp)/cus-load.el, $(lisp)/finder-inf.el, $(lisp)/loaddefs.el) (update-subdirs, compile-main, compile-clean): Replace "setwins" usage with new "SUBDIRS" variables.
-rw-r--r--lisp/Makefile.in72
1 files changed, 24 insertions, 48 deletions
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index d8045bb4edc..23b0e3f3d44 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -115,36 +115,16 @@ unexport EMACSDATA EMACSDOC EMACSPATH
115# Prevent any setting of EMACSLOADPATH in user environment causing problems. 115# Prevent any setting of EMACSLOADPATH in user environment causing problems.
116emacs = EMACSLOADPATH= '$(EMACS)' $(EMACSOPT) 116emacs = EMACSLOADPATH= '$(EMACS)' $(EMACSOPT)
117 117
118# Common command to find subdirectories 118SUBDIRS_REL = $(sort $(shell cd ${srcdir} && find . -type d -print))
119setwins=for file in `find . -type d -print`; do \ 119SUBDIRS_ABS = $(sort $(shell find ${srcdir} -type d -print))
120 case $$file in */.* ) ;; \ 120## All subdirectories except 'obsolete' and 'term'.
121 *) wins="$$wins$${wins:+ }$$file" ;; \ 121SUBDIRS_ALMOST = $(filter-out ${srcdir}/obsolete ${srcdir}/term,${SUBDIRS_ABS})
122 esac; \ 122## All subdirectories except 'obsolete', 'term', and 'leim' (and subdirs).
123 done 123## We don't want the leim files listed as packages, especially
124 124## since many share basenames with files in language/.
125# Find all subdirectories except `obsolete' and `term'. 125SUBDIRS_FINDER = $(filter-out ${srcdir}/leim%,${SUBDIRS_ALMOST})
126setwins_almost=for file in `find ${srcdir} -type d -print`; do \ 126## All subdirectories in which we might want to create subdirs.el.
127 case $$file in ${srcdir}*/obsolete | ${srcdir}*/term ) ;; \ 127SUBDIRS_SUBDIRS = $(filter-out ${srcdir}/cedet% ${srcdir}/leim%,${SUBDIRS_ABS})
128 *) wins="$$wins$${wins:+ }$$file" ;; \
129 esac; \
130 done
131
132# Find all subdirectories except `obsolete', `term', and `leim' (and subdirs).
133# We don't want the leim files listed as packages, especially
134# since many share basenames with files in language/.
135setwins_finder=for file in `find ${srcdir} -type d -print`; do \
136 case $$file in ${srcdir}*/obsolete | ${srcdir}*/term | ${srcdir}*/leim* ) ;; \
137 *) wins="$$wins$${wins:+ }$$file" ;; \
138 esac; \
139 done
140
141# Find all subdirectories in which we might want to create subdirs.el.
142setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \
143 case $$file in \
144 ${srcdir}*/cedet* | ${srcdir}*/leim* ) ;; \
145 *) wins="$$wins$${wins:+ }$$file" ;; \
146 esac; \
147 done
148 128
149# cus-load and finder-inf are not explicitly requested by anything, so 129# cus-load and finder-inf are not explicitly requested by anything, so
150# we add them here to make sure they get built. 130# we add them here to make sure they get built.
@@ -170,21 +150,19 @@ PHONY_EXTRAS =
170custom-deps: 150custom-deps:
171 $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/cus-load.el $(lisp)/cus-load.el 151 $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/cus-load.el $(lisp)/cus-load.el
172$(lisp)/cus-load.el: 152$(lisp)/cus-load.el:
173 $(AM_V_GEN)$(setwins_almost); \ 153 @echo Directories: ${SUBDIRS_ALMOST}
174 echo Directories: $$wins; \ 154 $(AM_V_GEN)$(emacs) -l cus-dep \
175 $(emacs) -l cus-dep \
176 --eval '(setq generated-custom-dependencies-file (unmsys--file-name "$(srcdir)/cus-load.el"))' \ 155 --eval '(setq generated-custom-dependencies-file (unmsys--file-name "$(srcdir)/cus-load.el"))' \
177 -f custom-make-dependencies $$wins 156 -f custom-make-dependencies ${SUBDIRS_ALMOST}
178 157
179finder-data: 158finder-data:
180 $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/finder-inf.el \ 159 $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/finder-inf.el \
181 $(lisp)/finder-inf.el 160 $(lisp)/finder-inf.el
182$(lisp)/finder-inf.el: 161$(lisp)/finder-inf.el:
183 $(AM_V_GEN)$(setwins_finder); \ 162 @echo Directories: ${SUBDIRS_FINDER}
184 echo Directories: $$wins; \ 163 $(AM_V_GEN)$(emacs) -l finder \
185 $(emacs) -l finder \
186 --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(srcdir)/finder-inf.el"))' \ 164 --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(srcdir)/finder-inf.el"))' \
187 -f finder-compile-keywords-make-dist $$wins 165 -f finder-compile-keywords-make-dist ${SUBDIRS_FINDER}
188 166
189# Use expand-file-name rather than $abs_scrdir so that Emacs does not 167# Use expand-file-name rather than $abs_scrdir so that Emacs does not
190# get confused when it compares file-names for equality. 168# get confused when it compares file-names for equality.
@@ -194,21 +172,19 @@ $(lisp)/finder-inf.el:
194# and make this depend on leim. 172# and make this depend on leim.
195autoloads .PHONY: $(lisp)/loaddefs.el 173autoloads .PHONY: $(lisp)/loaddefs.el
196$(lisp)/loaddefs.el: $(LOADDEFS) 174$(lisp)/loaddefs.el: $(LOADDEFS)
197 $(AM_V_GEN)$(setwins_almost); \ 175 @echo Directories: ${SUBDIRS_ALMOST}
198 echo Directories: $$wins; \ 176 $(AM_V_GEN)$(emacs) -l autoload \
199 $(emacs) -l autoload \
200 --eval '(setq autoload-ensure-writable t)' \ 177 --eval '(setq autoload-ensure-writable t)' \
201 --eval '(setq autoload-builtin-package-versions t)' \ 178 --eval '(setq autoload-builtin-package-versions t)' \
202 --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$@")))' \ 179 --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$@")))' \
203 -f batch-update-autoloads $$wins 180 -f batch-update-autoloads ${SUBDIRS_ALMOST}
204 181
205# This is required by the bootstrap-emacs target in ../src/Makefile, so 182# This is required by the bootstrap-emacs target in ../src/Makefile, so
206# we know that if we have an emacs executable, we also have a subdirs.el. 183# we know that if we have an emacs executable, we also have a subdirs.el.
207$(lisp)/subdirs.el: 184$(lisp)/subdirs.el:
208 $(AM_V_GEN)$(MAKE) update-subdirs 185 $(AM_V_GEN)$(MAKE) update-subdirs
209update-subdirs: 186update-subdirs:
210 $(AM_V_at)$(setwins_for_subdirs); \ 187 $(AM_V_at)for file in ${SUBDIRS_SUBDIRS}; do \
211 for file in $$wins; do \
212 $(srcdir)/../build-aux/update-subdirs $$file; \ 188 $(srcdir)/../build-aux/update-subdirs $$file; \
213 done; 189 done;
214 190
@@ -307,8 +283,8 @@ compile-targets: $(TARGETS)
307# Compile all the Elisp files that need it. Beware: it approximates 283# Compile all the Elisp files that need it. Beware: it approximates
308# `no-byte-compile', so watch out for false-positives! 284# `no-byte-compile', so watch out for false-positives!
309compile-main: leim semantic compile-clean 285compile-main: leim semantic compile-clean
310 @(cd $(lisp) && $(setwins); \ 286 @(cd $(lisp) && \
311 els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \ 287 els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
312 for el in $$els; do \ 288 for el in $$els; do \
313 test -f $$el || continue; \ 289 test -f $$el || continue; \
314 test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \ 290 test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
@@ -321,8 +297,8 @@ compile-main: leim semantic compile-clean
321.PHONY: compile-clean 297.PHONY: compile-clean
322# Erase left-over .elc files that do not have a corresponding .el file. 298# Erase left-over .elc files that do not have a corresponding .el file.
323compile-clean: 299compile-clean:
324 @cd $(lisp) && $(setwins); \ 300 @cd $(lisp) && \
325 elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \ 301 elcs=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \
326 for el in `echo $$elcs | sed -e 's/\.elc/\.el/g'`; do \ 302 for el in `echo $$elcs | sed -e 's/\.elc/\.el/g'`; do \
327 if test -f "$$el" || test ! -f "$${el}c"; then :; else \ 303 if test -f "$$el" || test ! -f "$${el}c"; then :; else \
328 echo rm "$${el}c"; \ 304 echo rm "$${el}c"; \