Makefile revision 70796
1# $FreeBSD: head/lib/libfetch/Makefile 70796 2001-01-08 13:17:21Z des $
2
3MAINTAINER=	des@freebsd.org
4LIB=		fetch
5CFLAGS+=	-I. -Wall -pedantic
6CFLAGS+=	-DINET6
7.if !defined(DEBUG)
8CFLAGS+=	-DNDEBUG
9.endif
10SRCS=		fetch.c common.c ftp.c http.c file.c \
11		ftperr.h httperr.h
12INCS=		fetch.h
13MAN3=		fetch.3
14CLEANFILES=	ftperr.h httperr.h
15
16SHLIB_MAJOR=    2
17SHLIB_MINOR=	0
18
19ftperr.h: ftp.errors
20	@echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET}
21	@cat ${.ALLSRC} \
22	  | grep -v ^# \
23	  | sort \
24	  | while read NUM CAT STRING; do \
25	    echo "    { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
26	  done >> ${.TARGET}
27	@echo "    { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET}
28	@echo "};" >> ${.TARGET}
29
30httperr.h: http.errors
31	@echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET}
32	@cat ${.ALLSRC} \
33	  | grep -v ^# \
34	  | sort \
35	  | while read NUM CAT STRING; do \
36	    echo "    { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
37	  done >> ${.TARGET}
38	@echo "    { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET}
39	@echo "};" >> ${.TARGET}
40
41.for MP in fetchFreeURL fetchGet fetchGetFTP fetchGetFile fetchGetHTTP \
42fetchGetURL fetchList fetchListFTP fetchListFile fetchListHTTP fetchListURL \
43fetchMakeURL fetchParseURL fetchPut fetchPutFTP fetchPutFile fetchPutHTTP \
44fetchPutURL fetchStat fetchStatFTP fetchStatFile fetchStatHTTP fetchStatURL \
45fetchXGet fetchXGetFTP fetchXGetFile fetchXGetHTTP fetchXGetURL
46MLINKS+= fetch.3 ${MP}.3
47.endfor
48
49.include <bsd.lib.mk>
50