Remove `src/ymakefile', add `src/Makefile.in.in'.
[bpt/emacs.git] / src / Makefile.in
CommitLineData
ec558adc
JB
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
4ddcbb51
RS
5MAKE = make
6# BSD doesn't have it as a default.
7
9e012fc3
JB
8# ==================== Things `configure' might edit ====================
9
0c22fbca 10CC=cc
a84281e7 11CPP=cc -E
d70fd7d6 12CFLAGS=-g
331636c4 13C_SWITCH_SYSTEM=
3ce7a076
JB
14srcdir=@srcdir@/src
15VPATH=@srcdir@/src
d70fd7d6 16LN_S=ln -s
9e012fc3
JB
17
18# ============================= Targets ==============================
0c22fbca 19
e5d77022 20CPP = $(CC) -E -Is -Im
c8ff0e1b
JA
21#Note: an alternative is CPP = /lib/cpp
22
5627d72e
RS
23# Just to avoid uncertainty.
24SHELL = /bin/sh
25
dad2fc01 26SUBMAKEFLAGS = CC='${CC}' LN_S='${LN_S}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
9e012fc3 27
43a904c1 28all: doall
c8ff0e1b 29
43a904c1 30doall: xmakefile
d70fd7d6 31 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} all
c8ff0e1b 32
bfb7b570 33mostlyclean:
9d11b9a1 34 rm -f temacs prefix-args xmakefile* core \#* *.o libXMenu11.a
bfb7b570
JB
35 rm -f ../etc/DOC
36clean: mostlyclean
21ed4461 37 rm -f emacs-* emacs
c8ff0e1b
JA
38#This is used in making a distribution.
39#Do not use it on development directories!
bfb7b570 40distclean: clean
9d11b9a1 41 rm -f paths.h config.h ../etc/DOC-*
bfb7b570
JB
42realclean: distclean
43 rm -f TAGS
c3d80a47
ER
44versionclean:
45 -rm -f emacs emacs-* ../etc/DOC*
9e012fc3
JB
46extraclean: distclean
47 -rm -f *~ \#* m/*~ s/*~
48
307436bb 49emacs: doemacs
75cf385a 50 @true
c8ff0e1b 51
307436bb 52doemacs: xmakefile
d70fd7d6 53 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} emacs
c8ff0e1b 54
43a904c1 55temacs: dotemacs
75cf385a 56 @true
c8ff0e1b 57
43a904c1 58dotemacs: xmakefile
d70fd7d6 59 $(MAKE) ${SUBMAKEFLAGS} -f xmakefile ${MFLAGS} temacs
c8ff0e1b 60
a6af8696
ER
61SOURCES = *.[ch] [sm]/* COPYING Makefile.in ymakefile \
62 config.h.in README COPYING ChangeLog vms.pp-trans
63unlock:
64 chmod u+w $(SOURCES)
65
66relock:
67 chmod -w $(SOURCES)
68 chmod +w paths.h
69
dbc4e1c1
JB
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.
691d8b2c
RS
78
79# Remake xmakefile whenever we reconfigure even if config.h didn't change.
80xmakefile: ymakefile config.h ../config.status
e5d77022 81 -rm -f xmakefile xmakefile.new junk.c junk.cpp
3ce7a076 82 cp ${srcdir}/ymakefile junk.c
21ed4461 83 ${CPP} -I. -I${srcdir} ${C_SWITCH_SYSTEM} ${CFLAGS} junk.c > junk.cpp
e5d77022
JB
84 < junk.cpp \
85 sed -e 's/^#.*//' \
86 -e 's/^[ \f\t][ \f\t]*$$//' \
87 -e 's/^ / /' \
3ce7a076
JB
88 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \
89 -e 's|^\(VPATH *=\).*$$|\1'"${srcdir}"'|' \
e5d77022
JB
90 | sed -n -e '/^..*$$/p' \
91 > xmakefile.new
92 mv -f xmakefile.new xmakefile
9e012fc3 93 chmod 444 xmakefile
0c22fbca 94 rm -f junk.c junk.cpp
c8ff0e1b 95
5f1a4d41 96tagsfiles = [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el
ac21ec40
RM
97TAGS: $(tagsfiles)
98 etags $(tagsfiles)
99tags: TAGS
100.PHONY: tags