3 MAINTAINER= des@freebsd.org
5 CFLAGS+= -I. -Wall -pedantic
10 SRCS= fetch.c common.c ftp.c http.c file.c \
14 CLEANFILES= ftperr.h httperr.h
20 @echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET}
24 | while read NUM CAT STRING; do \
25 echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
27 @echo " { -1, FETCH_UNKNOWN, \"Unknown FTP error\" }" >> ${.TARGET}
28 @echo "};" >> ${.TARGET}
30 httperr.h: http.errors
31 @echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET}
35 | while read NUM CAT STRING; do \
36 echo " { $${NUM}, FETCH_$${CAT}, \"$${STRING}\" },"; \
38 @echo " { -1, FETCH_UNKNOWN, \"Unknown HTTP error\" }" >> ${.TARGET}
39 @echo "};" >> ${.TARGET}
41 .for MP in fetchFreeURL fetchGet fetchGetFTP fetchGetFile fetchGetHTTP \
42 fetchGetURL fetchList fetchListFTP fetchListFile fetchListHTTP fetchListURL \
43 fetchMakeURL fetchParseURL fetchPut fetchPutFTP fetchPutFile fetchPutHTTP \
44 fetchPutURL fetchStat fetchStatFTP fetchStatFile fetchStatHTTP fetchStatURL \
45 fetchXGet fetchXGetFTP fetchXGetFile fetchXGetHTTP fetchXGetURL
46 MLINKS+= fetch.3 ${MP}.3