* vc.el (vc-do-command): Set the default directory of the *vc*
[bpt/emacs.git] / lib-src / Makefile.in
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.
13 SHELL = /bin/sh
14
15 # Allow the user to specify the install program.
16 INSTALL = install
17 INSTALLFLAGS =
18
19 # Things that a user might actually run, which should be installed in bindir.
20 INSTALLABLES = etags ctags emacsclient b2m
21
22 # Things that Emacs runs internally, or during the build process,
23 # which should not be installed in bindir.
24 UTILITIES= test-distrib wakeup make-docfile digest-doc sorted-doc \
25 movemail cvtmail fakemail yow env emacsserver hexl timer
26
27 # Like UTILITIES, but they're not system-dependent, and should not be
28 # deleted by the distclean target.
29 SCRIPTS= rcs2log vcdiff
30
31 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS}
32
33 # These things are edited by ../configure; don't change anything before
34 # or including the '='; everything after that gets blown away.
35 CC=gcc
36 CONFIG_CFLAGS= -g -O
37 LOADLIBES=
38
39 CFLAGS=${CONFIG_CFLAGS} -Demacs -I../src
40
41 all: ../arch-lib
42
43 # We use rm -f so that rm won't try to ask questions during the build.
44 ../arch-lib: ${EXECUTABLES}
45 for file in ${EXECUTABLES} ; do \
46 if [ -f $${file} ]; then \
47 if [ -f ../arch-lib/$${file} ]; then \
48 rm -f ../arch-lib/$${file} ; \
49 fi ; \
50 ln $${file} ../arch-lib ; \
51 fi ; \
52 done
53
54 # We don't need to install `wakeup' explicitly, because it will be copied when
55 # this whole directory is copied.
56 install: all
57 ${INSTALL} ${INSTALLFLAGS} -c emacsclient ${BINDIR}/emacsclient
58 ${INSTALL} ${INSTALLFLAGS} -c etags ${BINDIR}/etags
59 ${INSTALL} ${INSTALLFLAGS} -c ctags ${BINDIR}/ctags
60 ${INSTALL} ${INSTALLFLAGS} -c b2m ${BINDIR}/b2m
61 ${INSTALL} ${INSTALLFLAGS} -c -m 444 emacs.1 ${MANDIR}/emacs.${MANEXT}
62
63 install.sysv: all
64 -cp emacsclient ${BINDIR}/emacsclient.new
65 -chmod 755 ${BINDIR}/emacsclient.new
66 -chgrp bin ${BINDIR}/emacsclient.new
67 -chown bin ${BINDIR}/emacsclient.new
68 -mv ${BINDIR}/emacsclient.new ${BINDIR}/emacsclient
69 -cp etags ${BINDIR}/etags.new
70 -chmod 755 ${BINDIR}/etags.new
71 -chgrp bin ${BINDIR}/etags.new
72 -chown bin ${BINDIR}/etags.new
73 -mv ${BINDIR}/etags.new ${BINDIR}/etags
74 -cp ctags ${BINDIR}/ctags.new
75 -chmod 755 ${BINDIR}/ctags.new
76 -chgrp bin ${BINDIR}/ctags.new
77 -chown bin ${BINDIR}/ctags.new
78 -mv ${BINDIR}/ctags.new ${BINDIR}/ctags
79 -cp b2m ${BINDIR}/b2m.new
80 -chmod 755 ${BINDIR}/b2m.new
81 -chgrp bin ${BINDIR}/b2m.new
82 -chown bin ${BINDIR}/b2m.new
83 -mv ${BINDIR}/b2m.new ${BINDIR}/b2m
84 -cp emacs.1 ${MANDIR}/emacs.${MANEXT}.new
85 -chmod 444 ${MANDIR}/emacs.${MANEXT}.new
86 -mv ${MANDIR}/emacs.${MANEXT}.new ${MANDIR}/emacs.${MANEXT}
87
88 install.xenix:
89 cp etags ctags emacsclient ${BINDIR}
90 chmod 755 ${BINDIR}/etags ${BINDIR}/ctags
91 chmod 755 ${BINDIR}/emacsclient
92 cp b2m ${BINDIR}
93 chmod 755 ${BINDIR}/b2m
94 cp emacs.1 ${MANDIR}/emacs.${MANEXT}
95 chmod 444 ${MANDIR}/emacs.${MANEXT}
96
97
98 clean mostlyclean:
99 -rm -f ${INSTALLABLES} ${UTILITIES} core *.o
100
101 distclean:
102 -rm -f ${INSTALLABLES} ${UTILITIES} *~ \#* ../etc/DOC* core *.o
103 cd ../arch-lib; rm -f ${EXECUTABLES}
104
105 realclean: distclean
106 rm TAGS aixcc.c
107
108 # Test the contents of the directory.
109 check:
110 @echo "We don't have any tests for GNU Emacs yet."
111
112 TAGS: etags
113 etags *.[ch]
114
115 # This verifies that the non-ASCII characters in the file `testfile'
116 # have not been clobbered by whatever means were used to copy and
117 # distribute Emacs. If they were clobbered, all the .elc files were
118 # clobbered too.
119 test-distrib: test-distrib.c
120 $(CC) -o test-distrib test-distrib.c
121 ./test-distrib
122
123 GETOPTOBJS = getopt.o getopt1.o
124 GETOPTDEPS = $(GETOPTOBJS) getopt.h
125 getopt.o: getopt.c getopt.h
126 getopt1.o: getopt1.c getopt.h
127
128 etags: etags.c $(GETOPTDEPS)
129 $(CC) ${CFLAGS} -DETAGS etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags
130
131 ctags: etags.c $(GETOPTDEPS)
132 $(CC) ${CFLAGS} -DCTAGS etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
133
134 wakeup: wakeup.c
135 $(CC) ${CFLAGS} wakeup.c $(LOADLIBES) -o wakeup
136
137 make-docfile: make-docfile.c
138 $(CC) ${CFLAGS} make-docfile.c $(LOADLIBES) -o make-docfile
139
140 digest-doc: digest-doc.c
141 $(CC) ${CFLAGS} digest-doc.c $(LOADLIBES) -o digest-doc
142
143 sorted-doc: sorted-doc.c
144 $(CC) ${CFLAGS} sorted-doc.c $(LOADLIBES) -o sorted-doc
145
146 b2m: b2m.c ../src/config.h
147 $(CC) ${CFLAGS} b2m.c $(LOADLIBES) -o b2m
148
149 movemail: movemail.c ../src/config.h
150 $(CC) ${CFLAGS} movemail.c $(LOADLIBES) -o movemail
151
152 cvtmail: cvtmail.c
153 $(CC) ${CFLAGS} cvtmail.c $(LOADLIBES) -o cvtmail
154
155 fakemail: fakemail.c ../src/config.h
156 $(CC) ${CFLAGS} fakemail.c $(LOADLIBES) -o fakemail
157
158 yow: yow.c ../src/paths.h
159 $(CC) ${CFLAGS} yow.c $(LOADLIBES) -o yow
160
161 env: env.c ../src/config.h
162 $(CC) -DEMACS ${CFLAGS} env.c $(LOADLIBES) -o env
163
164 emacsserver: emacsserver.c ../src/config.h
165 $(CC) ${CFLAGS} emacsserver.c $(LOADLIBES) -o emacsserver
166
167 emacsclient: emacsclient.c ../src/config.h
168 $(CC) ${CFLAGS} emacsclient.c $(LOADLIBES) -o emacsclient
169
170 hexl: hexl.c
171 $(CC) ${CFLAGS} hexl.c $(LOADLIBES) -o hexl
172
173 getdate.o: getdate.y ../src/config.h
174 ${YACC} ${YFLAGS} getdate.y
175 $(CC) $(CFLAGS) -c y.tab.c
176 mv y.tab.o getdate.o
177 timer: getdate.o timer.o
178 $(CC) $(CFLAGS) getdate.o timer.o -o timer
179
180 make-path: make-path.c
181 $(CC) $(CFLAGS) make-path.c -o make-path
182
183 # These are NOT included in INSTALLABLES or UTILITIES.
184 # See ../src/ymakefile.
185 emacstool: emacstool.c
186 $(CC) emacstool.c -o emacstool ${CFLAGS} \
187 -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
188
189 # For SUN Japanese Language Environment
190 nemacstool: emacstool.c
191 $(CC) -o nemacstool -DJLE ${CFLAGS} emacstool.c \
192 -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
193
194 xvetool: emacstool.c
195 $(CC) -o xvetool -DXVIEW ${CFLAGS} emacstool.c \
196 -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
197 $(LOADLIBES)
198
199 xveterm: emacstool.c
200 $(CC) -o xveterm -DXVIEW -DTTERM ${CFLAGS} emacstool.c \
201 -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
202 $(LOADLIBES)
203
204 aixcc: aixcc.c
205 $(CC) $(CFLAGS) -o aixcc aixcc.c
206
207 aixcc.c: aixcc.lex
208 lex aixcc.lex
209 mv lex.yy.c aixcc.c