Commit f7dbcf3c authored by Jim Blandy's avatar Jim Blandy
Browse files

Initial revision

parent d1c5af3e
# 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.
# add -DUSG for SysV movemail and timer
# For Xenix, add the following for movemail:
# LOADLIBES= -lx
# For Mips, the following is needed for who knows what.
# LOADLIBES = -lmld /usr/bsd43/usr/lib/libc.a
# Avoid trouble on systems where the `SHELL' variable might be
# inherited from the environment.
SHELL = /bin/sh
# Allow the user to specify the install program.
INSTALL = install
INSTALLFLAGS =
# Things that a user might actually run
INSTALLABLES = etags ctags emacsclient b2m
# Things that Emacs runs internally, or during the build process.
UTILITIES= test-distrib wakeup make-docfile digest-doc sorted-doc \
movemail cvtmail fakemail yow env emacsserver hexl timer
EXECUTABLES= ${UTILITIES} ${INSTALLABLES}
# These things are edited by ../configure; don't change anything before
# or including the '='; everything after that gets blown away.
CC=gcc
CFLAGS= -g -O
LOADLIBES=
all: ../arch-lib
../arch-lib: ${EXECUTABLES}
for file in ${EXECUTABLES} ; do \
if [ -f $${file} ]; then \
if [ -f ../arch-lib/$${file} ]; then \
rm ../arch-lib/$${file} ; \
fi ; \
ln $${file} ../arch-lib ; \
fi ; \
done
# We don't need to install `wakeup' explicitly, because it will be copied when
# this whole directory is copied.
install: all
${INSTALL} ${INSTALLFLAGS} -c emacsclient ${BINDIR}/emacsclient
${INSTALL} ${INSTALLFLAGS} -c etags ${BINDIR}/etags
${INSTALL} ${INSTALLFLAGS} -c ctags ${BINDIR}/ctags
${INSTALL} ${INSTALLFLAGS} -c b2m ${BINDIR}/b2m
${INSTALL} ${INSTALLFLAGS} -c -m 444 emacs.1 ${MANDIR}/emacs.${MANEXT}
install.sysv: all
-cp emacsclient ${BINDIR}/emacsclient.new
-chmod 755 ${BINDIR}/emacsclient.new
-chgrp bin ${BINDIR}/emacsclient.new
-chown bin ${BINDIR}/emacsclient.new
-mv ${BINDIR}/emacsclient.new ${BINDIR}/emacsclient
-cp etags ${BINDIR}/etags.new
-chmod 755 ${BINDIR}/etags.new
-chgrp bin ${BINDIR}/etags.new
-chown bin ${BINDIR}/etags.new
-mv ${BINDIR}/etags.new ${BINDIR}/etags
-cp ctags ${BINDIR}/ctags.new
-chmod 755 ${BINDIR}/ctags.new
-chgrp bin ${BINDIR}/ctags.new
-chown bin ${BINDIR}/ctags.new
-mv ${BINDIR}/ctags.new ${BINDIR}/ctags
-cp b2m ${BINDIR}/b2m.new
-chmod 755 ${BINDIR}/b2m.new
-chgrp bin ${BINDIR}/b2m.new
-chown bin ${BINDIR}/b2m.new
-mv ${BINDIR}/b2m.new ${BINDIR}/b2m
-cp emacs.1 ${MANDIR}/emacs.${MANEXT}.new
-chmod 444 ${MANDIR}/emacs.${MANEXT}.new
-mv ${MANDIR}/emacs.${MANEXT}.new ${MANDIR}/emacs.${MANEXT}
install.xenix:
cp etags ctags emacsclient ${BINDIR}
chmod 755 ${BINDIR}/etags ${BINDIR}/ctags
chmod 755 ${BINDIR}/emacsclient
cp b2m ${BINDIR}
chmod 755 ${BINDIR}/b2m
cp emacs.1 ${MANDIR}/emacs.${MANEXT}
chmod 444 ${MANDIR}/emacs.${MANEXT}
clean mostlyclean:
-rm -f ${EXECUTABLES} core *.o
distclean:
-rm -f ${EXECUTABLES} *~ \#* ../etc/DOC* core *.o
cd ../arch-lib; rm -f ${EXECUTABLES}
realclean: distclean
rm TAGS aixcc.c
# Test the contents of the directory.
check:
@echo "We don't have any tests for GNU Emacs yet."
TAGS: etags
etags *.[ch]
# This verifies that the non-ASCII characters in the file `testfile'
# have not been clobbered by whatever means were used to copy and
# distribute Emacs. If they were clobbered, all the .elc files were
# clobbered too.
test-distrib: test-distrib.c
$(CC) -o test-distrib test-distrib.c
./test-distrib
GETOPTOBJS = getopt.o getopt1.o
GETOPTDEPS = $(GETOPTOBJS) getopt.h
getopt.o: getopt.c getopt.h
getopt1.o: getopt1.c getopt.h
etags: etags.c $(GETOPTDEPS)
$(CC) -o etags ${CFLAGS} -DETAGS etags.c $(GETOPTOBJS) $(LOADLIBES)
ctags: etags.c $(GETOPTDEPS)
$(CC) -o ctags ${CFLAGS} -DCTAGS etags.c $(GETOPTOBJS) $(LOADLIBES)
wakeup: wakeup.c
$(CC) -o wakeup ${CFLAGS} wakeup.c $(LOADLIBES)
make-docfile: make-docfile.c
$(CC) -o make-docfile ${CFLAGS} make-docfile.c $(LOADLIBES)
digest-doc: digest-doc.c
$(CC) -o digest-doc ${CFLAGS} digest-doc.c $(LOADLIBES)
sorted-doc: sorted-doc.c
$(CC) -o sorted-doc ${CFLAGS} sorted-doc.c $(LOADLIBES)
b2m: b2m.c
$(CC) -o b2m ${CFLAGS} b2m.c $(LOADLIBES)
movemail: movemail.c ../src/config.h
$(CC) -o movemail ${CFLAGS} movemail.c $(LOADLIBES)
cvtmail: cvtmail.c
$(CC) -o cvtmail ${CFLAGS} cvtmail.c $(LOADLIBES)
fakemail: fakemail.c ../src/config.h
$(CC) -o fakemail ${CFLAGS} fakemail.c $(LOADLIBES)
yow: yow.c ../src/paths.h
$(CC) -o yow ${CFLAGS} yow.c $(LOADLIBES)
env: env.c ../src/config.h
$(CC) -o env -DEMACS ${CFLAGS} env.c $(LOADLIBES)
emacsserver: emacsserver.c ../src/config.h
$(CC) -o emacsserver ${CFLAGS} emacsserver.c $(LOADLIBES)
emacsclient: emacsclient.c ../src/config.h
$(CC) -o emacsclient ${CFLAGS} emacsclient.c $(LOADLIBES)
hexl: hexl.c
$(CC) -o hexl ${CFLAGS} hexl.c $(LOADLIBES)
timer: getdate.o timer.o
$(CC) -o timer $(CFLAGS) getdate.o timer.o
# These are NOT included in INSTALLABLES or UTILITIES.
# See ../src/ymakefile.
emacstool: emacstool.c
$(CC) emacstool.c -o emacstool ${CFLAGS} \
-lsuntool -lsunwindow -lpixrect $(LOADLIBES)
# For SUN Japanese Language Environment
nemacstool: emacstool.c
$(CC) -o nemacstool -DJLE ${CFLAGS} emacstool.c \
-lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
xvetool: emacstool.c
$(CC) -o xvetool -DXVIEW ${CFLAGS} emacstool.c \
-lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
$(LOADLIBES)
xveterm: emacstool.c
$(CC) -o xveterm -DXVIEW -DTTERM ${CFLAGS} emacstool.c \
-lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
$(LOADLIBES)
aixcc: aixcc.c
$(CC) $(CFLAGS) -o aixcc aixcc.c
aixcc.c: aixcc.lex
lex aixcc.lex
mv lex.yy.c aixcc.c
#!/bin/sh
#
# make-dist: create an Emacs distribution tar file from the current
# source tree. This basically creates a duplicate directory
# structure, and then hard links into it only those files that should
# be distributed. This means that if you add a file with an odd name,
# you should make sure that this script will include it.
progname="$0"
# Exit if a command fails.
set -e
# Print out each line we read, for debugging's sake.
# set -v
cleanup=yes
while [ $# -gt 0 ]; do
case "$1" in
"--no-cleanup" )
cleanup=no
;;
* )
echo "${progname}: Unrecognized argument: $1" >&2
exit 1
;;
esac
shift
done
# Make sure we're running in the right place.
if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then
echo "${progname}: must run in the top directory of the Emacs" >&2
echo "distribution tree. Cd to that directory and try again." >&2
exit 1
fi
# Find out which version of Emacs this is.
version=`grep 'defconst[ ]*emacs-version' lisp/version.el \
| sed -e 's/^.*"\([0-9]+\.[0-9]+\)\..*$/\1/'`
if [ ! "${version}" ]; then
echo "${progname}: can't find current emacs version in ./lisp/version.el." >&2
exit 1
fi
# Make sure the subdirectory is available.
tempparent="make-dist.$$"
if [ -d ${tempparent} ]; then
echo "${progname}: staging directory ${tempparent} already exists.
Perhaps a previous invocation of ${progname} failed to clean up
after itself. Check that directories whose names are of the form
make-dist.NNNNN don't contain any important information, remove them,
and try again." >&2
exit 1
fi
echo "Creating staging directory: ${tempparent}"
mkdir ${tempparent}
emacsname="emacs-${version}"
tempdir="${tempparent}/${emacsname}"
echo "Creating top directory: ${tempdir}"
mkdir ${tempdir}
# We copy in the top-level files before creating the subdirectories in
# hopes that this will make the top-level files appear first in the
# tar file.
echo "Copying top-level files."
ln INSTALL PROBLEMS README ${tempdir}
ln ChangeLog Makefile.in build-install.in configure make-dist ${tempdir}
echo "Creating subdirectories."
for subdir in lisp lisp/term src src/m src/s lib-src oldXMenu \
etc lock local-lisp arch-lib cpp info man shortnames; do
mkdir ${tempdir}/${subdir}
done
echo "Copying lisp."
# Don't distribute =*.el files, site-init.el, or site-load.el.
(cd lisp
ln [a-zA-Z]*.el ../${tempdir}/lisp
ln [a-zA-Z]*.elc ../${tempdir}/lisp
ln [a-zA-Z]*.defns ../${tempdir}/lisp
ln ChangeLog README ../${tempdir}/lisp
cd ../${tempdir}/lisp
rm -f site-init site-init.el site-init.elc
rm -f site-load site-load.el site-load.elc)
echo "Copying lisp/term."
# Don't distribute =*.el files.
(cd lisp/term
ln [a-zA-Z]*.el ../../${tempdir}/lisp/term
ln [a-zA-Z]*.elc ../../${tempdir}/lisp/term
ln README ../../${tempdir}/lisp/term)
echo "Copying src."
# Don't distribute =*.[ch] files, or the configured versions of
# config.h.in, paths.h.in, or Makefile.in.
(cd src
ln [a-zA-Z]*.c ../${tempdir}/src
ln [a-zA-Z]*.h ../${tempdir}/src
ln [a-zA-Z]*.s ../${tempdir}/src
ln README Makefile.in ymakefile ChangeLog config.h.in paths.h.in \
../${tempdir}/src
ln .gdbinit .dbxinit ../${tempdir}/src
ln *.com *.opt vms-pp.trans vmsbuild ../${tempdir}/src
cd ../${tempdir}/src
etags *.h *.c ../lisp/*.el)
echo "Copying src/m."
(cd src/m
ln README *.h ../../${tempdir}/src/m)
echo "Copying src/s."
(cd src/s
ln README *.h ../../${tempdir}/src/s)
echo "Copying lib-src."
(cd lib-src
ln [a-zA-Z]*.c [a-zA-Z]*.h [a-zA-Z]*.y [a-zA-Z]*.lex ../${tempdir}/lib-src
ln ChangeLog Makefile.in README testfile ../${tempdir}/lib-src)
echo "Copying oldXMenu."
(cd oldXMenu
ln *.c *.h ../${tempdir}/oldXMenu
ln README Makefile Imakefile ChangeLog ../${tempdir}/oldXMenu)
echo "Copying etc."
# Don't distribute DOC files, backups, autosaves, or tex litter.
(cd etc
ln [0-9a-zA-Z]* ../${tempdir}/etc
cd ../${tempdir}/etc
# Avoid an error when expanding the wildcards later.
for dummy in DOC-dummy dummy~ \#dummy\# dummy.dvi dummy.log; do
ln MACHINES ${dummy}
done
rm -f DOC* *~ \#*\# *.dvi *.log core)
# For now, we comment these out, since I'm not changing them any.
#!! echo "Copying cpp."
#!! (cd cpp
#!! ln cccp.c cexp.y Makefile README ../${tempdir}/cpp)
#!!
#!! echo "Copying info."
#!! # Don't distribute backups or autosaves.
#!! (cd info
#!! ln [a-zA-Z]* ../${tempdir}/info
#!! cd ../${tempdir}/info
#!! # Avoid an error when expanding the wildcards later.
#!! ln emacs dummy~ ; ln emacs \#dummy\#
#!! rm -f *~ \#*\# core)
#!!
#!! echo "Copying man."
#!! (cd man
#!! ln *.tex *.texinfo *.texi *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/man
#!! ln *.c ../${tempdir}/man
#!! ln ChangeLog Makefile README split-man ../${tempdir}/man)
echo "Copying shortnames."
(cd shortnames
ln *.c ../${tempdir}/shortnames
ln Makefile reserved special ../${tempdir}/shortnames)
echo "Making sure copying notices are symlinks."
if [ -f ${tempdir}/etc/COPYING ]; then
rm ${tempdir}/etc/COPYING
ln etc/COPYING ${tempdir}/etc/COPYING
fi
for subdir in lisp src lib-src info shortnames; do
if [ -f ${tempdir}/${subdir}/COPYING ]; then
rm ${tempdir}/${subdir}/COPYING
fi
ln -s ../etc/COPYING ${tempdir}/${subdir}
done
echo "Creating tar file."
(cd ${tempparent}; tar cvf - ${emacsname}) | compress > ${emacsname}.tar.Z
if [ "${cleanup}" = yes ]; then
echo "Cleaning up the staging directory."
rm -rf ${tempparent}
fi
/* Hey Emacs, this is -*- C -*- code! */
/* The default search path for Lisp function "load".
This sets load-path. */
#define PATH_LOADSEARCH "/usr/local/lib/emacs/lisp"
/* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This
path is usually identical to PATH_LOADSEARCH except that the entry
for the directory containing the installed lisp files has been
replaced with ../lisp. */
#define PATH_DUMPLOADSEARCH "../lisp"
/* The extra search path for programs to invoke. This is appended to
whatever the PATH environment variable says to set the Lisp
variable exec-path and the first file name in it sets the Lisp
variable exec-directory. exec-directory is used for finding
executables and other architecture-dependent files. */
#define PATH_EXEC "/usr/local/lib/emacs/etc"
/* Where Emacs should look for its architecture-independent data
files, like the docstring file. The lisp variable data-directory
is set to this value. */
#define PATH_DATA "/usr/local/lib/emacs/data"
/* The name of the directory that contains lock files with which we
record what files are being modified in Emacs. This directory
should be writable by everyone. THE STRING MUST END WITH A
SLASH!!! */
#define PATH_LOCK "/usr/local/lib/emacs/lock/"
/* the name of the file !!!SuperLock!!! in the directory
specified by PATH_LOCK. Yes, this is redundant. */
#define PATH_SUPERLOCK "/usr/local/lib/emacs/lock/!!!SuperLock!!!"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment