Remove "unused" warnings from lex generated files
[openafs.git] / src / comerr / Makefile.in
1 #
2 # Makefile for error-table routines
3 #
4 # Copyright 1987, 1989 MIT Student Information Processing Board
5 # For copyright info, see mit-sipb-cr.h.
6
7 srcdir=@srcdir@
8 include @TOP_OBJDIR@/src/config/Makefile.config
9 INSTALL = @INSTALL@
10 INSTALL_DATA = @INSTALL_DATA@
11 INSTALL_PROGRAM = @INSTALL_PROGRAM@
12 INSTALL_SCRIPT = @INSTALL_SCRIPT@
13
14 all: compile_et ${TOP_INCDIR}/afs/com_err.h ${TOP_INCDIR}/afs/error_table.h ${TOP_INCDIR}/afs/mit-sipb-cr.h ${TOP_LIBDIR}/libcom_err.a
15
16 ${TOP_INCDIR}/afs/com_err.h: com_err.h
17         ${INSTALL_DATA} $? $@
18
19 ${TOP_INCDIR}/afs/error_table.h: error_table.h
20         ${INSTALL_DATA} $? $@
21
22 ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
23         ${INSTALL_DATA} $? $@
24
25 ${TOP_LIBDIR}/libcom_err.a: libcom_err.a
26         ${INSTALL_DATA} $? $@
27
28 et_lex.lex.c: et_lex.lex.l
29         $(RM) -f et_lex.lex.c
30         $(LEX) -t $(srcdir)/et_lex.lex.l > et_lex.lex.c
31
32 compile_et:     compile_et.o error_table.o
33         case $(SYS_NAME) in \
34         *_linux* | *_umlinux* ) \
35         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil;; \
36         * ) \
37         ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil -ll;; \
38         esac
39
40 libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
41         $(RM) -f $@
42         $(AR) crv $@ error_msg.o et_name.o com_err.o AFS_component_version_number.o
43         $(RANLIB) $@
44
45 #
46 # When we build this file, we're using a .c file that's in the object directory,
47 # so we need to add the source directory to the includes to pick up local headers.
48 #
49 error_table.o: error_table.c
50         $(CC) $(CFLAGS) -I${srcdir} @CFLAGS_NOUNUSED@ -c $<
51
52 #
53 # Installation targets
54 #
55 install: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
56         ${INSTALL} -d ${DESTDIR}${bindir}
57         ${INSTALL} -d ${DESTDIR}${includedir}/afs
58         ${INSTALL} -d ${DESTDIR}${libdir}/afs
59         ${INSTALL_PROGRAM} compile_et ${DESTDIR}${bindir}/afs_compile_et
60         ${INSTALL_DATA} com_err.h ${DESTDIR}${includedir}/afs/com_err.h
61         ${INSTALL_DATA} error_table.h ${DESTDIR}${includedir}/afs/error_table.h
62         ${INSTALL_DATA} mit-sipb-cr.h ${DESTDIR}${includedir}/afs/mit-sipb-cr.h
63         ${INSTALL_DATA} libcom_err.a ${DESTDIR}${libdir}/afs/libcom_err.a
64
65 dest: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
66         ${INSTALL} -d ${DEST}/bin
67         ${INSTALL} -d ${DEST}/include/afs
68         ${INSTALL} -d ${DEST}/lib/afs
69         ${INSTALL_PROGRAM} compile_et ${DEST}/bin/afs_compile_et
70         ${INSTALL_DATA} com_err.h ${DEST}/include/afs/com_err.h
71         ${INSTALL_DATA} error_table.h ${DEST}/include/afs/error_table.h
72         ${INSTALL_DATA} mit-sipb-cr.h ${DEST}/include/afs/mit-sipb-cr.h
73         ${INSTALL_DATA} libcom_err.a ${DEST}/lib/afs/libcom_err.a
74
75 clean:
76         $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
77                 *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libcom_err.a \
78                 com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \
79                 et_lex.lex.c test1.h test1.c test2.h test2.c \
80                 eddep makedep core AFS_component_version_number.c
81
82 test:
83         cd test; $(MAKE)
84
85 compile_et.o:  AFS_component_version_number.c
86 error_table.o: et_lex.lex.c
87
88 include ../config/Makefile.version