Makefile revision 74870
1275970Scy# $FreeBSD: head/lib/libfetch/Makefile 74870 2001-03-27 17:27:19Z ru $ 2275970Scy 3275970ScyMAINTAINER= des@freebsd.org 4275970ScyLIB= fetch 5275970ScyCFLAGS+= -I. -Wall -pedantic 6275970ScyCFLAGS+= -DINET6 7275970Scy.if !defined(DEBUG) 8275970ScyCFLAGS+= -DNDEBUG 9275970Scy.endif 10275970ScySRCS= fetch.c common.c ftp.c http.c file.c \ 11275970Scy ftperr.h httperr.h 12275970ScyINCS= fetch.h 13344884ScyMAN= fetch.3 14275970ScyCLEANFILES= ftperr.h httperr.h 15344884Scy 16275970ScySHLIB_MAJOR= 2 17344884ScySHLIB_MINOR= 0 18275970Scy 19275970Scyftperr.h: ftp.errors 20275970Scy @echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET} 21275970Scy @cat ${.ALLSRC} \ 22275970Scy | grep -v ^# \ 23275970Scy | sort \ 24275970Scy | while read NUM CAT STRING; do \ 25275970Scy echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \ 26275970Scy done >> ${.TARGET} 27275970Scy @echo " { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET} 28275970Scy @echo "};" >> ${.TARGET} 29275970Scy 30275970Scyhttperr.h: http.errors 31275970Scy @echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET} 32275970Scy @cat ${.ALLSRC} \ 33275970Scy | grep -v ^# \ 34275970Scy | sort \ 35275970Scy | while read NUM CAT STRING; do \ 36275970Scy echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \ 37275970Scy done >> ${.TARGET} 38275970Scy @echo " { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET} 39330106Sdelphij @echo "};" >> ${.TARGET} 40330106Sdelphij 41330106Sdelphij.for MP in fetchFreeURL fetchGet fetchGetFTP fetchGetFile fetchGetHTTP \ 42330106SdelphijfetchGetURL fetchList fetchListFTP fetchListFile fetchListHTTP fetchListURL \ 43275970ScyfetchMakeURL fetchParseURL fetchPut fetchPutFTP fetchPutFile fetchPutHTTP \ 44330106SdelphijfetchPutURL fetchStat fetchStatFTP fetchStatFile fetchStatHTTP fetchStatURL \ 45275970ScyfetchXGet fetchXGetFTP fetchXGetFile fetchXGetHTTP fetchXGetURL 46275970ScyMLINKS+= fetch.3 ${MP}.3 47275970Scy.endfor 48275970Scy 49330106Sdelphij.include <bsd.lib.mk> 50330106Sdelphij