Makefile.in 1.33 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
CC =gcc
Jim Blandy's avatar
Jim Blandy committed
9
CPP = $(CC) -E -Is -Im
Joseph Arceneaux's avatar
Joseph Arceneaux committed
10 11
#Note: an alternative is  CPP = /lib/cpp

12 13 14
# Just to avoid uncertainty.
SHELL = /bin/sh

15
all: doall
Joseph Arceneaux's avatar
Joseph Arceneaux committed
16

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

#This is used in making a distribution.
#Do not use it on development directories!
distclean:
Jim Blandy's avatar
Jim Blandy committed
23
	-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
24 25

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

28
xemacs: doxemacs
Joseph Arceneaux's avatar
Joseph Arceneaux committed
29

30
doxemacs: xmakefile
31
	$(MAKE) CC='${CC}' -f xmakefile ${MFLAGS} xemacs
Joseph Arceneaux's avatar
Joseph Arceneaux committed
32

33
temacs: dotemacs
Joseph Arceneaux's avatar
Joseph Arceneaux committed
34

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

# 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
41
	-rm -f xmakefile xmakefile.new junk.c junk.cpp
Joseph Arceneaux's avatar
Joseph Arceneaux committed
42
	cp ymakefile junk.c
Jim Blandy's avatar
Jim Blandy committed
43 44 45 46 47 48 49 50
	$(CPP) junk.c > junk.cpp
	< junk.cpp					\
	sed	-e 's/^#.*//'				\
		-e 's/^[ \f\t][ \f\t]*$$//'		\
		-e 's/^ /	/' 			\
	| sed -n -e '/^..*$$/p' 			\
	> xmakefile.new
	mv -f xmakefile.new xmakefile
Joseph Arceneaux's avatar
Joseph Arceneaux committed
51 52 53
	rm -f junk.c

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