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
6 # BSD doesn't have it as a default.
8 # ==================== Things `configure' might edit ====================
18 # ============================= Targets ==============================
20 CPP = $(CC) -E -Is -Im
21 #Note: an alternative is CPP = /lib/cpp
23 # Just to avoid uncertainty.
26 SUBMAKEFLAGS = CC='${CC}' LN_S='${LN_S}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
31 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} all
34 rm -f temacs prefix-args xmakefile* core \#* *.o libXMenu11.a
38 #This is used in making a distribution.
39 #Do not use it on development directories!
41 rm -f paths.h config.h ../etc/DOC-*
45 -rm -f emacs emacs-* ../etc/DOC*
47 -rm -f *~ \#* m/*~ s/*~
53 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} emacs
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
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
86 -e 's/^[ \f\t][ \f\t]*$$//' \
88 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \
89 -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'|' \
90 | sed -n -e '/^..*$$/p' \
92 mv -f xmakefile.new xmakefile
96 tagsfiles = [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el