view src/=Makefile.in @ 1677:bf8ee433f4d2

* Makefile.in (distclean): Don't delete machine.h or system.h; they don't exist anymore. * Makefile.in (distclean): Don't delete autosave or backup files. (extraclean): New target; like distclean, but delete autosave and backup files too. * Makefile.in (srcdir): New variable, not fully implemented. (xmakefile): Turn -g and -O in CFLAGS into C_DEBUG_SWITCH and C_OPTIMIZE_SWITCH in C_SWITCH_SITE's definition. Delete junk.cpp when done. * ymakefile (archlib): Variable definition deleted. Run programs from ../lib-src directly, or use ${archlibdir}. (${etc}DOC): Run make-docfile from ${libsrc}, not ${archlib}. (${archlib}make-docfile, ${archlib}emacstool): Use ${libsrc}, not ${archlib}.
author Jim Blandy <jimb@redhat.com>
date Sat, 12 Dec 1992 15:29:40 +0000
parents bd3afc204773
children ca439341a0e5
line wrap: on
line source

# 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.

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

# ==================== Things `configure' might edit ====================

CC=cc
CONFIG_CFLAGS=-g
srcdir=.

# ============================= Targets ==============================

CPP = $(CC) -E -Is -Im
#Note: an alternative is  CPP = /lib/cpp

# Just to avoid uncertainty.
SHELL = /bin/sh

CFLAGS=${CONFIG_CFLAGS}

all: doall

doall: xmakefile
	$(MAKE) CC='${CC}' -f xmakefile ${MFLAGS} all

#This is used in making a distribution.
#Do not use it on development directories!
distclean:
	-rm -f paths.h config.h emacs-* temacs xemacs xmakefile core *.o

clean:
	-rm -f temacs xemacs prefix-args xmakefile* core \#* *.o

extraclean: distclean
	-rm -f *~ \#* m/*~ s/*~

xemacs: doxemacs

doxemacs: xmakefile
	$(MAKE) CC='${CC}' -f xmakefile ${MFLAGS} xemacs

temacs: dotemacs

dotemacs: xmakefile
	$(MAKE) CC='${CC}' -f xmakefile ${MFLAGS} temacs

# If you have a problem with cc -E here, changing
# the definition of CPP above may fix it.
xmakefile: ymakefile config.h
	-rm -f xmakefile xmakefile.new junk.c junk.cpp
	cp ymakefile junk.c
	## 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 /`"
	< junk.cpp					\
	sed	-e 's/^#.*//'				\
		-e 's/^[ \f\t][ \f\t]*$$//'		\
		-e 's/^ /	/' 			\
	| sed -n -e '/^..*$$/p' 			\
	> xmakefile.new
	mv -f xmakefile.new xmakefile
	chmod 444 xmakefile
	rm -f junk.c junk.cpp

tags TAGS:
	etags [a-z]*.h [a-z]*.c ../lisp/[a-z]*.el ../lisp/term/[a-z]*.el \
	      ../external-lisp/*.el