aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1992-04-19 08:53:10 +0000
committerJim Blandy1992-04-19 08:53:10 +0000
commitf7dbcf3cf8d2e57c3637448f87da84e0db87f929 (patch)
treecc8d0853061e583fccba07e311f779db80decc80
parentd1c5af3e407b43e6ccd972d1c7786a29c531b261 (diff)
downloademacs-f7dbcf3cf8d2e57c3637448f87da84e0db87f929.tar.gz
emacs-f7dbcf3cf8d2e57c3637448f87da84e0db87f929.zip
Initial revision
-rw-r--r--lib-src/Makefile.in194
-rwxr-xr-xmake-dist183
-rw-r--r--src/epaths.in33
3 files changed, 410 insertions, 0 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
new file mode 100644
index 00000000000..9df18a74517
--- /dev/null
+++ b/lib-src/Makefile.in
@@ -0,0 +1,194 @@
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
5# add -DUSG for SysV movemail and timer
6# For Xenix, add the following for movemail:
7# LOADLIBES= -lx
8# For Mips, the following is needed for who knows what.
9# LOADLIBES = -lmld /usr/bsd43/usr/lib/libc.a
10
11# Avoid trouble on systems where the `SHELL' variable might be
12# inherited from the environment.
13SHELL = /bin/sh
14
15# Allow the user to specify the install program.
16INSTALL = install
17INSTALLFLAGS =
18
19# Things that a user might actually run
20INSTALLABLES = etags ctags emacsclient b2m
21
22# Things that Emacs runs internally, or during the build process.
23UTILITIES= test-distrib wakeup make-docfile digest-doc sorted-doc \
24 movemail cvtmail fakemail yow env emacsserver hexl timer
25
26EXECUTABLES= ${UTILITIES} ${INSTALLABLES}
27
28# These things are edited by ../configure; don't change anything before
29# or including the '='; everything after that gets blown away.
30CC=gcc
31CFLAGS= -g -O
32LOADLIBES=
33
34all: ../arch-lib
35
36../arch-lib: ${EXECUTABLES}
37 for file in ${EXECUTABLES} ; do \
38 if [ -f $${file} ]; then \
39 if [ -f ../arch-lib/$${file} ]; then \
40 rm ../arch-lib/$${file} ; \
41 fi ; \
42 ln $${file} ../arch-lib ; \
43 fi ; \
44 done
45
46# We don't need to install `wakeup' explicitly, because it will be copied when
47# this whole directory is copied.
48install: all
49 ${INSTALL} ${INSTALLFLAGS} -c emacsclient ${BINDIR}/emacsclient
50 ${INSTALL} ${INSTALLFLAGS} -c etags ${BINDIR}/etags
51 ${INSTALL} ${INSTALLFLAGS} -c ctags ${BINDIR}/ctags
52 ${INSTALL} ${INSTALLFLAGS} -c b2m ${BINDIR}/b2m
53 ${INSTALL} ${INSTALLFLAGS} -c -m 444 emacs.1 ${MANDIR}/emacs.${MANEXT}
54
55install.sysv: all
56 -cp emacsclient ${BINDIR}/emacsclient.new
57 -chmod 755 ${BINDIR}/emacsclient.new
58 -chgrp bin ${BINDIR}/emacsclient.new
59 -chown bin ${BINDIR}/emacsclient.new
60 -mv ${BINDIR}/emacsclient.new ${BINDIR}/emacsclient
61 -cp etags ${BINDIR}/etags.new
62 -chmod 755 ${BINDIR}/etags.new
63 -chgrp bin ${BINDIR}/etags.new
64 -chown bin ${BINDIR}/etags.new
65 -mv ${BINDIR}/etags.new ${BINDIR}/etags
66 -cp ctags ${BINDIR}/ctags.new
67 -chmod 755 ${BINDIR}/ctags.new
68 -chgrp bin ${BINDIR}/ctags.new
69 -chown bin ${BINDIR}/ctags.new
70 -mv ${BINDIR}/ctags.new ${BINDIR}/ctags
71 -cp b2m ${BINDIR}/b2m.new
72 -chmod 755 ${BINDIR}/b2m.new
73 -chgrp bin ${BINDIR}/b2m.new
74 -chown bin ${BINDIR}/b2m.new
75 -mv ${BINDIR}/b2m.new ${BINDIR}/b2m
76 -cp emacs.1 ${MANDIR}/emacs.${MANEXT}.new
77 -chmod 444 ${MANDIR}/emacs.${MANEXT}.new
78 -mv ${MANDIR}/emacs.${MANEXT}.new ${MANDIR}/emacs.${MANEXT}
79
80install.xenix:
81 cp etags ctags emacsclient ${BINDIR}
82 chmod 755 ${BINDIR}/etags ${BINDIR}/ctags
83 chmod 755 ${BINDIR}/emacsclient
84 cp b2m ${BINDIR}
85 chmod 755 ${BINDIR}/b2m
86 cp emacs.1 ${MANDIR}/emacs.${MANEXT}
87 chmod 444 ${MANDIR}/emacs.${MANEXT}
88
89
90clean mostlyclean:
91 -rm -f ${EXECUTABLES} core *.o
92
93distclean:
94 -rm -f ${EXECUTABLES} *~ \#* ../etc/DOC* core *.o
95 cd ../arch-lib; rm -f ${EXECUTABLES}
96
97realclean: distclean
98 rm TAGS aixcc.c
99
100# Test the contents of the directory.
101check:
102 @echo "We don't have any tests for GNU Emacs yet."
103
104TAGS: etags
105 etags *.[ch]
106
107# This verifies that the non-ASCII characters in the file `testfile'
108# have not been clobbered by whatever means were used to copy and
109# distribute Emacs. If they were clobbered, all the .elc files were
110# clobbered too.
111test-distrib: test-distrib.c
112 $(CC) -o test-distrib test-distrib.c
113 ./test-distrib
114
115GETOPTOBJS = getopt.o getopt1.o
116GETOPTDEPS = $(GETOPTOBJS) getopt.h
117getopt.o: getopt.c getopt.h
118getopt1.o: getopt1.c getopt.h
119
120etags: etags.c $(GETOPTDEPS)
121 $(CC) -o etags ${CFLAGS} -DETAGS etags.c $(GETOPTOBJS) $(LOADLIBES)
122
123ctags: etags.c $(GETOPTDEPS)
124 $(CC) -o ctags ${CFLAGS} -DCTAGS etags.c $(GETOPTOBJS) $(LOADLIBES)
125
126wakeup: wakeup.c
127 $(CC) -o wakeup ${CFLAGS} wakeup.c $(LOADLIBES)
128
129make-docfile: make-docfile.c
130 $(CC) -o make-docfile ${CFLAGS} make-docfile.c $(LOADLIBES)
131
132digest-doc: digest-doc.c
133 $(CC) -o digest-doc ${CFLAGS} digest-doc.c $(LOADLIBES)
134
135sorted-doc: sorted-doc.c
136 $(CC) -o sorted-doc ${CFLAGS} sorted-doc.c $(LOADLIBES)
137
138b2m: b2m.c
139 $(CC) -o b2m ${CFLAGS} b2m.c $(LOADLIBES)
140
141movemail: movemail.c ../src/config.h
142 $(CC) -o movemail ${CFLAGS} movemail.c $(LOADLIBES)
143
144cvtmail: cvtmail.c
145 $(CC) -o cvtmail ${CFLAGS} cvtmail.c $(LOADLIBES)
146
147fakemail: fakemail.c ../src/config.h
148 $(CC) -o fakemail ${CFLAGS} fakemail.c $(LOADLIBES)
149
150yow: yow.c ../src/paths.h
151 $(CC) -o yow ${CFLAGS} yow.c $(LOADLIBES)
152
153env: env.c ../src/config.h
154 $(CC) -o env -DEMACS ${CFLAGS} env.c $(LOADLIBES)
155
156emacsserver: emacsserver.c ../src/config.h
157 $(CC) -o emacsserver ${CFLAGS} emacsserver.c $(LOADLIBES)
158
159emacsclient: emacsclient.c ../src/config.h
160 $(CC) -o emacsclient ${CFLAGS} emacsclient.c $(LOADLIBES)
161
162hexl: hexl.c
163 $(CC) -o hexl ${CFLAGS} hexl.c $(LOADLIBES)
164
165timer: getdate.o timer.o
166 $(CC) -o timer $(CFLAGS) getdate.o timer.o
167
168# These are NOT included in INSTALLABLES or UTILITIES.
169# See ../src/ymakefile.
170emacstool: emacstool.c
171 $(CC) emacstool.c -o emacstool ${CFLAGS} \
172 -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
173
174# For SUN Japanese Language Environment
175nemacstool: emacstool.c
176 $(CC) -o nemacstool -DJLE ${CFLAGS} emacstool.c \
177 -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
178
179xvetool: emacstool.c
180 $(CC) -o xvetool -DXVIEW ${CFLAGS} emacstool.c \
181 -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
182 $(LOADLIBES)
183
184xveterm: emacstool.c
185 $(CC) -o xveterm -DXVIEW -DTTERM ${CFLAGS} emacstool.c \
186 -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
187 $(LOADLIBES)
188
189aixcc: aixcc.c
190 $(CC) $(CFLAGS) -o aixcc aixcc.c
191
192aixcc.c: aixcc.lex
193 lex aixcc.lex
194 mv lex.yy.c aixcc.c
diff --git a/make-dist b/make-dist
new file mode 100755
index 00000000000..db0a5cb62c4
--- /dev/null
+++ b/make-dist
@@ -0,0 +1,183 @@
1#!/bin/sh
2#
3# make-dist: create an Emacs distribution tar file from the current
4# source tree. This basically creates a duplicate directory
5# structure, and then hard links into it only those files that should
6# be distributed. This means that if you add a file with an odd name,
7# you should make sure that this script will include it.
8
9progname="$0"
10
11# Exit if a command fails.
12set -e
13
14# Print out each line we read, for debugging's sake.
15# set -v
16
17cleanup=yes
18
19while [ $# -gt 0 ]; do
20 case "$1" in
21 "--no-cleanup" )
22 cleanup=no
23 ;;
24 * )
25 echo "${progname}: Unrecognized argument: $1" >&2
26 exit 1
27 ;;
28 esac
29 shift
30done
31
32# Make sure we're running in the right place.
33if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then
34 echo "${progname}: must run in the top directory of the Emacs" >&2
35 echo "distribution tree. Cd to that directory and try again." >&2
36 exit 1
37fi
38
39# Find out which version of Emacs this is.
40version=`grep 'defconst[ ]*emacs-version' lisp/version.el \
41 | sed -e 's/^.*"\([0-9]+\.[0-9]+\)\..*$/\1/'`
42if [ ! "${version}" ]; then
43 echo "${progname}: can't find current emacs version in ./lisp/version.el." >&2
44 exit 1
45fi
46
47# Make sure the subdirectory is available.
48tempparent="make-dist.$$"
49if [ -d ${tempparent} ]; then
50 echo "${progname}: staging directory ${tempparent} already exists.
51Perhaps a previous invocation of ${progname} failed to clean up
52after itself. Check that directories whose names are of the form
53make-dist.NNNNN don't contain any important information, remove them,
54and try again." >&2
55 exit 1
56fi
57
58echo "Creating staging directory: ${tempparent}"
59mkdir ${tempparent}
60emacsname="emacs-${version}"
61tempdir="${tempparent}/${emacsname}"
62
63echo "Creating top directory: ${tempdir}"
64mkdir ${tempdir}
65
66# We copy in the top-level files before creating the subdirectories in
67# hopes that this will make the top-level files appear first in the
68# tar file.
69echo "Copying top-level files."
70ln INSTALL PROBLEMS README ${tempdir}
71ln ChangeLog Makefile.in build-install.in configure make-dist ${tempdir}
72
73echo "Creating subdirectories."
74for subdir in lisp lisp/term src src/m src/s lib-src oldXMenu \
75 etc lock local-lisp arch-lib cpp info man shortnames; do
76 mkdir ${tempdir}/${subdir}
77done
78
79echo "Copying lisp."
80# Don't distribute =*.el files, site-init.el, or site-load.el.
81(cd lisp
82 ln [a-zA-Z]*.el ../${tempdir}/lisp
83 ln [a-zA-Z]*.elc ../${tempdir}/lisp
84 ln [a-zA-Z]*.defns ../${tempdir}/lisp
85 ln ChangeLog README ../${tempdir}/lisp
86 cd ../${tempdir}/lisp
87 rm -f site-init site-init.el site-init.elc
88 rm -f site-load site-load.el site-load.elc)
89
90echo "Copying lisp/term."
91# Don't distribute =*.el files.
92(cd lisp/term
93 ln [a-zA-Z]*.el ../../${tempdir}/lisp/term
94 ln [a-zA-Z]*.elc ../../${tempdir}/lisp/term
95 ln README ../../${tempdir}/lisp/term)
96
97echo "Copying src."
98# Don't distribute =*.[ch] files, or the configured versions of
99# config.h.in, paths.h.in, or Makefile.in.
100(cd src
101 ln [a-zA-Z]*.c ../${tempdir}/src
102 ln [a-zA-Z]*.h ../${tempdir}/src
103 ln [a-zA-Z]*.s ../${tempdir}/src
104 ln README Makefile.in ymakefile ChangeLog config.h.in paths.h.in \
105 ../${tempdir}/src
106 ln .gdbinit .dbxinit ../${tempdir}/src
107 ln *.com *.opt vms-pp.trans vmsbuild ../${tempdir}/src
108 cd ../${tempdir}/src
109 etags *.h *.c ../lisp/*.el)
110
111echo "Copying src/m."
112(cd src/m
113 ln README *.h ../../${tempdir}/src/m)
114
115echo "Copying src/s."
116(cd src/s
117 ln README *.h ../../${tempdir}/src/s)
118
119echo "Copying lib-src."
120(cd lib-src
121 ln [a-zA-Z]*.c [a-zA-Z]*.h [a-zA-Z]*.y [a-zA-Z]*.lex ../${tempdir}/lib-src
122 ln ChangeLog Makefile.in README testfile ../${tempdir}/lib-src)
123
124echo "Copying oldXMenu."
125(cd oldXMenu
126 ln *.c *.h ../${tempdir}/oldXMenu
127 ln README Makefile Imakefile ChangeLog ../${tempdir}/oldXMenu)
128
129echo "Copying etc."
130# Don't distribute DOC files, backups, autosaves, or tex litter.
131(cd etc
132 ln [0-9a-zA-Z]* ../${tempdir}/etc
133 cd ../${tempdir}/etc
134 # Avoid an error when expanding the wildcards later.
135 for dummy in DOC-dummy dummy~ \#dummy\# dummy.dvi dummy.log; do
136 ln MACHINES ${dummy}
137 done
138 rm -f DOC* *~ \#*\# *.dvi *.log core)
139
140# For now, we comment these out, since I'm not changing them any.
141#!! echo "Copying cpp."
142#!! (cd cpp
143#!! ln cccp.c cexp.y Makefile README ../${tempdir}/cpp)
144#!!
145#!! echo "Copying info."
146#!! # Don't distribute backups or autosaves.
147#!! (cd info
148#!! ln [a-zA-Z]* ../${tempdir}/info
149#!! cd ../${tempdir}/info
150#!! # Avoid an error when expanding the wildcards later.
151#!! ln emacs dummy~ ; ln emacs \#dummy\#
152#!! rm -f *~ \#*\# core)
153#!!
154#!! echo "Copying man."
155#!! (cd man
156#!! ln *.tex *.texinfo *.texi *.aux *.cps *.fns *.kys *.vrs ../${tempdir}/man
157#!! ln *.c ../${tempdir}/man
158#!! ln ChangeLog Makefile README split-man ../${tempdir}/man)
159
160echo "Copying shortnames."
161(cd shortnames
162 ln *.c ../${tempdir}/shortnames
163 ln Makefile reserved special ../${tempdir}/shortnames)
164
165echo "Making sure copying notices are symlinks."
166if [ -f ${tempdir}/etc/COPYING ]; then
167 rm ${tempdir}/etc/COPYING
168 ln etc/COPYING ${tempdir}/etc/COPYING
169fi
170for subdir in lisp src lib-src info shortnames; do
171 if [ -f ${tempdir}/${subdir}/COPYING ]; then
172 rm ${tempdir}/${subdir}/COPYING
173 fi
174 ln -s ../etc/COPYING ${tempdir}/${subdir}
175done
176
177echo "Creating tar file."
178(cd ${tempparent}; tar cvf - ${emacsname}) | compress > ${emacsname}.tar.Z
179
180if [ "${cleanup}" = yes ]; then
181 echo "Cleaning up the staging directory."
182 rm -rf ${tempparent}
183fi
diff --git a/src/epaths.in b/src/epaths.in
new file mode 100644
index 00000000000..7d92875bd88
--- /dev/null
+++ b/src/epaths.in
@@ -0,0 +1,33 @@
1/* Hey Emacs, this is -*- C -*- code! */
2
3/* The default search path for Lisp function "load".
4 This sets load-path. */
5#define PATH_LOADSEARCH "/usr/local/lib/emacs/lisp"
6
7/* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This
8 path is usually identical to PATH_LOADSEARCH except that the entry
9 for the directory containing the installed lisp files has been
10 replaced with ../lisp. */
11#define PATH_DUMPLOADSEARCH "../lisp"
12
13/* The extra search path for programs to invoke. This is appended to
14 whatever the PATH environment variable says to set the Lisp
15 variable exec-path and the first file name in it sets the Lisp
16 variable exec-directory. exec-directory is used for finding
17 executables and other architecture-dependent files. */
18#define PATH_EXEC "/usr/local/lib/emacs/etc"
19
20/* Where Emacs should look for its architecture-independent data
21 files, like the docstring file. The lisp variable data-directory
22 is set to this value. */
23#define PATH_DATA "/usr/local/lib/emacs/data"
24
25/* The name of the directory that contains lock files with which we
26 record what files are being modified in Emacs. This directory
27 should be writable by everyone. THE STRING MUST END WITH A
28 SLASH!!! */
29#define PATH_LOCK "/usr/local/lib/emacs/lock/"
30
31/* the name of the file !!!SuperLock!!! in the directory
32 specified by PATH_LOCK. Yes, this is redundant. */
33#define PATH_SUPERLOCK "/usr/local/lib/emacs/lock/!!!SuperLock!!!"