Makefile.in 1.66 KB
Newer Older
Jim Blandy's avatar
Jim Blandy committed
1 2 3 4
# DIST: This is the distribution Makefile for Emacs.  configure can
# DIST: make most of the changes to this file you might want, so try
# DIST: that first.

5 6 7
MAKE = make
# BSD doesn't have it as a default.

8 9 10 11
# These values are edited by configure.
CC=cc
CFLAGS=-g

Jim Blandy's avatar
Jim Blandy committed
12
CPP = $(CC) -E -Is -Im
Joseph Arceneaux's avatar
Joseph Arceneaux committed
13 14
#Note: an alternative is  CPP = /lib/cpp

15 16 17
# Just to avoid uncertainty.
SHELL = /bin/sh

18
all: doall
Joseph Arceneaux's avatar
Joseph Arceneaux committed
19

20
doall: xmakefile
Roland McGrath's avatar
Roland McGrath committed
21
	$(MAKE) CC='${CC}' -f xmakefile ${MFLAGS} all
Joseph Arceneaux's avatar
Joseph Arceneaux committed
22 23 24 25

#This is used in making a distribution.
#Do not use it on development directories!
distclean:
Jim Blandy's avatar
Jim Blandy committed
26
	-rm -f paths.h config.h machine.h system.h emacs-* temacs xemacs xmakefile core *~ m/*~ s/*~ \#* *.o
Joseph Arceneaux's avatar
Joseph Arceneaux committed
27 28

clean:
29
	-rm -f temacs xemacs prefix-args xmakefile* core \#* *.o
Joseph Arceneaux's avatar
Joseph Arceneaux committed
30

31
xemacs: doxemacs
Joseph Arceneaux's avatar
Joseph Arceneaux committed
32

33
doxemacs: xmakefile
34
	$(MAKE) CC='${CC}' -f xmakefile ${MFLAGS} xemacs
Joseph Arceneaux's avatar
Joseph Arceneaux committed
35

36
temacs: dotemacs
Joseph Arceneaux's avatar
Joseph Arceneaux committed
37

38
dotemacs: xmakefile
39
	$(MAKE) CC='${CC}' -f xmakefile ${MFLAGS} temacs
Joseph Arceneaux's avatar
Joseph Arceneaux committed
40 41 42 43

# If you have a problem with cc -E here, changing
# the definition of CPP above may fix it.
xmakefile: ymakefile config.h
Jim Blandy's avatar
Jim Blandy committed
44
	-rm -f xmakefile xmakefile.new junk.c junk.cpp
Joseph Arceneaux's avatar
Joseph Arceneaux committed
45
	cp ymakefile junk.c
46 47 48 49 50 51 52
	## The flags for optimization and debugging depend on the
	## system, so take an ordinary CFLAGS value and choose the
	## appropriate CPP symbols to use in ymakefile.
	$(CPP) junk.c > junk.cpp \
	-DC_SWITCH_SITE="`echo ${CFLAGS}' ' \
			  | sed -e 's/-g /C_DEBUG_SWITCH /' \
				-e 's/-O /C_OPTIMIZE_SWITCH /`"
Jim Blandy's avatar
Jim Blandy committed
53 54 55 56 57 58 59
	< junk.cpp					\
	sed	-e 's/^#.*//'				\
		-e 's/^[ \f\t][ \f\t]*$$//'		\
		-e 's/^ /	/' 			\
	| sed -n -e '/^..*$$/p' 			\
	> xmakefile.new
	mv -f xmakefile.new xmakefile
60
	rm -f junk.c junk.cpp
Joseph Arceneaux's avatar
Joseph Arceneaux committed
61 62

tags TAGS:
Jim Blandy's avatar
Jim Blandy committed
63 64
	etags [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el \
	      ../external-lisp/*.el