1# $FreeBSD$ 2 3LIB= fetch 4CFLAGS+= -I. 5CFLAGS+= -DINET6 6SRCS= fetch.c common.c ftp.c http.c file.c \ 7 ftperr.h httperr.h 8INCS= fetch.h 9MAN= fetch.3 10CLEANFILES= ftperr.h httperr.h 11 12.if !defined(NOCRYPT) && !defined(NO_OPENSSL) 13DISTRIBUTION= crypto 14CFLAGS+= -DWITH_SSL 15DPADD= ${LIBSSL} ${LIBCRYPTO} 16LDADD= -lssl -lcrypto 17.endif 18 19CSTD?= c99 20WARNS?= 2 21 22SHLIB_MAJOR= 3 23 24ftperr.h: ftp.errors 25 @echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET} 26 @cat ${.ALLSRC} \ 27 | grep -v ^# \ 28 | sort \ 29 | while read NUM CAT STRING; do \ 30 echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \ 31 done >> ${.TARGET} 32 @echo " { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET} 33 @echo "};" >> ${.TARGET} 34 35httperr.h: http.errors 36 @echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET} 37 @cat ${.ALLSRC} \ 38 | grep -v ^# \ 39 | sort \ 40 | while read NUM CAT STRING; do \ 41 echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \ 42 done >> ${.TARGET} 43 @echo " { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET} 44 @echo "};" >> ${.TARGET} 45 46MLINKS+= fetch.3 fetchFreeURL.3 47MLINKS+= fetch.3 fetchGet.3 48MLINKS+= fetch.3 fetchGetFTP.3 49MLINKS+= fetch.3 fetchGetFile.3 50MLINKS+= fetch.3 fetchGetHTTP.3 51MLINKS+= fetch.3 fetchGetURL.3 52MLINKS+= fetch.3 fetchList.3 53MLINKS+= fetch.3 fetchListFTP.3 54MLINKS+= fetch.3 fetchListFile.3 55MLINKS+= fetch.3 fetchListHTTP.3 56MLINKS+= fetch.3 fetchListURL.3 57MLINKS+= fetch.3 fetchMakeURL.3 58MLINKS+= fetch.3 fetchParseURL.3 59MLINKS+= fetch.3 fetchPut.3 60MLINKS+= fetch.3 fetchPutFTP.3 61MLINKS+= fetch.3 fetchPutFile.3 62MLINKS+= fetch.3 fetchPutHTTP.3 63MLINKS+= fetch.3 fetchPutURL.3 64MLINKS+= fetch.3 fetchStat.3 65MLINKS+= fetch.3 fetchStatFTP.3 66MLINKS+= fetch.3 fetchStatFile.3 67MLINKS+= fetch.3 fetchStatHTTP.3 68MLINKS+= fetch.3 fetchStatURL.3 69MLINKS+= fetch.3 fetchXGet.3 70MLINKS+= fetch.3 fetchXGetFTP.3 71MLINKS+= fetch.3 fetchXGetFile.3 72MLINKS+= fetch.3 fetchXGetHTTP.3 73MLINKS+= fetch.3 fetchXGetURL.3 74 75.include <bsd.lib.mk> 76