blob: 9dde5204d7827010fa5fe0c67542d1830ec5ed8a (
plain)
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
|
prefix=@prefix@
bindir=@bindir@
datadir=@datadir@
mydatadir=$(datadir)/et
thisconfigdir=../..
myfulldir=util/et
mydir=util/et
BUILDTOP=$(REL)..$(S)..
RELDIR=../util/et
SED = sed
DEFS=
##DOS##BUILDTOP = ..\..
##DOS##LIBNAME=$(OUTPRE)comerr.lib
##DOS##XTRA=
##DOS##OBJFILE=$(OUTPRE)comerr.lst
STLIBOBJS=error_message.o et_name.o com_err.o
STOBJLISTS=OBJS.ST
LIBBASE=com_err
LIBMAJOR=3
LIBMINOR=0
LIBINITFUNC=com_err_initialize
LIBFINIFUNC=com_err_terminate
all-unix:: all-liblinks
clean-unix:: clean-liblinks clean-libs clean-libobjs clean-lclint
install-unix:: install-libs
LINTFLAGS=-uhvb
LINTFILES= error_message.c et_name.c com_err.c
LIBOBJS=$(OUTPRE)com_err.$(OBJEXT) \
$(OUTPRE)error_message.$(OBJEXT) \
$(OUTPRE)et_name.$(OBJEXT)
# for et_lex.lex.c include in error_table.y
LOCALINCLUDES=-I. -I$(srcdir)
FILES= Makefile et_name.c error_message.c compile_et.c \
et_lex.lex.l error_table.y init_et.c \
com_err.c com_err.h \
error_table.h mit-sipb-copyright.h \
test_et.c test1.et test2.et \
t_com_err.c et1.et et2.et \
compiler.h internal.h \
com_err.texinfo texinfo.tex
#SRCS= compile_et.c error_table.c error_message.c et_name.c \
# init_et.c com_err.c
SRCS= $(srcdir)/error_message.c \
$(srcdir)/et_name.c \
$(srcdir)/com_err.c
#
# Warning flags
#
# Uncomment WFLAGS if you want really anal GCC warning messages
#
#
WFLAGS= -ansi -D_POSIX_SOURCE -pedantic \
-Wall -Wwrite-strings -Wpointer-arith \
-Wcast-qual -Wcast-align -Wtraditional \
-Wstrict-prototypes -Wmissing-prototypes \
-Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow
DEPLIBS=
SHLIB_LIBS=
SHLIB_EXPDEPS = $(SUPPORT_DEPLIB)
SHLIB_EXPLIBS=-l$(SUPPORT_LIBNAME) $(LIBS)
SHLIB_LDFLAGS= $(LDFLAGS) @SHLIB_RPATH_DIRS@
SHLIB_LIBDIRS= @SHLIB_LIBDIRS@
SHLIB_RDIRS=$(KRB5_LIBDIR)
SHLIB_DIRS=-L$(TOPLIBD)
COM_ERR_HDR=$(BUILDTOP)$(S)include$(S)com_err.h
all-windows:: $(COM_ERR_HDR)
$(COM_ERR_HDR): com_err.h
$(CP) com_err.h "$@"
generate-files-mac: compile_et
error_table.c: et_lex.lex.c
error_table.c: $(srcdir)/error_table.y
error_table.o: error_table.c et_lex.lex.c
$(CC) $(ALL_CFLAGS) -c error_table.c
com_err.o : com_err.c
et_lex.lex.o: et_lex.lex.c
test1.o: test1.c
test2.o: test2.c
test_et.o: test1.h test2.h
et1.o: et1.c
et2.o: et2.c
test1.c test2.c et1.c et2.c test1.h test2.h et1.h et2.h: \
compile_et et_c.awk et_h.awk
t_com_err.o: et1.h et2.h t_com_err.c
# /u1/kr/lclint-2.5q/bin/lclint -warnposix -D__sparc
LCLINT=lclint
# +posixlib gets more complete errno list than ansilib
# -usedef turns off bogus warnings from poor dataflow analysis (should be
# redundant with gcc warnings anyways)
# -warnposix
# +charintliteral
# +ignoresigns
# -predboolint
# -exportlocal
# -retvalint allow ignoring of int return values (e.g., fputs)
LCLINTOPTS=+posixlib \
-usedef -warnposix +charintliteral +ignoresigns -predboolint +boolint \
-exportlocal -retvalint \
+mod-uncon +modinternalstrict +modfilesys
com_err.lcd: error_table.c error_table.h et_lex.lex.c com_err.h
$(LCLINT) $(LCLINTOPTS) $(LOCALINCLUDES) $(DEFS) $(SRCS) \
-dump com_err.new -expect 1
mv -f com_err.new com_err.lcd
do-lclint: com_err.lcd t_com_err.c et1.c et2.c et1.h et2.h
$(LCLINT) $(LCLINTOPTS) $(LOCALINCLUDES) \
$(srcdir)/t_com_err.c et1.c et2.c
# "-load com_err.lcd" -> lclint brokenness
clean-lclint:
$(RM) com_err.new com_err.lcd
ITS4=its4
ITS4OPTS=
do-its4: error_table.y et_lex.lex.c
$(ITS4) $(ITS4OPTS) $(SRCS)
#test_et: test_et.o test1.o test2.o $(LIBOBJS)
# $(CC) -o test_et test_et.o test1.o test2.o $(LIBOBJS)
#t_com_err: t_com_err.o et1.o et2.o $(LIBOBJS)
# $(CC) -o t_com_err t_com_err.o et1.o et2.o $(LIBOBJS)
PROG_RPATH=$(KRB5_LIBDIR)
PROG_LIBPATH=-L$(TOPLIBD)
test_et: test_et.o test1.o test2.o $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB)
$(CC_LINK) -o test_et test_et.o test1.o test2.o -lcom_err $(SUPPORT_LIB)
t_com_err: t_com_err.o et1.o et2.o $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB)
$(CC_LINK) -o t_com_err t_com_err.o et1.o et2.o -lcom_err $(SUPPORT_LIB)
$(OUTPRE)test_et.exe: $(OUTPRE)test_et.$(OBJEXT) $(OUTPRE)test1.$(OBJEXT) \
$(OUTPRE)test2.$(OBJEXT) $(CLIB)
link $(EXE_LINKOPTS) -out:$(OUTPRE)test_et$(EXEEXT) $**
all-unix:: compile_et includes
includes:: com_err.h
if cmp $(srcdir)/com_err.h \
$(BUILDTOP)/include/com_err.h >/dev/null 2>&1; then :; \
else \
(set -x; $(RM) $(BUILDTOP)/include/com_err.h; \
$(CP) $(srcdir)/com_err.h \
$(BUILDTOP)/include/com_err.h) ; \
fi
clean-unix::
$(RM) $(BUILDTOP)/include/com_err.h
RUN_SETUP = @KRB5_RUN_ENV@
# test_et doesn't have an interesting exit status, but it'll exercise
# some cases that t_com_err doesn't, so let's see if it crashes.
check-unix:: t_com_err test_et
$(RUN_SETUP) $(VALGRIND) ./test_et
$(RUN_SETUP) $(VALGRIND) ./t_com_err
check-windows:: $(OUTPRE)test_et$(EXEEXT)
set path=$(BUILDTOP)\lib\$(OUTPRE);%path%;
path
$(OUTPRE)test_et$(EXEEXT)
# The real compile_et just isn't portable. (But then again, anything using
# lex and yacc isn't portable by definition. :-( )
#
#compile_et: compile_et.o error_table.o
# $(CC) $(CFLAGS) -o $@ compile_et.o error_table.o $(LEXLIB) $(BSDLIB)
#
install-unix:: compile_et
$(INSTALL) compile_et $(DESTDIR)$(bindir)/compile_et
test -d $(DESTDIR)$(mydatadir) || mkdir $(DESTDIR)$(mydatadir)
$(INSTALL_DATA) $(srcdir)/et_c.awk $(DESTDIR)$(mydatadir)
$(INSTALL_DATA) $(srcdir)/et_h.awk $(DESTDIR)$(mydatadir)
install-headers:: compile_et
compile_et: $(srcdir)/compile_et.sh $(srcdir)/config_script
$(SHELL) $(srcdir)/config_script $(srcdir)/compile_et.sh \
"$(mydatadir)" $(AWK) $(SED) > compile_et
chmod 755 compile_et
rebuild: rebuild-c rebuild-h
rebuild-c:
a2p < $(srcdir)/et_c.awk | awk 'NR != 1 || $$0 !~ /^\043!/{print;}' > $(srcdir)/et_c.tmp
mv -f $(srcdir)/et_c.tmp $(srcdir)/et_c.pl
rebuild-h:
a2p < $(srcdir)/et_h.awk | awk 'NR != 1 || $$0 !~ /^\043!/{print;}' > $(srcdir)/et_h.tmp
mv -f $(srcdir)/et_h.tmp $(srcdir)/et_h.pl
clean-unix::
$(RM) compile_et
depend::
install:: com_err.h
$(INSTALL_DATA) $(srcdir)/com_err.h $(DESTDIR)$(KRB5_INCDIR)/com_err.h
install-unix:: compile_et.1
$(INSTALL_DATA) $(srcdir)/compile_et.1 $(DESTDIR)$(CLIENT_MANDIR)/compile_et.1
## install_library_target(com_err,$(LIBOBJS),$(LINTFILES),)
clean-unix:: clean-files
clean-files::
rm -f *~ \#* *.bak \
*.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
*.cp *.fn *.ky *.log *.pg *.tp *.vr \
*.o profiled/?*.o libcom_err.a libcom_err_p.a \
com_err.o compile_et \
et.ar TAGS y.tab.c lex.yy.c error_table.c \
et_lex.lex.c \
test1.h test1.c test2.h test2.c test_et \
et1.c et1.h et2.c et2.h t_com_err \
eddep makedep *.ln
clean-windows::
$(RM) $(COM_ERR_HDR)
com_err.ps : com_err.dvi
com_err.dvi: com_err.texinfo
libcom_err.o: $(LIBOBJS)
ld -r -s -o libcom_err.o $(LIBOBJS)
chmod -x libcom_err.o
archive: et.tar
TAGS: et_name.c error_message.c compile_et.c error_table.c \
lex.yy.c init_et.c
etags et_name.c error_message.c compile_et.c \
error_table.c init_et.c
depend:: et_lex.lex.c includes compile_et
@lib_frag@
@libobj_frag@
|