comparison lisp/Makefile @ 25941:aff7b4b37817

(bootstrap-compile): New target. Compile Lisp files with ../src/temacs.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 08 Oct 1999 23:24:28 +0000
parents 3223912646d8
children 24f775e3facc
comparison
equal deleted inserted replaced
25940:3d7b096fb086 25941:aff7b4b37817
43 EL = $(lisptagsfiles1) $(lisptagsfiles2) 43 EL = $(lisptagsfiles1) $(lisptagsfiles2)
44 44
45 # The actual Emacs command run in the targets below. 45 # The actual Emacs command run in the targets below.
46 46
47 emacs = $(EMACS) $(EMACSOPT) 47 emacs = $(EMACS) $(EMACSOPT)
48
49 # The Emacs used to compile Lisp files from scratch.
50
51 temacs=../src/temacs -batch -l ./loadup.el
48 52
49 53
50 doit: 54 doit:
51 55
52 custom-deps: doit 56 custom-deps: doit
122 # make sure require's and load's in the files being compiled find 126 # make sure require's and load's in the files being compiled find
123 # the right files. 127 # the right files.
124 128
125 compile: doit 129 compile: doit
126 wd=`pwd`; \ 130 wd=`pwd`; \
127 find $$wd -name "*.elc" | xargs chmod +w; \ 131 find $$wd -name "*.elc" -print | xargs chmod +w; \
128 subdirs=`find $$wd -type d -print`; \ 132 subdirs=`find $$wd -type d -print`; \
129 for dir in $$subdirs; do \ 133 for dir in $$subdirs; do \
130 case $$dir in \ 134 case $$dir in \
131 */Old | */RCS | */CVS | */=* ) ;; \ 135 */Old | */RCS | */CVS | */=* ) ;; \
132 *) loadpath="$$loadpath \"$$dir\"" ;; \ 136 *) loadpath="$$loadpath \"$$dir\"" ;; \
146 else \ 150 else \
147 echo "Don't compile $$el"; \ 151 echo "Don't compile $$el"; \
148 fi; \ 152 fi; \
149 done 153 done
150 154
155 # Compile Lisp files when all we have is the temacs in ../src. All
156 # .elc files under the current directory are deleted first to make
157 # sure we start from a clean basis.
158
159 bootstrap-compile: doit
160 wd=`pwd`; \
161 find $$wd -name "*.elc" -print | xargs rm -f \
162 subdirs=`find $$wd -type d -print`; \
163 for dir in $$subdirs; do \
164 case $$dir in \
165 */Old | */RCS | */CVS | */=* ) ;; \
166 *) loadpath="$$loadpath \"$$dir\"" ;; \
167 esac; \
168 done; \
169 loadpath="(setq load-path '($$loadpath))"; \
170 dont_compile=`echo $(DONTCOMPILE)`; \
171 for el in $(EL); do \
172 compile_it=y; \
173 for dont in $$dont_compile; do \
174 if test $$el = $$dont; then \
175 compile_it=n; \
176 fi; \
177 done; \
178 if test $$compile_it = y; then \
179 $(temacs) --eval "$$loadpath" -f batch-byte-compile $$el; \
180 else \
181 echo "Don't compile $$el"; \
182 fi; \
183 done
184
185
151 # Recompile all Lisp files which are newer than their .elc files. 186 # Recompile all Lisp files which are newer than their .elc files.
152 # Note that this doesn't create .elc files. It only recompiles if an 187 # Note that this doesn't create .elc files. It only recompiles if an
153 # .elc is present. 188 # .elc is present.
154 189
155 recompile: doit 190 recompile: doit