1113
|
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
|
158
|
5 MAKE = make
|
|
6 # BSD doesn't have it as a default.
|
|
7
|
1677
|
8 # ==================== Things `configure' might edit ====================
|
|
9
|
1647
|
10 CC=cc
|
3783
|
11 CPP=cc -E
|
2720
|
12 CFLAGS=-g
|
4133
|
13 C_SWITCH_SYSTEM=
|
2816
|
14 srcdir=@srcdir@/src
|
|
15 VPATH=@srcdir@/src
|
2720
|
16 LN_S=ln -s
|
1677
|
17
|
|
18 # ============================= Targets ==============================
|
1647
|
19
|
732
|
20 CPP = $(CC) -E -Is -Im
|
33
|
21 #Note: an alternative is CPP = /lib/cpp
|
|
22
|
186
|
23 # Just to avoid uncertainty.
|
|
24 SHELL = /bin/sh
|
|
25
|
3312
|
26 SUBMAKEFLAGS = CC='${CC}' LN_S='${LN_S}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
|
1677
|
27
|
1561
|
28 all: doall
|
33
|
29
|
1561
|
30 doall: xmakefile
|
2720
|
31 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} all
|
33
|
32
|
3754
200d504045b9
Bring mumbleclean targets into conformance with GNU coding standards.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
33 mostlyclean:
|
4637
|
34 rm -f temacs prefix-args xmakefile* core \#* *.o libXMenu11.a
|
3754
200d504045b9
Bring mumbleclean targets into conformance with GNU coding standards.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
35 rm -f ../etc/DOC
|
200d504045b9
Bring mumbleclean targets into conformance with GNU coding standards.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
36 clean: mostlyclean
|
4692
|
37 rm -f emacs-* emacs
|
33
|
38 #This is used in making a distribution.
|
|
39 #Do not use it on development directories!
|
3754
200d504045b9
Bring mumbleclean targets into conformance with GNU coding standards.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
40 distclean: clean
|
4637
|
41 rm -f paths.h config.h ../etc/DOC-*
|
3754
200d504045b9
Bring mumbleclean targets into conformance with GNU coding standards.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
42 realclean: distclean
|
200d504045b9
Bring mumbleclean targets into conformance with GNU coding standards.
Jim Blandy <jimb@redhat.com>
diff
changeset
|
43 rm -f TAGS
|
2238
|
44 versionclean:
|
|
45 -rm -f emacs emacs-* ../etc/DOC*
|
1677
|
46 extraclean: distclean
|
|
47 -rm -f *~ \#* m/*~ s/*~
|
|
48
|
1706
36903f26b5cc
* ymakefile (all, xemacs): We build an executable called `emacs' now,
Jim Blandy <jimb@redhat.com>
diff
changeset
|
49 emacs: doemacs
|
1962
|
50 @true
|
33
|
51
|
1706
36903f26b5cc
* ymakefile (all, xemacs): We build an executable called `emacs' now,
Jim Blandy <jimb@redhat.com>
diff
changeset
|
52 doemacs: xmakefile
|
2720
|
53 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} emacs
|
33
|
54
|
1561
|
55 temacs: dotemacs
|
1962
|
56 @true
|
33
|
57
|
1561
|
58 dotemacs: xmakefile
|
2720
|
59 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} temacs
|
33
|
60
|
2256
|
61 SOURCES = *.[ch] [sm]/* COPYING Makefile.in ymakefile \
|
|
62 config.h.in README COPYING ChangeLog vms.pp-trans
|
|
63 unlock:
|
|
64 chmod u+w $(SOURCES)
|
|
65
|
|
66 relock:
|
|
67 chmod -w $(SOURCES)
|
|
68 chmod +w paths.h
|
|
69
|
1821
|
70 ### Some makes, like Ultrix's make, complain if you put a comment in
|
|
71 ### the middle of a rule's command list! Dummies.
|
|
72
|
|
73 ### The flags for optimization and debugging depend on the
|
|
74 ### system, so take an ordinary CFLAGS value and choose the
|
|
75 ### appropriate CPP symbols to use in ymakefile.
|
|
76 ### If you have a problem with cc -E here, changing
|
|
77 ### the definition of CPP above may fix it.
|
3464
|
78
|
|
79 # Remake xmakefile whenever we reconfigure even if config.h didn't change.
|
|
80 xmakefile: ymakefile config.h ../config.status
|
732
|
81 -rm -f xmakefile xmakefile.new junk.c junk.cpp
|
2816
|
82 cp ${srcdir}/ymakefile junk.c
|
4692
|
83 ${CPP} -I. -I${srcdir} ${C_SWITCH_SYSTEM} ${CFLAGS} junk.c > junk.cpp
|
732
|
84 < junk.cpp \
|
|
85 sed -e 's/^#.*//' \
|
|
86 -e 's/^[ \f\t][ \f\t]*$$//' \
|
|
87 -e 's/^ / /' \
|
2816
|
88 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \
|
|
89 -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'|' \
|
732
|
90 | sed -n -e '/^..*$$/p' \
|
|
91 > xmakefile.new
|
|
92 mv -f xmakefile.new xmakefile
|
1677
|
93 chmod 444 xmakefile
|
1647
|
94 rm -f junk.c junk.cpp
|
33
|
95
|
2506
|
96 tagsfiles = [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el
|
1694
|
97 TAGS: $(tagsfiles)
|
|
98 etags $(tagsfiles)
|
|
99 tags: TAGS
|
|
100 .PHONY: tags
|