/
Makefile.in
284 lines (232 loc) · 8.52 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
#
# $Id: Makefile.in,v 2.4 1996/10/15 20:16:35 hzoli Exp $
#
# Makefile for Src subdirectory
#
# Copyright (c) 1996 Richard Coleman
# All rights reserved.
#
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and to distribute modified versions of this software for any
# purpose, provided that the above copyright notice and the following
# two paragraphs appear in all copies of this software.
#
# In no event shall Richard Coleman or the Zsh Development Group be liable
# to any party for direct, indirect, special, incidental, or consequential
# damages arising out of the use of this software and its documentation,
# even if Richard Coleman and the Zsh Development Group have been advised of
# the possibility of such damage.
#
# Richard Coleman and the Zsh Development Group specifically disclaim any
# warranties, including, but not limited to, the implied warranties of
# merchantability and fitness for a particular purpose. The software
# provided hereunder is on an "as is" basis, and Richard Coleman and the
# Zsh Development Group have no obligation to provide maintenance,
# support, updates, enhancements, or modifications.
#
# zsh version
VERSION = @VERSION@
SHELL = /bin/sh
top_srcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
CC = @CC@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INCLUDES = -I.. -I. -I$(srcdir) -Ifb
COMPILE = $(CC) -c $(INCLUDES) $(CPPFLAGS) $(DEFS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
AWK = @AWK@
SED = sed
.SUFFIXES:
.SUFFIXES: .c .o .pro
.c.o:
$(COMPILE) $<
.c.pro:
$(SED) -n -f $(srcdir)/makepro.sed $< > $@
# this is for ansi2krn conversion
U = @U@
# this header file is parsed to generate signal names (signames.h)
SIGNAL_H = @SIGNAL_H@
# this header file is parsed to generate limits, if available
RLIMITS_INC_H = @RLIMITS_INC_H@
# headers included in distribution
DIST_HDRS = version.h globals.h hashtable.h prototypes.h signals.h \
system.h zle.h zsh.h ztype.h
# generated headers
GEN_HDRS = signames.h ../config.h @RLIMITS_SRC_H@
# zsh headers necessary for compilation
HDRS = $(DIST_HDRS) $(GEN_HDRS)
# zsh C source
SRCS = getdate.c builtin.c compat.c cond.c exec.c glob.c hashtable.c hist.c init.c \
input.c jobs.c lex.c linklist.c loop.c math.c mem.c params.c parse.c \
signals.c subst.c text.c utils.c watch.c zle_bindings.c zle_hist.c \
zle_main.c zle_misc.c zle_move.c zle_refresh.c zle_tricky.c zle_utils.c \
zle_vi.c zle_word.c
# generated prototypes
PROTO = getdate.pro builtin.pro compat.pro cond.pro exec.pro glob.pro hashtable.pro \
hist.pro init.pro input.pro jobs.pro lex.pro linklist.pro loop.pro \
math.pro mem.pro params.pro parse.pro signals.pro subst.pro text.pro \
utils.pro watch.pro zle_hist.pro zle_main.pro \
zle_misc.pro zle_move.pro zle_refresh.pro zle_tricky.pro zle_utils.pro \
zle_vi.pro zle_word.pro
# object files
OBJS = $Ugetdate.o $Ubuiltin.o $Ucompat.o $Ucond.o $Uexec.o $Uglob.o $Uhashtable.o \
$Uhist.o $Uinit.o $Uinput.o $Ujobs.o $Ulex.o $Ulinklist.o $Uloop.o \
$Umath.o $Umem.o $Uparams.o $Uparse.o $Usignals.o $Usubst.o $Utext.o \
$Uutils.o $Uwatch.o $Uzle_bindings.o $Uzle_hist.o $Uzle_main.o \
$Uzle_misc.o $Uzle_move.o $Uzle_refresh.o $Uzle_tricky.o $Uzle_utils.o \
$Uzle_vi.o $Uzle_word.o
# auxiliary files
AUX = Makefile.in .indent.pro signames.awk rlimits.awk makepro.sed \
ansi2knr.c TAGS tags
# all files in this directory included in the distribution
DIST = $(DIST_HDRS) $(SRCS) $(AUX)
# ========= DEPENDENCIES FOR BUILDING ==========
# default target
all: zsh
zsh: $(OBJS)
$(LINK) $(OBJS) $(LIBS)
ansi2knr: ansi2knr.o
$(LINK) ansi2knr.o
signames.h: signames.awk
$(AWK) -f $(srcdir)/signames.awk $(SIGNAL_H) > signames.h
prototypes.h: $(PROTO)
# this file will not be made if limits are unavailable:
# silent so the warning doesn't appear unless necessary
rlimits.h: rlimits.awk $(RLIMITS_INC_H)
@echo '$(AWK) -f $(srcdir)/rlimits.awk $(RLIMITS_INC_H) > rlimits.h'; \
$(AWK) -f $(srcdir)/rlimits.awk $(RLIMITS_INC_H) > rlimits.h || \
echo WARNING: unknown limits: mail rlimits.h to developers
$(OBJS): $(HDRS)
$(PROTO): makepro.sed
# ========== DEPENDENCIES FOR INSTALLING ==========
install: install.bin
uninstall: uninstall.bin
# install binary, creating install directory if necessary
install.bin: zsh
$(top_srcdir)/mkinstalldirs $(bindir)
-if [ -f $(bindir)/zsh ]; then mv $(bindir)/zsh $(bindir)/zsh.old; fi
$(INSTALL_PROGRAM) zsh $(bindir)/zsh
-if [ -f $(bindir)/zsh-$(VERSION) ]; then rm -f $(bindir)/zsh-$(VERSION); fi
ln $(bindir)/zsh $(bindir)/zsh-$(VERSION)
# uninstall binary
uninstall.bin:
-if [ -f $(bindir)/zsh ]; then rm -f $(bindir)/zsh; fi
-if [ -f $(bindir)/zsh-$(VERSION) ]; then rm -f $(bindir)/zsh-$(VERSION); fi
# ========== DEPENDENCIES FOR ANSI TO KNR CONVERSION ==========
_getdate.c: getdate.c ansi2knr
./ansi2knr $(srcdir)/getdate.c > _getdate.c
_builtin.c: builtin.c ansi2knr
./ansi2knr $(srcdir)/builtin.c > _builtin.c
_compat.c: compat.c ansi2knr
./ansi2knr $(srcdir)/compat.c > _compat.c
_cond.c: cond.c ansi2knr
./ansi2knr $(srcdir)/cond.c > _cond.c
_exec.c: exec.c ansi2knr
./ansi2knr $(srcdir)/exec.c > _exec.c
_glob.c: glob.c ansi2knr
./ansi2knr $(srcdir)/glob.c > _glob.c
_hashtable.c: hashtable.c ansi2knr
./ansi2knr $(srcdir)/hashtable.c > _hashtable.c
_hist.c: hist.c ansi2knr
./ansi2knr $(srcdir)/hist.c > _hist.c
_init.c: init.c ansi2knr
./ansi2knr $(srcdir)/init.c > _init.c
_input.c: input.c ansi2knr
./ansi2knr $(srcdir)/input.c > _input.c
_jobs.c: jobs.c ansi2knr
./ansi2knr $(srcdir)/jobs.c > _jobs.c
_lex.c: lex.c ansi2knr
./ansi2knr $(srcdir)/lex.c > _lex.c
_linklist.c: linklist.c ansi2knr
./ansi2knr $(srcdir)/linklist.c > _linklist.c
_loop.c: loop.c ansi2knr
./ansi2knr $(srcdir)/loop.c > _loop.c
_math.c: math.c ansi2knr
./ansi2knr $(srcdir)/math.c > _math.c
_mem.c: mem.c ansi2knr
./ansi2knr $(srcdir)/mem.c > _mem.c
_params.c: params.c ansi2knr
./ansi2knr $(srcdir)/params.c > _params.c
_parse.c: parse.c ansi2knr
./ansi2knr $(srcdir)/parse.c > _parse.c
_signals.c: signals.c ansi2knr
./ansi2knr $(srcdir)/signals.c > _signals.c
_subst.c: subst.c ansi2knr
./ansi2knr $(srcdir)/subst.c > _subst.c
_text.c: text.c ansi2knr
./ansi2knr $(srcdir)/text.c > _text.c
_utils.c: utils.c ansi2knr
./ansi2knr $(srcdir)/utils.c > _utils.c
_watch.c: watch.c ansi2knr
./ansi2knr $(srcdir)/watch.c > _watch.c
_zle_bindings.c: zle_bindings.c ansi2knr
./ansi2knr $(srcdir)/zle_bindings.c > _zle_bindings.c
_zle_hist.c: zle_hist.c ansi2knr
./ansi2knr $(srcdir)/zle_hist.c > _zle_hist.c
_zle_main.c: zle_main.c ansi2knr
./ansi2knr $(srcdir)/zle_main.c > _zle_main.c
_zle_misc.c: zle_misc.c ansi2knr
./ansi2knr $(srcdir)/zle_misc.c > _zle_misc.c
_zle_move.c: zle_move.c ansi2knr
./ansi2knr $(srcdir)/zle_move.c > _zle_move.c
_zle_refresh.c: zle_refresh.c ansi2knr
./ansi2knr $(srcdir)/zle_refresh.c > _zle_refresh.c
_zle_tricky.c: zle_tricky.c ansi2knr
./ansi2knr $(srcdir)/zle_tricky.c > _zle_tricky.c
_zle_utils.c: zle_utils.c ansi2knr
./ansi2knr $(srcdir)/zle_utils.c > _zle_utils.c
_zle_vi.c: zle_vi.c ansi2knr
./ansi2knr $(srcdir)/zle_vi.c > _zle_vi.c
_zle_word.c: zle_word.c ansi2knr
./ansi2knr $(srcdir)/zle_word.c > _zle_word.c
# ========== DEPENDENCIES FOR CLEANUP ==========
mostlyclean:
rm -f core *.o *~
clean: mostlyclean
rm -f zsh ansi2knr signames.h rlimits.h _*.c *.pro
distclean: clean
rm -f Makefile
realclean: distclean
rm -f TAGS tags
superclean: realclean
# ========== DEPENDENCIES FOR MAINTENANCE ==========
subdir = Src
Makefile: Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# tag file for vi
tags: TAGS
cd $(srcdir) && ctags -w $(SRCS) $(DIST_HDRS) && \
if test -d RCS; then \
rm -f RCS/tags,v RCS/TAGS,v && \
ci -t-tags -m'#tags' tags TAGS && \
rcs -U tags TAGS && \
co TAGS tags ; \
fi
# tag file for emacs
TAGS: $(SRCS) $(DIST_HDRS)
cd $(srcdir) && etags $(SRCS) $(DIST_HDRS)
distdir = ../`cat ../distname`/$(subdir)
dist: $(DIST)
@echo "Copying distribution files in $(subdir)"
for file in $(DIST); do \
cp -p $$file $(distdir); \
done
rcsdistdir = ../`cat ../rcsdistname`/$(subdir)
dist-rcs: $(DIST)
@echo "Copying distribution files in $(subdir) (RCS source)"
for file in $(DIST); do \
ci $$file; \
cp -p RCS/$$file,v $(rcsdistdir)/RCS; \
co -l $$file; \
done