(*:Linux:*:*): Don't test for elf_i.86 or m68kelf.
[emacs/old-mirror.git] / src / =Makefile.in
blob1433f13e7a84325f194cf54fdbd6ca8ea48f2429
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.
5 MAKE = make
6 # BSD doesn't have it as a default.
8 # ==================== Things `configure' might edit ====================
10 CC=cc
11 CPP=cc -E
12 CFLAGS=-g
13 C_SWITCH_SYSTEM=
14 srcdir=@srcdir@/src
15 VPATH=@srcdir@/src
16 LN_S=ln -s
18 # ============================= Targets ==============================
20 CPP = $(CC) -E -Is -Im
21 #Note: an alternative is  CPP = /lib/cpp
23 # Just to avoid uncertainty.
24 SHELL = /bin/sh
26 SUBMAKEFLAGS = CC='${CC}' LN_S='${LN_S}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
28 all: doall
30 doall: xmakefile
31         $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} all
33 mostlyclean:
34         rm -f temacs prefix-args xmakefile* core \#* *.o libXMenu11.a
35         rm -f ../etc/DOC
36 clean: mostlyclean
37         rm -f emacs-* emacs
38 #This is used in making a distribution.
39 #Do not use it on development directories!
40 distclean: clean
41         rm -f paths.h config.h ../etc/DOC-*
42 realclean: distclean
43         rm -f TAGS
44 versionclean:
45         -rm -f emacs emacs-* ../etc/DOC*
46 extraclean: distclean
47         -rm -f *~ \#* m/*~ s/*~
49 emacs: doemacs
50         @true
52 doemacs: xmakefile
53         $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} emacs
55 temacs: dotemacs
56         @true
58 dotemacs: xmakefile
59         $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} temacs
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)
66 relock:
67         chmod -w $(SOURCES)
68         chmod +w paths.h
70 ### Some makes, like Ultrix's make, complain if you put a comment in
71 ### the middle of a rule's command list!  Dummies.
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.
79 # Remake xmakefile whenever we reconfigure even if config.h didn't change.
80 xmakefile: ymakefile config.h ../config.status
81         -rm -f xmakefile xmakefile.new junk.c junk.cpp
82         cp ${srcdir}/ymakefile junk.c
83         ${CPP} -I. -I${srcdir} ${C_SWITCH_SYSTEM} ${CFLAGS} junk.c > junk.cpp
84         < junk.cpp                                      \
85         sed     -e 's/^#.*//'                           \
86                 -e 's/^[ \f\t][ \f\t]*$$//'             \
87                 -e 's/^ /       /'                      \
88                 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|'      \
89                 -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'|'       \
90         | sed -n -e '/^..*$$/p'                         \
91         > xmakefile.new
92         mv -f xmakefile.new xmakefile
93         chmod 444 xmakefile
94         rm -f junk.c junk.cpp
96 tagsfiles = [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el
97 TAGS: $(tagsfiles)
98         etags $(tagsfiles)
99 tags: TAGS
100 .PHONY: tags