Makefile revision 60381
1# $FreeBSD: head/lib/libfetch/Makefile 60381 2000-05-11 15:29:26Z des $
2
3MAINTAINER=	des@freebsd.org
4LIB=		fetch
5CFLAGS+=	-I. -Wall -pedantic
6.if !defined(DEBUG)
7CFLAGS+=	-DNDEBUG
8.endif
9SRCS=		fetch.c common.c ftp.c http.c file.c fetch_err.c \
10		fetch_err.h ftperr.h httperr.h
11INCS=		fetch.h ${.OBJDIR}/fetch_err.h
12MAN3=		fetch.3
13CLEANFILES=	fetch_err.c fetch_err.h ftperr.h httperr.h
14
15SHLIB_MAJOR=    2
16SHLIB_MINOR=	0
17
18ftperr.h: ftp.errors
19	@echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET}
20	@cat ${.ALLSRC} \
21	  | grep -v ^# \
22	  | sort \
23	  | while read NUM CAT STRING; do \
24	    echo "    { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
25	  done >> ${.TARGET}
26	@echo "    { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET}
27	@echo "};" >> ${.TARGET}
28
29httperr.h: http.errors
30	@echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET}
31	@cat ${.ALLSRC} \
32	  | grep -v ^# \
33	  | sort \
34	  | while read NUM CAT STRING; do \
35	    echo "    { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
36	  done >> ${.TARGET}
37	@echo "    { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET}
38	@echo "};" >> ${.TARGET}
39
40hdrs: fetch_err.h
41
42.ORDER: fetch_err.c fetch_err.h
43fetch_err.c fetch_err.h: fetch_err.et
44	compile_et ${.ALLSRC}
45
46.include <bsd.lib.mk>
47