(Fplist_member): Renamed from Fwidget_plist_member.
[emacs.git] / lisp / Makefile.in
blob08d2b770969dac6186f3e58d80d1756d4304de17
2 # Maintenance productions for the Lisp directory
5 SHELL = /bin/sh
7 lisp=@srcdir@
8 VPATH=@srcdir@
9 srcdir=@srcdir@/..
11 # You can specify a different executable on the make command line,
12 # e.g. "make EMACS=../src/emacs ...".
14 EMACS = ../src/emacs
16 # Command line flags for Emacs. This must include --multibyte,
17 # otherwise some files will not compile.
19 EMACSOPT = -batch --no-site-file --multibyte
21 SOURCES = *.el COPYING Makefile
22 lisptagsfiles1 = $(lisp)/[a-zA-Z]*.el
23 lisptagsfiles2 = $(lisp)/[a-zA-Z]*/[a-zA-Z]*.el
24 ETAGS = ../lib-src/etags
26 # Files which should not be compiled.
27 # - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's
28 # no point compiling it, although it doesn't hurt.
30 DONTCOMPILE = \
31 $(lisp)/bindings.el \
32 $(lisp)/cus-load.el \
33 $(lisp)/cus-start.el \
34 $(lisp)/emacs-lisp/cl-specs.el \
35 $(lisp)/eshell/esh-maint.el \
36 $(lisp)/eshell/esh-group.el \
37 $(lisp)/finder-inf.el \
38 $(lisp)/forms-d2.el \
39 $(lisp)/forms-pass.el \
40 $(lisp)/generic-x.el \
41 $(lisp)/international/latin-1.el \
42 $(lisp)/international/latin-2.el \
43 $(lisp)/international/latin-3.el \
44 $(lisp)/international/latin-4.el \
45 $(lisp)/international/latin-5.el \
46 $(lisp)/international/latin-8.el \
47 $(lisp)/international/latin-9.el \
48 $(lisp)/international/mule-conf.el \
49 $(lisp)/loaddefs.el \
50 $(lisp)/loadup.el \
51 $(lisp)/mail/blessmail.el \
52 $(lisp)/mail/sc.el \
53 $(lisp)/patcomp.el \
54 $(lisp)/paths.el \
55 $(lisp)/play/bruce.el \
56 $(lisp)/subdirs.el \
57 $(lisp)/term/internal.el \
58 $(lisp)/version.el
60 # Files to compile before others during a bootstrap. This is done
61 # to speed up the bootstrap process.
63 COMPILE_FIRST = \
64 $(lisp)/emacs-lisp/byte-opt.el \
65 $(lisp)/emacs-lisp/bytecomp.el \
66 $(lisp)/subr.el
68 # The actual Emacs command run in the targets below.
70 emacs = $(EMACS) $(EMACSOPT)
72 # Common command to find subdirectories
74 setwins=subdirs=`find $$wd -type d -print`; \
75 for file in $$subdirs; do \
76 case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
77 *) wins="$$wins $$file" ;; \
78 esac; \
79 done
81 doit:
83 cus-load.el:
84 touch $@
85 custom-deps: cus-load.el doit
86 wd=$(lisp); $(setwins); \
87 echo Directories: $$wins; \
88 $(emacs) -l cus-dep -f custom-make-dependencies $$wins
90 finder-inf.el:
91 echo "(provide 'finder-inf)" >> $@
92 finder-data: finder-inf.el doit
93 wd=$(lisp); $(setwins); \
94 echo Directories: $$wins; \
95 $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins
97 loaddefs.el:
98 echo ";;; loaddefs.el --- automatically extracted autoloads" >> $@
99 echo ";;" >> $@; echo ";;; Code:" >> $@
100 echo "\f" >> $@
101 echo ";;; Local Variables:" >> $@
102 echo ";;; version-control: never" >> $@
103 echo ";;; no-byte-compile: t" >> $@
104 echo ";;; no-update-autoloads: t" >> $@
105 echo ";;; End:" >> $@
106 echo ";;; loaddefs.el ends here" >> $@
107 autoloads: loaddefs.el doit
108 wd=$(lisp); $(setwins); \
109 echo Directories: $$wins; \
110 $(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
112 subdirs.el:
113 $(MAKE) $(MFLAGS) update-subdirs
114 update-subdirs: doit
115 wd=$(lisp); $(setwins); \
116 for file in $$wins; do \
117 $(srcdir)/update-subdirs $$file; \
118 done;
120 updates: update-subdirs autoloads finder-data custom-deps
122 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
123 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2)
125 TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
126 ${ETAGS} -o TAGS-LISP \
127 $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
129 .el.elc: subdirs.el
130 -EMACSLOADPATH=$(lisp) $(emacs) -f batch-byte-compile $<
132 $(DONTCOMPILE:.el=.elc):
133 -rm -f $@
135 # Compile all Lisp files, except those from DONTCOMPILE. This
136 # compiles files unconditionally. All .elc files are made writable
137 # before compilation in case we checked out read-only (CVS option -r).
138 # Files MUST be compiled one by one. If we compile several files in a
139 # row we can't make sure that the compilation environment is clean.
140 # We also set the load-path of the Emacs used for compilation to the
141 # current directory and its subdirectories, to make sure require's and
142 # load's in the files being compiled find the right files.
144 compile-files: subdirs.el doit
145 find $(lisp) -name "*.elc" -print | xargs chmod +w; \
146 wd=$(lisp); $(setwins); \
147 elpat=`echo $$wins | tr ' ' '\012\012' | \
148 sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \
149 els=`echo $$elpat $(DONTCOMPILE) $(COMPILE_FIRST) | \
150 tr ' ' '\012\012' | sort | uniq -u`; \
151 for el in $(COMPILE_FIRST) $$els; do \
152 echo Compiling $$el; \
153 EMACSLOADPATH=$(lisp) $(emacs) -f batch-byte-compile $$el; \
154 done
156 # Backup compiled Lisp files in elc.tar.gz. If that file already
157 # exists, make a backup of it.
159 backup-compiled-files:
160 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
161 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
163 # Compile Lisp files, but save old compiled files first.
165 compile: backup-compiled-files compile-files
167 # Recompile all Lisp files which are newer than their .elc files.
168 # Note that this doesn't create .elc files. It only recompiles if an
169 # .elc is present.
171 recompile: doit
172 $(emacs) -f batch-byte-recompile-directory $(lisp)
174 # Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el,
175 # because it's not sure it's up-to-date, and if it's not, that might
176 # lead to errors during the bootstrap because something fails to
177 # autoload as expected. Remove compiled Lisp files so that
178 # bootstrap-emacs will be built from sources only.
180 bootstrap-clean:
181 if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
182 -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
184 # Generate/update files for the bootstrap process.
186 bootstrap: autoloads compile-files custom-deps
188 distclean:
189 -rm -f $(lisp)/Makefile
191 # Makefile ends here.