1998-07-09 16:52:44 +00:00
|
|
|
LIB= fetch
|
1998-08-17 09:30:19 +00:00
|
|
|
CFLAGS+= -I${.CURDIR} -Wall -pedantic -DNDEBUG
|
1998-07-12 22:37:45 +00:00
|
|
|
SRCS= fetch.c ftp.c http.c file.c
|
1998-07-09 16:52:44 +00:00
|
|
|
MAN3= fetch.3
|
|
|
|
CLEANFILES+= ftperr.c httperr.c
|
|
|
|
|
|
|
|
SHLIB_MAJOR= 1
|
|
|
|
SHLIB_MINOR= 0
|
|
|
|
|
|
|
|
beforeinstall:
|
|
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/fetch.h \
|
|
|
|
${DESTDIR}/usr/include
|
|
|
|
|
1998-08-17 09:30:19 +00:00
|
|
|
ftp.c: ftperr.c
|
|
|
|
ftperr.c: ftp.errors
|
|
|
|
@echo "struct ftperr {" \ > ${.TARGET}
|
1998-07-09 16:52:44 +00:00
|
|
|
@echo " const int num;" \ >> ${.TARGET}
|
|
|
|
@echo " const char *string;" \ >> ${.TARGET}
|
|
|
|
@echo "};" \ >> ${.TARGET}
|
|
|
|
@echo "static struct ftperr _ftp_errlist[] = {" \ >> ${.TARGET}
|
|
|
|
@cat ${.ALLSRC} \
|
|
|
|
| grep -v ^# \
|
|
|
|
| sort \
|
|
|
|
| while read NUM STRING; do \
|
1998-07-11 18:56:01 +00:00
|
|
|
echo " { $${NUM}, \"$${STRING}\" },"; \
|
1998-07-09 16:52:44 +00:00
|
|
|
done >> ${.TARGET}
|
1998-07-11 18:56:01 +00:00
|
|
|
@echo " { -1, \"Unknown FTP error\" }" >> ${.TARGET}
|
1998-07-09 16:52:44 +00:00
|
|
|
@echo "};" >> ${.TARGET}
|
|
|
|
|
1998-08-17 09:30:19 +00:00
|
|
|
http.c: httperr.c
|
|
|
|
httperr.c: http.errors
|
|
|
|
@echo "struct httperr {" \ > ${.TARGET}
|
1998-07-09 16:52:44 +00:00
|
|
|
@echo " const int num;" \ >> ${.TARGET}
|
|
|
|
@echo " const char *string;" \ >> ${.TARGET}
|
|
|
|
@echo "};" \ >> ${.TARGET}
|
|
|
|
@echo "static struct httperr _http_errlist[] = {" \ >> ${.TARGET}
|
|
|
|
@cat ${.ALLSRC} \
|
|
|
|
| grep -v ^# \
|
|
|
|
| sort \
|
|
|
|
| while read NUM STRING; do \
|
1998-07-11 18:56:01 +00:00
|
|
|
echo " { $${NUM}, \"$${STRING}\" },"; \
|
1998-07-09 16:52:44 +00:00
|
|
|
done >> ${.TARGET}
|
1998-07-11 18:56:01 +00:00
|
|
|
@echo " { -1, \"Unknown HTTP error\" }" >> ${.TARGET}
|
1998-07-09 16:52:44 +00:00
|
|
|
@echo "};" >> ${.TARGET}
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|