Don't let the 'B' interactive spec default to buffers viewed in
[bpt/emacs.git] / src / Makefile.in
1 # DIST: This is the distribution Makefile for Emacs. configure can
2 # DIST: make most of the changes to this file you might want, so try
3 # DIST: that first.
4
5 MAKE = make
6 # BSD doesn't have it as a default.
7
8 # ==================== Things `configure' might edit ====================
9
10 CC=cc
11 CPP=cc -E
12 CFLAGS=-g
13 srcdir=@srcdir@/src
14 VPATH=@srcdir@/src
15 LN_S=ln -s
16
17 # ============================= Targets ==============================
18
19 CPP = $(CC) -E -Is -Im
20 #Note: an alternative is CPP = /lib/cpp
21
22 # Just to avoid uncertainty.
23 SHELL = /bin/sh
24
25 SUBMAKEFLAGS = CC='${CC}' LN_S='${LN_S}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
26
27 all: doall
28
29 doall: xmakefile
30 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} all
31
32 mostlyclean:
33 rm -f temacs emacs prefix-args xmakefile* core \#* *.o libXMenu11.a
34 rm -f ../etc/DOC
35 clean: mostlyclean
36 true
37 #This is used in making a distribution.
38 #Do not use it on development directories!
39 distclean: clean
40 rm -f paths.h config.h emacs-* ../etc/DOC-*
41 realclean: distclean
42 rm -f TAGS
43 versionclean:
44 -rm -f emacs emacs-* ../etc/DOC*
45 extraclean: distclean
46 -rm -f *~ \#* m/*~ s/*~
47
48 emacs: doemacs
49 @true
50
51 doemacs: xmakefile
52 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} emacs
53
54 temacs: dotemacs
55 @true
56
57 dotemacs: xmakefile
58 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} temacs
59
60 SOURCES = *.[ch] [sm]/* COPYING Makefile.in ymakefile \
61 config.h.in README COPYING ChangeLog vms.pp-trans
62 unlock:
63 chmod u+w $(SOURCES)
64
65 relock:
66 chmod -w $(SOURCES)
67 chmod +w paths.h
68
69 ### Some makes, like Ultrix's make, complain if you put a comment in
70 ### the middle of a rule's command list! Dummies.
71
72 ### The flags for optimization and debugging depend on the
73 ### system, so take an ordinary CFLAGS value and choose the
74 ### appropriate CPP symbols to use in ymakefile.
75 ### If you have a problem with cc -E here, changing
76 ### the definition of CPP above may fix it.
77
78 # Remake xmakefile whenever we reconfigure even if config.h didn't change.
79 xmakefile: ymakefile config.h ../config.status
80 -rm -f xmakefile xmakefile.new junk.c junk.cpp
81 cp ${srcdir}/ymakefile junk.c
82 ${CPP} -I${srcdir} ${CFLAGS} junk.c > junk.cpp
83 < junk.cpp \
84 sed -e 's/^#.*//' \
85 -e 's/^[ \f\t][ \f\t]*$$//' \
86 -e 's/^ / /' \
87 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \
88 -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'|' \
89 | sed -n -e '/^..*$$/p' \
90 > xmakefile.new
91 mv -f xmakefile.new xmakefile
92 chmod 444 xmakefile
93 rm -f junk.c junk.cpp
94
95 tagsfiles = [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el
96 TAGS: $(tagsfiles)
97 etags $(tagsfiles)
98 tags: TAGS
99 .PHONY: tags